From 96bf070900e096f61c046d156a9197c92af7e707 Mon Sep 17 00:00:00 2001 From: zYne Date: Fri, 20 Oct 2006 19:26:39 +0000 Subject: [PATCH] New DQL docs --- ...mpty Collection Comparison Expressions.php | 0 ...itional expressions - Input parameters.php | 0 ...itional expressions - Like Expressions.php | 24 +++++++ ...ressions - Null Comparison Expressions.php | 0 ...ns - Operators and operator precedence.php | 14 ++++ ...itional expressions - Path expressions.php | 0 ...Doctrine Query Language) - FROM clause.php | 31 +++++++++ ...ctional Expressions - String functions.php | 26 +++++++ ...y Language) - GROUP BY, HAVING clauses.php | 40 +++++++++++ ...y Language) - LIMIT and OFFSET clauses.php | 0 ...rine Query Language) - ORDER BY clause.php | 29 ++++++++ ...trine Query Language) - SELECT queries.php | 69 +++++++++++++++++++ ...octrine Query Language) - WHERE clause.php | 16 +++++ 13 files changed, 249 insertions(+) create mode 100644 manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Empty Collection Comparison Expressions.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Input parameters.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Like Expressions.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Null Comparison Expressions.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Operators and operator precedence.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Path expressions.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - FROM clause.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - Functional Expressions - String functions.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - GROUP BY, HAVING clauses.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - LIMIT and OFFSET clauses.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - ORDER BY clause.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - SELECT queries.php create mode 100644 manual/docs/DQL (Doctrine Query Language) - WHERE clause.php diff --git a/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Empty Collection Comparison Expressions.php b/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Empty Collection Comparison Expressions.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Input parameters.php b/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Input parameters.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Like Expressions.php b/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Like Expressions.php new file mode 100644 index 000000000..092c51e65 --- /dev/null +++ b/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Like Expressions.php @@ -0,0 +1,24 @@ +Syntax:
+string_expression [NOT] LIKE pattern_value [ESCAPE escape_character] +
+ +
+The string_expression must have a string value. The pattern_value is a string literal or a string-valued +input parameter in which an underscore (_) stands for any single character, a percent (%) character +stands for any sequence of characters (including the empty sequence), and all other characters stand for +themselves. The optional escape_character is a single-character string literal or a character-valued +input parameter (i.e., char or Character) and is used to escape the special meaning of the underscore +and percent characters in pattern_value. +

+Examples: +
+ +
+If the value of the string_expression or pattern_value is NULL or unknown, the value of the LIKE +expression is unknown. If the escape_characteris specified and is NULL, the value of the LIKE expression +is unknown. diff --git a/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Null Comparison Expressions.php b/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Null Comparison Expressions.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Operators and operator precedence.php b/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Operators and operator precedence.php new file mode 100644 index 000000000..ec193d0ba --- /dev/null +++ b/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Operators and operator precedence.php @@ -0,0 +1,14 @@ +The operators are listed below in order of decreasing precedence. + diff --git a/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Path expressions.php b/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - Path expressions.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/DQL (Doctrine Query Language) - FROM clause.php b/manual/docs/DQL (Doctrine Query Language) - FROM clause.php new file mode 100644 index 000000000..53c91ef2d --- /dev/null +++ b/manual/docs/DQL (Doctrine Query Language) - FROM clause.php @@ -0,0 +1,31 @@ +Syntax:
+ +
+
+FROM component_reference [[LEFT | INNER] JOIN component_reference] ...
+
+
+ +The FROM clause indicates the component or components from which to retrieve records. +If you name more than one component, you are performing a join. +For each table specified, you can optionally specify an alias. +

