parse_string_as_batch


Description:

public Batch? parse_string_as_batch (string sql, out string remain) throws Error

Parse sql and creates a Batch object which contains all the Statement objects created while parsing (one object per SQL statement).

Empty statements (composed of spaces only) do not appear in the resulting object.

sql is parsed and Statement objects are created as long as no error is found in sql. If an error is found at some point, then the parsing stops and remain may contain a non null pointer, error may be set, and null is returned.

if sql is null, then the returned Batch object will contain no statement.

To include variables in the sql string, see the GdaSqlParser's object description.

Parameters:

this

a SqlParser object

sql

the SQL string to parse

remain

location to store a pointer to remaining part of sql in case an error occurred while parsing sql, or null

Returns:

a new Batch object, or null if an error occurred