Send feedback
Class CopyStatement (0.19.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.19.1 keyboard_arrow_down
public class CopyStatement extends IntermediatePortalStatement
Static Methods
public static IntermediatePortalStatement create ( ConnectionHandler connectionHandler , OptionsMetadata options , String name , AbstractStatementParser . ParsedStatement parsedStatement , Statement originalStatement )
Constructors
public CopyStatement ( ConnectionHandler connectionHandler , OptionsMetadata options , String name , AbstractStatementParser . ParsedStatement parsedStatement , Statement originalStatement , CopyStatement . ParsedCopyStatement parsedCopyStatement )
Parameters Name Description connectionHandler
ConnectionHandler
options
OptionsMetadata
name
String
parsedStatement
ParsedStatement
originalStatement
com.google.cloud.spanner.Statement
parsedCopyStatement
com.google.cloud.spanner.pgadapter.statements.CopyStatement.ParsedCopyStatement
Methods
close()
Cleanly close the statement. Does nothing if the statement has not been executed or has no
result.
Overrides
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.
Overrides
executeAsync(BackendConnection backendConnection)
public void executeAsync ( BackendConnection backendConnection )
Overrides
getCopyColumnNames()
public List<SimpleParser . TableOrIndexName > getCopyColumnNames ()
Returns Type Description List <com.google.cloud.spanner.pgadapter.statements.SimpleParser.TableOrIndexName >
List of column names specified in COPY statement, if provided.
getDelimiterChar()
public char getDelimiterChar ()
Returns Type Description char
Delimiter character specified in COPY statement, if provided.
getEscapeChar()
public char getEscapeChar ()
Returns Type Description char
Escape character specified in COPY statement, if provided.
public byte getFormatCode ()
Returns Type Description byte
0 for text/csv formatting and 1 for binary
public String getFormatType ()
Returns Type Description String
Format type specified in COPY statement, if provided.
getMutationWriter()
public MutationWriter getMutationWriter ()
getNullString()
public String getNullString ()
Returns Type Description String
Null string specified in COPY statement, if provided.
public CSVFormat getParserFormat ()
Returns Type Description org.apache.commons.csv.CSVFormat
getQuoteChar()
public char getQuoteChar ()
Returns Type Description char
Quote character specified in COPY statement, if provided.
getStatementType()
public AbstractStatementParser . StatementType getStatementType ()
Overrides
getTableColumns()
public Map<String , Type > getTableColumns ()
Returns Type Description Map <String ,com.google.cloud.spanner.Type >
Mapping of table column names to column type.
getTableName()
public SimpleParser . TableOrIndexName getTableName ()
Returns Type Description com.google.cloud.spanner.pgadapter.statements.SimpleParser.TableOrIndexName
getUpdateCount()
public long getUpdateCount ()
Returns Type Description long
Overrides
hasException()
public boolean hasException ()
Overrides
public boolean hasHeader ()
Returns Type Description boolean
True if copy data contains a header, false otherwise.
public void setParserFormat ( CopyStatement . ParsedCopyStatement parsedCopyStatement )
CSVFormat for parsing copy data based on COPY statement options specified.
Parameter Name Description parsedCopyStatement
com.google.cloud.spanner.pgadapter.statements.CopyStatement.ParsedCopyStatement
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]