+ + +
  • The default join type is LEFT JOIN. This join can be indicated by the use of either 'LEFT JOIN' clause or simply ',', hence the following queries are equal: +
    +
    +SELECT u.*, p.* FROM User u LEFT JOIN u.Phonenumber
    +
    +SELECT u.*, p.* FROM User u, u.Phonenumber p
    +
    +
    + +
  • INNER JOIN produces a Cartesian product between two specified components (that is, each and every record in the first component is joined to each and every record in the second component). +So basically INNER JOIN can be used when you want to efficiently fetch for example all users which have one or more phonenumbers. +
    +
    +SELECT u.*, p.* FROM User u INNER JOIN u.Phonenumber p
    +
    +
    + diff --git a/manual/docs/DQL (Doctrine Query Language) - Functional Expressions - String functions.php b/manual/docs/DQL (Doctrine Query Language) - Functional Expressions - String functions.php new file mode 100644 index 000000000..3b0a02289 --- /dev/null +++ b/manual/docs/DQL (Doctrine Query Language) - Functional Expressions - String functions.php @@ -0,0 +1,26 @@ + diff --git a/manual/docs/DQL (Doctrine Query Language) - GROUP BY, HAVING clauses.php b/manual/docs/DQL (Doctrine Query Language) - GROUP BY, HAVING clauses.php new file mode 100644 index 000000000..2dc50e8fe --- /dev/null +++ b/manual/docs/DQL (Doctrine Query Language) - GROUP BY, HAVING clauses.php @@ -0,0 +1,40 @@ + + diff --git a/manual/docs/DQL (Doctrine Query Language) - LIMIT and OFFSET clauses.php b/manual/docs/DQL (Doctrine Query Language) - LIMIT and OFFSET clauses.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/DQL (Doctrine Query Language) - ORDER BY clause.php b/manual/docs/DQL (Doctrine Query Language) - ORDER BY clause.php new file mode 100644 index 000000000..cd02f6d6a --- /dev/null +++ b/manual/docs/DQL (Doctrine Query Language) - ORDER BY clause.php @@ -0,0 +1,29 @@ +Record collections can be sorted efficiently at the database level using the ORDER BY clause. + +Syntax: +
    +
    +        [ORDER BY {ComponentAlias.columnName}
    +        [ASC | DESC], ...]
    +
    +
    + +Examples: +
    +
    +
    +FROM User.Phonenumber
    +  ORDER BY User.name, Phonenumber.phonenumber
    +
    +FROM User u, u.Email e
    +  ORDER BY e.address, u.id
    +
    +
    +In order to sort in reverse order you can add the DESC (descending) keyword to the name of the column in the ORDER BY clause that you are sorting by. The default is ascending order; this can be specified explicitly using the ASC keyword. +
    +
    +
    +FROM User u, u.Email e
    +  ORDER BY e.address DESC, u.id ASC;
    +
    +
    diff --git a/manual/docs/DQL (Doctrine Query Language) - SELECT queries.php b/manual/docs/DQL (Doctrine Query Language) - SELECT queries.php new file mode 100644 index 000000000..cf4df113f --- /dev/null +++ b/manual/docs/DQL (Doctrine Query Language) - SELECT queries.php @@ -0,0 +1,69 @@ +SELECT statement syntax: +
    +
    +SELECT
    +    [ALL | DISTINCT]
    +    select_expr, ...
    +    [FROM components
    +    [WHERE where_condition]
    +    [GROUP BY groupby_expr
    +      [ASC | DESC], ... ]
    +    [HAVING where_condition]
    +    [ORDER BY orderby_expr
    +      [ASC | DESC], ...]
    +    [LIMIT row_count OFFSET offset}]
    +
    +
    +
    +The SELECT statement is used for the retrieval of data from one or more components. + + diff --git a/manual/docs/DQL (Doctrine Query Language) - WHERE clause.php b/manual/docs/DQL (Doctrine Query Language) - WHERE clause.php new file mode 100644 index 000000000..c3f4b29d1 --- /dev/null +++ b/manual/docs/DQL (Doctrine Query Language) - WHERE clause.php @@ -0,0 +1,16 @@ +Syntax: +
    +
    +WHERE where_condition
    +
    +
    +