From: Rob Kinyon Date: Thu, 26 Mar 2009 16:27:15 +0000 (-0400) Subject: Fixed examples X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=de1a11fabe91320f1fea40ca846026ee3e8707fa;p=dbsrgits%2FSQL-Abstract-2.0-ish.git Fixed examples --- diff --git a/lib/SQL/Abstract/Manual/Examples.pod b/lib/SQL/Abstract/Manual/Examples.pod index d56f157..93fd4cc 100644 --- a/lib/SQL/Abstract/Manual/Examples.pod +++ b/lib/SQL/Abstract/Manual/Examples.pod @@ -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 => '*', + }, + ], + }, + ], }, }, ],