Class CopyStatement (0.5.1)
Stay organized with collections
Save and categorize content based on your preferences.
public class CopyStatement extends IntermediateStatement
Constructors
public CopyStatement(ConnectionHandler connectionHandler, OptionsMetadata options, AbstractStatementParser.ParsedStatement parsedStatement, Statement originalStatement)
Parameters
Methods
close()
Cleanly close the statement. Does nothing if the statement has not been executed or has no
result.
Overrides
Exceptions
execute()
getCopyColumnNames()
public List<String> getCopyColumnNames()
Returns
Type | Description |
List<String> | 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.
|
getException()
public Exception getException()
Returns
Overrides
public int getFormatCode()
Returns
Type | Description |
int | 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()
Returns
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()
Returns
Overrides
getTableColumns()
public Map<String,TypeCode> getTableColumns()
Returns
Type | Description |
Map<String,com.google.spanner.v1.TypeCode> | Mapping of table column names to column type.
|
getTableName()
public String getTableName()
Returns
getUpdateCount()
public long getUpdateCount()
Returns
Overrides
handleExecutionException(SpannerException exception)
public void handleExecutionException(SpannerException exception)
Clean up and save metadata when an exception occurs.
Parameter
Name | Description |
exception | com.google.cloud.spanner.SpannerException
|
Overrides
public boolean hasHeader()
Returns
Type | Description |
boolean | True if copy data contains a header, false otherwise.
|
public void setParserFormat(CopyTreeParser.CopyOptions options)
CSVFormat for parsing copy data based on COPY statement options specified.
Parameter
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 2024-03-22 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]