SqlParser.parseStringAsBatch

gda.batch.Batch parseStringAsBatch(string sql, out string remain)

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>.

Parameters

sqlthe SQL string to parse
remainlocation to store a pointer to remaining part of sql in case an error occurred while parsing sql, or null

Returns

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

Throws

[SqlParserException]