X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FSQL-Abstract.git;a=blobdiff_plain;f=t%2F11parser.t;h=f02a8680f248a9205530e020a1c00e030ec56bad;hp=5ce1a8021a4362f13e81c14e69828c003d690312;hb=4247c384fc4291dab9ad93625b267e862b2c9906;hpb=1f00df9fde149ba81f014d6fa1a7d304ac2e4b08 diff --git a/t/11parser.t b/t/11parser.t index 5ce1a80..f02a868 100644 --- a/t/11parser.t +++ b/t/11parser.t @@ -576,6 +576,78 @@ is_deeply($sqlat->parse("CASE WHEN FOO() > BAR()"), [ ] ]); +is_deeply($sqlat->parse("SELECT [me].[id], ROW_NUMBER ( ) OVER (ORDER BY (SELECT 1)) AS [rno__row__index] FROM bar"), [ + [ + "SELECT", + [ + [ + "-LIST", + [ + [ + "-LITERAL", + [ + "[me].[id]" + ] + ], + [ + "AS", + [ + [ + "ROW_NUMBER() OVER", + [ + [ + "-PAREN", + [ + [ + "ORDER BY", + [ + [ + "-PAREN", + [ + [ + "SELECT", + [ + [ + "-LITERAL", + [ + 1 + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + ], + [ + "-LITERAL", + [ + "[rno__row__index]" + ] + ] + ] + ] + ] + ] + ] + ], + [ + "FROM", + [ + [ + "-LITERAL", + [ + "bar" + ] + ] + ] + ] +]); + is_deeply($sqlat->parse("SELECT x, y FROM foo WHERE x IN (?, ?, ?, ?)"), [ [