Send feedback
Interface CopyRecord (0.22.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.22.1 keyboard_arrow_down
public interface CopyRecord
CopyRecord is a common interface for COPY data records that are produced by a parser for
a specific COPY format.
Methods
getValue(Type type, int columnIndex)
public abstract Value getValue ( Type type , int columnIndex )
Returns the value of the given column as a Cloud Spanner Value of the given type. This
method is used by a COPY ... FROM ... operation to convert a value to the type of the column
where it is being inserted. This method is supported for all types of CopyRecord .
Parameters Name Description type
com.google.cloud.spanner.Type
columnIndex
int
Returns Type Description com.google.cloud.spanner.Value
getValue(Type type, String columnName)
public abstract Value getValue ( Type type , String columnName )
Returns the value of the given column as a Cloud Spanner Value of the given type. This
method is used by a COPY ... FROM ... operation to convert a value to the type of the column
where it is being inserted. This method can only be used with records that contains column
names.
Parameters Name Description type
com.google.cloud.spanner.Type
columnName
String
Returns Type Description com.google.cloud.spanner.Value
hasColumnNames()
public abstract boolean hasColumnNames ()
Returns true if the copy record has column names. The #getValue(Type, String) method
can only be used for records that have column names.
isEndRecord()
public abstract boolean isEndRecord ()
Returns true if this record is the PG end record (.).
isNull(int columnIndex)
public abstract boolean isNull ( int columnIndex )
Returns true if the value of the given column is null.
Parameter Name Description columnIndex
int
numColumns()
public abstract int numColumns ()
Returns the number of columns in the record.
Returns Type Description int
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 2024-10-01 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"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-10-01 UTC."}
[[["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 2024-10-01 UTC."]]