Class CopyStatement (0.16.0)
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
Static Methods
create(ConnectionHandler connectionHandler, OptionsMetadata options, String name, AbstractStatementParser.ParsedStatement parsedStatement, Statement originalStatement)
publicstaticIntermediatePortalStatementcreate(ConnectionHandlerconnectionHandler,OptionsMetadataoptions,Stringname,AbstractStatementParser.ParsedStatementparsedStatement,StatementoriginalStatement)originalStatement
com.google.cloud.spanner.StatementConstructors
CopyStatement(ConnectionHandler connectionHandler, OptionsMetadata options, String name, AbstractStatementParser.ParsedStatement parsedStatement, Statement originalStatement, CopyStatement.ParsedCopyStatement parsedCopyStatement)
publicCopyStatement(ConnectionHandlerconnectionHandler,OptionsMetadataoptions,Stringname,AbstractStatementParser.ParsedStatementparsedStatement,StatementoriginalStatement,CopyStatement.ParsedCopyStatementparsedCopyStatement)originalStatement
com.google.cloud.spanner.StatementparsedCopyStatement
com.google.cloud.spanner.pgadapter.statements.CopyStatement.ParsedCopyStatementMethods
close()
publicvoidclose()Cleanly close the statement. Does nothing if the statement has not been executed or has no result.
createPortal(String name, byte[][] parameters, List<Short> parameterFormatCodes, List<Short> resultFormatCodes)
publicIntermediatePortalStatementcreatePortal(Stringname,byte[][]parameters,List<Short>parameterFormatCodes,List<Short>resultFormatCodes)Creates a portal from this statement.
executeAsync(BackendConnection backendConnection)
publicvoidexecuteAsync(BackendConnectionbackendConnection)getCopyColumnNames()
publicList<SimpleParser.TableOrIndexName>getCopyColumnNames()List<com.google.cloud.spanner.pgadapter.statements.SimpleParser.TableOrIndexName>
List of column names specified in COPY statement, if provided.
getDelimiterChar()
publicchargetDelimiterChar()char
Delimiter character specified in COPY statement, if provided.
getEscapeChar()
publicchargetEscapeChar()char
Escape character specified in COPY statement, if provided.
getFormatCode()
publicbytegetFormatCode()byte
0 for text/csv formatting and 1 for binary
getFormatType()
publicStringgetFormatType()String
Format type specified in COPY statement, if provided.
getMutationWriter()
publicMutationWritergetMutationWriter()getNullString()
publicStringgetNullString()String
Null string specified in COPY statement, if provided.
getParserFormat()
publicCSVFormatgetParserFormat()org.apache.commons.csv.CSVFormat
getQuoteChar()
publicchargetQuoteChar()char
Quote character specified in COPY statement, if provided.
getStatementType()
publicAbstractStatementParser.StatementTypegetStatementType()getTableColumns()
publicMap<String,Type>getTableColumns()getTableName()
publicSimpleParser.TableOrIndexNamegetTableName()com.google.cloud.spanner.pgadapter.statements.SimpleParser.TableOrIndexName
getUpdateCount()
publiclonggetUpdateCount()hasException()
publicbooleanhasException()hasHeader()
publicbooleanhasHeader()boolean
True if copy data contains a header, false otherwise.
setParserFormat(CopyStatement.ParsedCopyStatement parsedCopyStatement)
publicvoidsetParserFormat(CopyStatement.ParsedCopyStatementparsedCopyStatement)CSVFormat for parsing copy data based on COPY statement options specified.
parsedCopyStatement
com.google.cloud.spanner.pgadapter.statements.CopyStatement.ParsedCopyStatement