Class Converter (0.15.0)

publicclass ConverterimplementsAutoCloseable

Utility class for converting between generic PostgreSQL conversions.

Inheritance

java.lang.Object > Converter

Implements

AutoCloseable

Static Methods

convertToPG(ResultSet result, int position, ProxyServer.DataFormat format, SessionState sessionState)

publicstaticbyte[]convertToPG(ResultSetresult,intposition,ProxyServer.DataFormatformat,SessionStatesessionState)

Return the data of the specified column of the ResultSet as a byte array. The column may not contain a null value.

Parameters
Name Description
result com.google.cloud.spanner.ResultSet

The ResultSet to read the data from.

position int

The column index.

format ProxyServer.DataFormat

The DataFormat format to use to encode the data.

sessionState SessionState
Returns
Type Description
byte[]

a byte array containing the data in the specified format.

Constructors

Converter(IntermediateStatement statement, ConnectionHandler.QueryMode mode, OptionsMetadata options, ResultSet resultSet)

publicConverter(IntermediateStatementstatement,ConnectionHandler.QueryModemode,OptionsMetadataoptions,ResultSetresultSet)
Parameters
Name Description
options OptionsMetadata
resultSet com.google.cloud.spanner.ResultSet

Methods

close()

publicvoidclose()
Exceptions
Type Description

convertResultSetRowToDataRowResponse()

publicintconvertResultSetRowToDataRowResponse()
Returns
Type Description
int
Exceptions
Type Description

getResultSet()

publicResultSetgetResultSet()
Returns
Type Description
com.google.cloud.spanner.ResultSet

writeBuffer(DataOutputStream outputStream)

publicvoidwriteBuffer(DataOutputStreamoutputStream)
Parameter
Name Description
outputStream DataOutputStream
Exceptions
Type Description

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年10月30日 UTC.