Class SpannerStatementParser
java.lang.Object
com.google.cloud.spanner.connection.AbstractStatementParser
com.google.cloud.spanner.connection.SpannerStatementParser
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.cloud.spanner.connection.AbstractStatementParser
AbstractStatementParser.ParametersInfo, AbstractStatementParser.ParsedStatement, AbstractStatementParser.StatementType
-
Field Summary
Fields inherited from class com.google.cloud.spanner.connection.AbstractStatementParser
DEFAULT_MAX_STATEMENT_CACHE_SIZE_MB
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkReturningClauseInternal
(String rawSql) Checks if the given SQL string contains a Returning clause.protected boolean
Indicates whether the parser supports theEXPLAIN
clause.Methods inherited from class com.google.cloud.spanner.connection.AbstractStatementParser
checkReturningClause, convertPositionalParametersToNamedParameters, getInstance, isDdlStatement, isQuery, isUpdateStatement, parse, removeCommentsAndTrim
-
Constructor Details
-
SpannerStatementParser
public SpannerStatementParser() throws com.google.cloud.spanner.connection.ClientSideStatementImpl.CompileException- Throws:
com.google.cloud.spanner.connection.ClientSideStatementImpl.CompileException
-
-
Method Details
-
supportsExplain
protected boolean supportsExplain()Indicates whether the parser supports theEXPLAIN
clause. The Spanner parser does support it.- Specified by:
supportsExplain
in classAbstractStatementParser
-
checkReturningClauseInternal
Description copied from class:AbstractStatementParser
Checks if the given SQL string contains a Returning clause. This method is used only in case of a DML statement.- Specified by:
checkReturningClauseInternal
in classAbstractStatementParser
- Parameters:
rawSql
- The sql string without comments that has to be evaluated.- Returns:
- A boolean indicating whether the sql string has a Returning clause or not.
-