Class CopyToStatement (0.6.1)

public class CopyToStatement extends IntermediatePortalStatement

CopyStatement models a COPY table TO STDOUT statement. The same class is used both as an IntermediatePreparedStatement and IntermediatePortalStatement, as COPY does not support any statement parameters, which means that there is no difference between the two.

Static Fields

COPY_BINARY_HEADER

public static final byte[] COPY_BINARY_HEADER
Field Value
Type Description
byte[]

Constructors

CopyToStatement(ConnectionHandler connectionHandler, OptionsMetadata options, String name, CopyTreeParser.CopyOptions copyOptions)

public CopyToStatement(ConnectionHandler connectionHandler, OptionsMetadata options, String name, CopyTreeParser.CopyOptions copyOptions)
Parameters
Name Description
connectionHandler ConnectionHandler
options OptionsMetadata
name String
copyOptions CopyTreeParser.CopyOptions

Methods

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

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

Bind this statement (that is to say, transform it into a portal by giving it the data items to complete the statement.

Parameters
Name Description
name String
parameters byte[][]
parameterFormatCodes List<Short>
resultFormatCodes List<Short>
Returns
Type Description
IntermediatePortalStatement
Overrides

containsResultSet()

public boolean containsResultSet()
Returns
Type Description
boolean
Overrides

createDataRowResponse(ResultSet resultSet, ConnectionHandler.QueryMode mode)

public CopyDataResponse createDataRowResponse(ResultSet resultSet, ConnectionHandler.QueryMode mode)
Parameters
Name Description
resultSet com.google.cloud.spanner.ResultSet
mode ConnectionHandler.QueryMode
Returns
Type Description
CopyDataResponse
Overrides

createResultPrefix(ResultSet resultSet)

public WireOutput[] createResultPrefix(ResultSet resultSet)
Parameter
Name Description
resultSet com.google.cloud.spanner.ResultSet
Returns
Type Description
WireOutput[]
Overrides

createResultSuffix()

public WireOutput[] createResultSuffix()
Returns
Type Description
WireOutput[]
Overrides

describeAsync(BackendConnection backendConnection)

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

executeAsync(BackendConnection backendConnection)

public void executeAsync(BackendConnection backendConnection)
Parameter
Name Description
backendConnection BackendConnection
Overrides

getCommandTag()

public String getCommandTag()
Returns
Type Description
String
Overrides

getStatementType()

public AbstractStatementParser.StatementType getStatementType()
Returns
Type Description
StatementType
Overrides