Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
75242e50
Commit
75242e50
authored
Sep 16, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DQL docs updated
parent
5dd9d8d8
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
149 additions
and
1 deletion
+149
-1
DQL (Doctrine Query Language) - Functions - Contains.php
.../DQL (Doctrine Query Language) - Functions - Contains.php
+7
-0
DQL (Doctrine Query Language) - Functions - Like.php
...odes/DQL (Doctrine Query Language) - Functions - Like.php
+7
-0
DQL (Doctrine Query Language) - Functions - Regexp.php
...es/DQL (Doctrine Query Language) - Functions - Regexp.php
+7
-0
DQL (Doctrine Query Language) - Operators - Logical operators.php
...trine Query Language) - Operators - Logical operators.php
+0
-0
DQL (Doctrine Query Language) - Functions - Contains.php
.../DQL (Doctrine Query Language) - Functions - Contains.php
+0
-0
DQL (Doctrine Query Language) - Functions - Like.php
...docs/DQL (Doctrine Query Language) - Functions - Like.php
+0
-0
DQL (Doctrine Query Language) - Functions - Regexp.php
...cs/DQL (Doctrine Query Language) - Functions - Regexp.php
+0
-0
DQL (Doctrine Query Language) - Operators - Logical operators.php
...trine Query Language) - Operators - Logical operators.php
+110
-0
documentation.php
manual/documentation.php
+18
-1
No files found.
manual/codes/DQL (Doctrine Query Language) - Functions - Contains.php
0 → 100644
View file @
75242e50
<?php
$q
=
new
Doctrine_Query
();
$q
->
from
(
'User'
)
->
where
(
'User.Phonenumber.phonenumber.contains(?,?,?)'
);
$users
=
$q
->
execute
(
array
(
'123 123 123'
,
'0400 999 999'
,
'+358 100 100'
));
?>
manual/codes/DQL (Doctrine Query Language) - Functions - Like.php
0 → 100644
View file @
75242e50
<?php
$q
=
new
Doctrine_Query
();
$q
->
from
(
'User'
)
->
where
(
'User.Phonenumber.phonenumber.like(?,?)'
);
$users
=
$q
->
execute
(
array
(
'%123%'
,
'456%'
));
?>
manual/codes/DQL (Doctrine Query Language) - Functions - Regexp.php
0 → 100644
View file @
75242e50
<?php
$q
=
new
Doctrine_Query
();
$q
->
from
(
'User'
)
->
where
(
'User.Phonenumber.phonenumber.regexp(?,?)'
);
$users
=
$q
->
execute
(
array
(
'[123]'
,
'^[3-5]'
));
?>
manual/codes/DQL (Doctrine Query Language) - Operators - Logical operators.php
0 → 100644
View file @
75242e50
manual/docs/DQL (Doctrine Query Language) - Functions - Contains.php
0 → 100644
View file @
75242e50
manual/docs/DQL (Doctrine Query Language) - Functions - Like.php
0 → 100644
View file @
75242e50
manual/docs/DQL (Doctrine Query Language) - Functions - Regexp.php
0 → 100644
View file @
75242e50
manual/docs/DQL (Doctrine Query Language) - Operators - Logical operators.php
0 → 100644
View file @
75242e50
<li>
<p>
NOT, !
</p>
<p>
Logical NOT. Evaluates to 1 if the
operand is 0, to 0 if
the operand is non-zero, and NOT NULL
returns NULL.
</p>
<b
class=
'title'
>
DQL condition :
</b>
NOT 10
<br
\
>
-
>
0
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
NOT 0
<br
\
>
-
>
1
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
NOT NULL
<br
\
>
-
>
NULL
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
! (1+1)
<br
\
>
-
>
0
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
! 1+1
<br
\
>
-
>
1
<br
\
>
</pre>
<p>
The last example produces 1 because the
expression evaluates the same way as
(!1)+1.
</p>
</li>
<li>
<p><a
name=
"function_and"
></a>
<a
class=
"indexterm"
name=
"id2965271"
></a>
<a
class=
"indexterm"
name=
"id2965283"
></a>
AND
</p>
<p>
Logical AND. Evaluates to 1 if all
operands are non-zero and not NULL, to
0 if one or more operands are
0, otherwise NULL is
returned.
</p>
<b
class=
'title'
>
DQL condition :
</b>
1 AND 1
<br
\
>
-
>
1
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
1 AND 0
<br
\
>
-
>
0
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
1 AND NULL
<br
\
>
-
>
NULL
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
0 AND NULL
<br
\
>
-
>
0
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
NULL AND 0
<br
\
>
-
>
0
<br
\
>
</pre>
</li>
<li>
OR
</p>
<p>
Logical OR. When both operands are
non-NULL, the result is
1 if any operand is non-zero, and
0 otherwise. With a
NULL operand, the result is
1 if the other operand is non-zero, and
NULL otherwise. If both operands are
NULL, the result is
NULL.
</p>
<b
class=
'title'
>
DQL condition :
</b>
1 OR 1
<br
\
>
-
>
1
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
1 OR 0
<br
\
>
-
>
1
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
0 OR 0
<br
\
>
-
>
0
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
0 OR NULL
<br
\
>
-
>
NULL
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
1 OR NULL
<br
\
>
-
>
1
<br
\
>
</pre>
</li>
<li>
<p><a
name=
"function_xor"
></a>
<a
class=
"indexterm"
name=
"id2965520"
></a>
XOR
</p>
<p>
Logical XOR. Returns NULL if either
operand is NULL. For
non-NULL operands, evaluates to
1 if an odd number of operands is
non-zero, otherwise 0 is returned.
</p>
<b
class=
'title'
>
DQL condition :
</b>
1 XOR 1
<br
\
>
-
>
0
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
1 XOR 0
<br
\
>
-
>
1
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
1 XOR NULL
<br
\
>
-
>
NULL
<br
\
>
<b
class=
'title'
>
DQL condition :
</b>
1 XOR 1 XOR 1
<br
\
>
-
>
1
<br
\
>
</pre>
<p>
a XOR b is mathematically equal to
(a AND (NOT b)) OR ((NOT a) and b).
</p>
</li>
</ul>
manual/documentation.php
View file @
75242e50
...
...
@@ -279,7 +279,24 @@ $menu = array("Getting started" =>
*/
),
"DQL (Doctrine Query Language)"
=>
array
(
array
(
'Syntax'
=>
array
(
'FROM'
,
'WHERE'
,
'GROUP BY'
,
'HAVING'
,
'ORDER BY'
,
'LIMIT and OFFSET'
,
),
'Functions'
=>
array
(
'Contains'
,
'Regexp'
,
'Like'
),
'Operators'
=>
array
(
'Logical operators'
)
),
"Transactions"
=>
array
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment