Class IntermediatePreparedStatement (0.24.0)

public class IntermediatePreparedStatement extends IntermediateStatement

Intermediate representation for prepared statements (i.e.: statements before they become portals)

Inheritance

java.lang.Object > IntermediateStatement > IntermediatePreparedStatement

Constructors

IntermediatePreparedStatement(ConnectionHandler connectionHandler, OptionsMetadata options, String name, int[] givenParameterDataTypes, AbstractStatementParser.ParsedStatement parsedStatement, Statement originalStatement)

public IntermediatePreparedStatement(ConnectionHandler connectionHandler, OptionsMetadata options, String name, int[] givenParameterDataTypes, AbstractStatementParser.ParsedStatement parsedStatement, Statement originalStatement)
Parameters
Name Description
connectionHandler ConnectionHandler
options OptionsMetadata
name String
givenParameterDataTypes int[]
parsedStatement ParsedStatement
originalStatement com.google.cloud.spanner.Statement

Fields

givenParameterDataTypes

protected final int[] givenParameterDataTypes
Field Value
Type Description
int[]

statement

protected Statement statement
Field Value
Type Description
com.google.cloud.spanner.Statement

Methods

autoDescribeParameters(byte[][] parameterValues, BackendConnection backendConnection)

public void autoDescribeParameters(byte[][] parameterValues, BackendConnection backendConnection)

Describe the parameters of this statement.

Parameters
Name Description
parameterValues byte[][]
backendConnection BackendConnection

createPortal(String name, byte[][] parameters, List<Short> parameterFormatCodes, List<Short> resultFormatCodes)

public IntermediatePortalStatement createPortal(String name, byte[][] parameters, List<Short> parameterFormatCodes, List<Short> resultFormatCodes)

Creates a portal from this statement.

Parameters
Name Description
name String
parameters byte[][]
parameterFormatCodes List<Short>

A list of the format of each parameter.

resultFormatCodes List<Short>

A list of the desired format of each result.

Returns
Type Description
IntermediatePortalStatement

An Intermediate Portal Statement (or rather a bound version of this statement)

describe()

public DescribeResult describe()

Moreso meant for inherited classes, allows one to call describe on a statement. Since raw statements cannot be described, throw an error.

Returns
Type Description
DescribeResult
Overrides

describeAsync(BackendConnection backendConnection)

public Future<StatementResult> describeAsync(BackendConnection backendConnection)
Parameter
Name Description
backendConnection BackendConnection
Returns
Type Description
Future<StatementResult>
Overrides

getGivenParameterDataTypes()

public int[] getGivenParameterDataTypes()
Returns
Type Description
int[]