Class CopyToStatement (0.7.0)

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
TypeDescription
byte[]

Constructors

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

public CopyToStatement(ConnectionHandler connectionHandler, OptionsMetadata options, String name, CopyTreeParser.CopyOptions copyOptions)
Parameters
NameDescription
connectionHandlerConnectionHandler
optionsOptionsMetadata
nameString
copyOptionsCopyTreeParser.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
NameDescription
nameString
parametersbyte[][]
parameterFormatCodesList<Short>
resultFormatCodesList<Short>
Returns
TypeDescription
IntermediatePortalStatement
Overrides

containsResultSet()

public boolean containsResultSet()
Returns
TypeDescription
boolean
Overrides

createDataRowResponse(ResultSet resultSet, ConnectionHandler.QueryMode mode)

public CopyDataResponse createDataRowResponse(ResultSet resultSet, ConnectionHandler.QueryMode mode)
Parameters
NameDescription
resultSetcom.google.cloud.spanner.ResultSet
modeConnectionHandler.QueryMode
Returns
TypeDescription
CopyDataResponse
Overrides

createResultPrefix(ResultSet resultSet)

public WireOutput[] createResultPrefix(ResultSet resultSet)
Parameter
NameDescription
resultSetcom.google.cloud.spanner.ResultSet
Returns
TypeDescription
WireOutput[]
Overrides

createResultSuffix()

public WireOutput[] createResultSuffix()
Returns
TypeDescription
WireOutput[]
Overrides

describeAsync(BackendConnection backendConnection)

public Future<DescribePortalMetadata> describeAsync(BackendConnection backendConnection)
Parameter
NameDescription
backendConnectionBackendConnection
Returns
TypeDescription
Future<DescribePortalMetadata>
Overrides

executeAsync(BackendConnection backendConnection)

public void executeAsync(BackendConnection backendConnection)
Parameter
NameDescription
backendConnectionBackendConnection
Overrides

getCommandTag()

public String getCommandTag()
Returns
TypeDescription
String
Overrides

getStatementType()

public AbstractStatementParser.StatementType getStatementType()
Returns
TypeDescription
StatementType
Overrides