Fixed examples
Rob Kinyon [Thu, 26 Mar 2009 16:27:15 +0000 (12:27 -0400)]
lib/SQL/Abstract/Manual/Examples.pod

index d56f157..93fd4cc 100644 (file)
@@ -158,8 +158,14 @@ one. The SQL used is from the MySQL dialect.
           {
               type  => 'SelectComponent',
               value => {
-                  type     => 'Identifier',
-                  element1 => '*',
+                  type => 'Operator',
+                  op   => 'COUNT',
+                  args => [
+                      {
+                          type     => 'Identifier',
+                          element1 => '*',
+                      },
+                  ],
               },
           },
       ],
@@ -229,17 +235,29 @@ one. The SQL used is from the MySQL dialect.
       },
   }
  
-=item SELECT COUNT(*) FROM foo WHERE ( name = 'John' AND title = 'Mr' ) OR abbrev = 'Dr'
+=item SELECT COUNT(DISTINCT(*)) FROM foo WHERE ( name = 'John' AND title = 'Mr' ) OR abbrev = 'Dr'
 
   {
       type => 'select',
       ast_version => 0.0001,
       select => [
-          {
+        {
               type  => 'SelectComponent',
               value => {
-                  type     => 'Identifier',
-                  element1 => '*',
+                  type => 'Operator',
+                  op   => 'COUNT',
+                  args => [
+                      {
+                          type => 'Operator',
+                          op   => 'DISTINCT',
+                          args => [
+                              {
+                                  type     => 'Identifier',
+                                  element1 => '*',
+                              },
+                          ],
+                      },
+                  ],
               },
           },
       ],