SqlParser.parseStringAsBatch

Parse sql and creates a #GdaBatch object which contains all the #GdaStatement 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 #GdaStatement 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 #GdaBatch object will contain no statement.

To include variables in the sql string, see the <link linkend="GdaSqlParser.description">GdaSqlParser's object description</link>.

class SqlParser
parseStringAsBatch
(
string sql
,
out string remain
)

Parameters

sql string

the SQL string to parse

remain string

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

Return Value

Type: gda.batch.Batch

a new #GdaBatch object, or null if an error occurred

Throws