add basic transction control
This commit is contained in:
parent
a9d51d1ebb
commit
666d1f877f
4 changed files with 89 additions and 7 deletions
tools/Language/SQL/SimpleSQL
|
@ -8,9 +8,10 @@ commit, savepoint, etc.), and session management (set).
|
|||
> module Language.SQL.SimpleSQL.SQL2011Bits (sql2011BitsTests) where
|
||||
|
||||
> import Language.SQL.SimpleSQL.TestTypes
|
||||
> import Language.SQL.SimpleSQL.Syntax
|
||||
|
||||
> sql2011BitsTests :: TestItem
|
||||
> sql2011BitsTests = Group "sql 2011 bits tests" []
|
||||
> sql2011BitsTests = Group "sql 2011 bits tests" [
|
||||
|
||||
17 Transaction management
|
||||
|
||||
|
@ -21,6 +22,10 @@ commit, savepoint, etc.), and session management (set).
|
|||
|
||||
BEGIN is not in the standard!
|
||||
|
||||
> (TestStatement SQL2011
|
||||
> "start transaction"
|
||||
> $ StartTransaction)
|
||||
|
||||
17.2 <set transaction statement>
|
||||
|
||||
<set transaction statement> ::=
|
||||
|
@ -72,16 +77,35 @@ BEGIN is not in the standard!
|
|||
<savepoint specifier> ::=
|
||||
<savepoint name>
|
||||
|
||||
> ,(TestStatement SQL2011
|
||||
> "savepoint difficult_bit"
|
||||
> $ Savepoint $ Name "difficult_bit")
|
||||
|
||||
|
||||
17.6 <release savepoint statement>
|
||||
|
||||
<release savepoint statement> ::=
|
||||
RELEASE SAVEPOINT <savepoint specifier>
|
||||
|
||||
> ,(TestStatement SQL2011
|
||||
> "release savepoint difficult_bit"
|
||||
> $ ReleaseSavepoint $ Name "difficult_bit")
|
||||
|
||||
|
||||
17.7 <commit statement>
|
||||
|
||||
<commit statement> ::=
|
||||
COMMIT [ WORK ] [ AND [ NO ] CHAIN ]
|
||||
|
||||
> ,(TestStatement SQL2011
|
||||
> "commit"
|
||||
> $ Commit)
|
||||
|
||||
> ,(TestStatement SQL2011
|
||||
> "commit work"
|
||||
> $ Commit)
|
||||
|
||||
|
||||
17.8 <rollback statement>
|
||||
|
||||
<rollback statement> ::=
|
||||
|
@ -90,6 +114,18 @@ BEGIN is not in the standard!
|
|||
<savepoint clause> ::=
|
||||
TO SAVEPOINT <savepoint specifier>
|
||||
|
||||
> ,(TestStatement SQL2011
|
||||
> "rollback"
|
||||
> $ Rollback Nothing)
|
||||
|
||||
> ,(TestStatement SQL2011
|
||||
> "rollback work"
|
||||
> $ Rollback Nothing)
|
||||
|
||||
> ,(TestStatement SQL2011
|
||||
> "rollback to savepoint difficult_bit"
|
||||
> $ Rollback $ Just $ Name "difficult_bit")
|
||||
|
||||
|
||||
19 Session management
|
||||
|
||||
|
@ -179,3 +215,5 @@ BEGIN is not in the standard!
|
|||
|
||||
<collation specification> ::=
|
||||
<value specification>
|
||||
|
||||
> ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue