The Pyrrho Database Management System

Malcolm Crowe, University of the West of Scotland

 

 

Pyrrho SQL syntax

Statements

Sql = SqlStatement [�;�] .

SqlStatement = Alter
| BEGIN TRANSACTION [WITH PROVENANCE uri_string]
| Call
| COMMIT
| Create
| CursorSpecification
| DeleteSearched
| DropStatement
| Grant
| Insert
| Rename
| Revoke
| ROLLBACK
| SET AUTHORIZATION '=' CURATED
| SET PROFILING '=' (ON|OFF)
| SET ROLE id
| SET TIMEOUT '=' int
| UpdateSearched
| HTTP HttpRest .

The above statements can be issued at command level. You SELECT multiple rows from tables using the CursorSpecification. Inside procedures and functions there is a different set, as follows. (Note that �direct SQL� statements are in both lists.) The provenance syntax has been added to SQL2008.

Statement = Assignment
| Call
| CaseStatement
| Close
| CompoundStatement
| BREAK
| Declaration
| DeletePositioned
| DeleteSearched
| Fetch
| ForStatement
| GetDiagnostics
| IfStatement
| Insert
| ITERATE label
| LEAVE label
| LoopStatement
| Open
| Repeat
| RETURN Value
| ROLLBACK | SelectSingle
| Signal
| UpdatePositioned
| UpdateSearched
| While
| HTTP HttpRest .

HttpRest = (ADD|UPDATE) url_Value data_Value [AS mime_string][ WhereClause]
| DELETE url_Value [ WhereClause].
Here ADD and UPDATE are used as the SQL analogues of POST and PUT. The WhereClause is provided as an alternative to using an expression for the uri, but depending on the web service being accessed, may be limited to a conjunction of equality conditions. For Http GET see Value.