Class CopyStatement (0.6.1)
Stay organized with collections
Save and categorize content based on your preferences.
publicclass CopyStatementextendsIntermediatePortalStatementCopyStatement models a COPY table FROM STDIN 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.
Inheritance
java.lang.Object > IntermediateStatement > IntermediatePreparedStatement > IntermediatePortalStatement > CopyStatementInherited Members
Constructors
CopyStatement(ConnectionHandler connectionHandler, OptionsMetadata options, String name, AbstractStatementParser.ParsedStatement parsedStatement, Statement originalStatement)
publicCopyStatement(ConnectionHandlerconnectionHandler,OptionsMetadataoptions,Stringname,AbstractStatementParser.ParsedStatementparsedStatement,StatementoriginalStatement)com.google.cloud.spanner.StatementMethods
bind(String name, byte[][] parameters, List<Short> parameterFormatCodes, List<Short> resultFormatCodes)
publicIntermediatePortalStatementbind(Stringname,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.
close()
publicvoidclose()Cleanly close the statement. Does nothing if the statement has not been executed or has no result.
executeAsync(BackendConnection backendConnection)
publicvoidexecuteAsync(BackendConnectionbackendConnection)getCopyColumnNames()
publicList<String>getCopyColumnNames()getDelimiterChar()
publicchargetDelimiterChar()Delimiter character specified in COPY statement, if provided.
getEscapeChar()
publicchargetEscapeChar()Escape character specified in COPY statement, if provided.
getException()
publicSpannerExceptiongetException()Returns any execution exception registered for this statement.
getFormatCode()
publicintgetFormatCode()0 for text/csv formatting and 1 for binary
getFormatType()
publicStringgetFormatType()Format type specified in COPY statement, if provided.
getMutationWriter()
publicMutationWritergetMutationWriter()getNullString()
publicStringgetNullString()Null string specified in COPY statement, if provided.
getParserFormat()
publicCSVFormatgetParserFormat()getQuoteChar()
publicchargetQuoteChar()Quote character specified in COPY statement, if provided.
getStatementType()
publicAbstractStatementParser.StatementTypegetStatementType()getTableColumns()
publicMap<String,Type>getTableColumns()getTableName()
publicStringgetTableName()getUpdateCount()
publiclonggetUpdateCount()hasException()
publicbooleanhasException()hasHeader()
publicbooleanhasHeader()True if copy data contains a header, false otherwise.
setParserFormat(CopyTreeParser.CopyOptions options)
publicvoidsetParserFormat(CopyTreeParser.CopyOptionsoptions)CSVFormat for parsing copy data based on COPY statement options specified.