start adding basic dml
parser and pretty printer for statements add query statement add support for insert update delete truncate bonus ddl: limited create schema drop schema add grammar notes to the new test files
This commit is contained in:
parent
6fc8869f73
commit
dfa84072dc
13 changed files with 684 additions and 2238 deletions
tools/Language/SQL/SimpleSQL
|
@ -6,9 +6,11 @@ This module covers the tests for parsing schema and DDL statements.
|
|||
> module Language.SQL.SimpleSQL.SQL2011Schema (sql2011SchemaTests) where
|
||||
|
||||
> import Language.SQL.SimpleSQL.TestTypes
|
||||
> import Language.SQL.SimpleSQL.Syntax
|
||||
|
||||
> sql2011SchemaTests :: TestItem
|
||||
> sql2011SchemaTests = Group "sql 2011 schema tests" []
|
||||
> sql2011SchemaTests = Group "sql 2011 schema tests"
|
||||
> [
|
||||
|
||||
|
||||
11.1 <schema definition>
|
||||
|
@ -18,6 +20,12 @@ This module covers the tests for parsing schema and DDL statements.
|
|||
[ <schema character set or path> ]
|
||||
[ <schema element>... ]
|
||||
|
||||
> (TestStatement SQL2011 "create schema my_schema"
|
||||
> $ CreateSchema [Name "my_schema"])
|
||||
|
||||
todo: schema name can have .
|
||||
schema name can be quoted iden or unicode quoted iden
|
||||
|
||||
<schema character set or path> ::=
|
||||
<schema character set specification>
|
||||
| <schema path specification>
|
||||
|
@ -66,6 +74,14 @@ This module covers the tests for parsing schema and DDL statements.
|
|||
CASCADE
|
||||
| RESTRICT
|
||||
|
||||
|
||||
> ,(TestStatement SQL2011 "drop schema my_schema"
|
||||
> $ DropSchema [Name "my_schema"] DefaultDropBehaviour)
|
||||
> ,(TestStatement SQL2011 "drop schema my_schema cascade"
|
||||
> $ DropSchema [Name "my_schema"] Cascade)
|
||||
> ,(TestStatement SQL2011 "drop schema my_schema restrict"
|
||||
> $ DropSchema [Name "my_schema"] Restrict)
|
||||
|
||||
11.3 <table definition>
|
||||
|
||||
|
||||
|
@ -74,6 +90,9 @@ This module covers the tests for parsing schema and DDL statements.
|
|||
[ WITH <system versioning clause> ]
|
||||
[ ON COMMIT <table commit action> ROWS ]
|
||||
|
||||
,(TestStatement SQL2011 "create table ( a int )"
|
||||
|
||||
|
||||
<table contents source> ::=
|
||||
<table element list>
|
||||
| <typed table clause>
|
||||
|
@ -1310,3 +1329,5 @@ This module covers the tests for parsing schema and DDL statements.
|
|||
|
||||
<drop sequence generator statement> ::=
|
||||
DROP SEQUENCE <sequence generator name> <drop behavior>
|
||||
|
||||
> ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue