Class QueryResult.Builder (0.1.0)

public static final class QueryResult.Builder extends GeneratedMessage.Builder<QueryResult.Builder> implements QueryResultOrBuilder

QueryResult contains the result of executing a single SQL statement.

Protobuf type google.cloud.sql.v1beta4.QueryResult

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllColumns(Iterable<? extends Column> values)

public QueryResult.Builder addAllColumns(Iterable<? extends Column> values)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.sql.v1beta4.Column>
Returns
Type Description
QueryResult.Builder

addAllRows(Iterable<? extends Row> values)

public QueryResult.Builder addAllRows(Iterable<? extends Row> values)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.sql.v1beta4.Row>
Returns
Type Description
QueryResult.Builder

addColumns(Column value)

public QueryResult.Builder addColumns(Column value)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameter
Name Description
value Column
Returns
Type Description
QueryResult.Builder

addColumns(Column.Builder builderForValue)

public QueryResult.Builder addColumns(Column.Builder builderForValue)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameter
Name Description
builderForValue Column.Builder
Returns
Type Description
QueryResult.Builder

addColumns(int index, Column value)

public QueryResult.Builder addColumns(int index, Column value)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameters
Name Description
index int
value Column
Returns
Type Description
QueryResult.Builder

addColumns(int index, Column.Builder builderForValue)

public QueryResult.Builder addColumns(int index, Column.Builder builderForValue)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameters
Name Description
index int
builderForValue Column.Builder
Returns
Type Description
QueryResult.Builder

addColumnsBuilder()

public Column.Builder addColumnsBuilder()

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Returns
Type Description
Column.Builder

addColumnsBuilder(int index)

public Column.Builder addColumnsBuilder(int index)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameter
Name Description
index int
Returns
Type Description
Column.Builder

addRows(Row value)

public QueryResult.Builder addRows(Row value)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameter
Name Description
value Row
Returns
Type Description
QueryResult.Builder

addRows(Row.Builder builderForValue)

public QueryResult.Builder addRows(Row.Builder builderForValue)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameter
Name Description
builderForValue Row.Builder
Returns
Type Description
QueryResult.Builder

addRows(int index, Row value)

public QueryResult.Builder addRows(int index, Row value)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameters
Name Description
index int
value Row
Returns
Type Description
QueryResult.Builder

addRows(int index, Row.Builder builderForValue)

public QueryResult.Builder addRows(int index, Row.Builder builderForValue)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameters
Name Description
index int
builderForValue Row.Builder
Returns
Type Description
QueryResult.Builder

addRowsBuilder()

public Row.Builder addRowsBuilder()

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Returns
Type Description
Row.Builder

addRowsBuilder(int index)

public Row.Builder addRowsBuilder(int index)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameter
Name Description
index int
Returns
Type Description
Row.Builder

build()

public QueryResult build()
Returns
Type Description
QueryResult

buildPartial()

public QueryResult buildPartial()
Returns
Type Description
QueryResult

clear()

public QueryResult.Builder clear()
Returns
Type Description
QueryResult.Builder
Overrides

clearColumns()

public QueryResult.Builder clearColumns()

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Returns
Type Description
QueryResult.Builder

clearMessage()

public QueryResult.Builder clearMessage()

Message related to the SQL execution result.

string message = 3;

Returns
Type Description
QueryResult.Builder

This builder for chaining.

clearPartialResult()

public QueryResult.Builder clearPartialResult()

Set to true if the SQL execution's result is truncated due to size limits or an error retrieving results.

bool partial_result = 4;

Returns
Type Description
QueryResult.Builder

This builder for chaining.

clearRows()

public QueryResult.Builder clearRows()

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Returns
Type Description
QueryResult.Builder

clearStatus()

public QueryResult.Builder clearStatus()

If results were truncated due to an error, details of that error.

.google.rpc.Status status = 8;

Returns
Type Description
QueryResult.Builder

getColumns(int index)

public Column getColumns(int index)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameter
Name Description
index int
Returns
Type Description
Column

getColumnsBuilder(int index)

public Column.Builder getColumnsBuilder(int index)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameter
Name Description
index int
Returns
Type Description
Column.Builder

getColumnsBuilderList()

public List<Column.Builder> getColumnsBuilderList()

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Returns
Type Description
List<Builder>

getColumnsCount()

public int getColumnsCount()

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Returns
Type Description
int

getColumnsList()

public List<Column> getColumnsList()

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Returns
Type Description
List<Column>

getColumnsOrBuilder(int index)

public ColumnOrBuilder getColumnsOrBuilder(int index)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameter
Name Description
index int
Returns
Type Description
ColumnOrBuilder

getColumnsOrBuilderList()

public List<? extends ColumnOrBuilder> getColumnsOrBuilderList()

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Returns
Type Description
List<? extends com.google.cloud.sql.v1beta4.ColumnOrBuilder>

getDefaultInstanceForType()

public QueryResult getDefaultInstanceForType()
Returns
Type Description
QueryResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMessage()

public String getMessage()

Message related to the SQL execution result.

string message = 3;

Returns
Type Description
String

The message.

getMessageBytes()

public ByteString getMessageBytes()

Message related to the SQL execution result.

string message = 3;

Returns
Type Description
ByteString

The bytes for message.

getPartialResult()

public boolean getPartialResult()

Set to true if the SQL execution's result is truncated due to size limits or an error retrieving results.

bool partial_result = 4;

Returns
Type Description
boolean

The partialResult.

getRows(int index)

public Row getRows(int index)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameter
Name Description
index int
Returns
Type Description
Row

getRowsBuilder(int index)

public Row.Builder getRowsBuilder(int index)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameter
Name Description
index int
Returns
Type Description
Row.Builder

getRowsBuilderList()

public List<Row.Builder> getRowsBuilderList()

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Returns
Type Description
List<Builder>

getRowsCount()

public int getRowsCount()

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Returns
Type Description
int

getRowsList()

public List<Row> getRowsList()

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Returns
Type Description
List<Row>

getRowsOrBuilder(int index)

public RowOrBuilder getRowsOrBuilder(int index)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameter
Name Description
index int
Returns
Type Description
RowOrBuilder

getRowsOrBuilderList()

public List<? extends RowOrBuilder> getRowsOrBuilderList()

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Returns
Type Description
List<? extends com.google.cloud.sql.v1beta4.RowOrBuilder>

getStatus()

public Status getStatus()

If results were truncated due to an error, details of that error.

.google.rpc.Status status = 8;

Returns
Type Description
com.google.rpc.Status

The status.

getStatusBuilder()

public Status.Builder getStatusBuilder()

If results were truncated due to an error, details of that error.

.google.rpc.Status status = 8;

Returns
Type Description
com.google.rpc.Status.Builder

getStatusOrBuilder()

public StatusOrBuilder getStatusOrBuilder()

If results were truncated due to an error, details of that error.

.google.rpc.Status status = 8;

Returns
Type Description
com.google.rpc.StatusOrBuilder

hasStatus()

public boolean hasStatus()

If results were truncated due to an error, details of that error.

.google.rpc.Status status = 8;

Returns
Type Description
boolean

Whether the status field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(QueryResult other)

public QueryResult.Builder mergeFrom(QueryResult other)
Parameter
Name Description
other QueryResult
Returns
Type Description
QueryResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public QueryResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
QueryResult.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public QueryResult.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
QueryResult.Builder
Overrides

mergeStatus(Status value)

public QueryResult.Builder mergeStatus(Status value)

If results were truncated due to an error, details of that error.

.google.rpc.Status status = 8;

Parameter
Name Description
value com.google.rpc.Status
Returns
Type Description
QueryResult.Builder

removeColumns(int index)

public QueryResult.Builder removeColumns(int index)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameter
Name Description
index int
Returns
Type Description
QueryResult.Builder

removeRows(int index)

public QueryResult.Builder removeRows(int index)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameter
Name Description
index int
Returns
Type Description
QueryResult.Builder

setColumns(int index, Column value)

public QueryResult.Builder setColumns(int index, Column value)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameters
Name Description
index int
value Column
Returns
Type Description
QueryResult.Builder

setColumns(int index, Column.Builder builderForValue)

public QueryResult.Builder setColumns(int index, Column.Builder builderForValue)

List of columns included in the result. This also includes the data type of the column.

repeated .google.cloud.sql.v1beta4.Column columns = 1;

Parameters
Name Description
index int
builderForValue Column.Builder
Returns
Type Description
QueryResult.Builder

setMessage(String value)

public QueryResult.Builder setMessage(String value)

Message related to the SQL execution result.

string message = 3;

Parameter
Name Description
value String

The message to set.

Returns
Type Description
QueryResult.Builder

This builder for chaining.

setMessageBytes(ByteString value)

public QueryResult.Builder setMessageBytes(ByteString value)

Message related to the SQL execution result.

string message = 3;

Parameter
Name Description
value ByteString

The bytes for message to set.

Returns
Type Description
QueryResult.Builder

This builder for chaining.

setPartialResult(boolean value)

public QueryResult.Builder setPartialResult(boolean value)

Set to true if the SQL execution's result is truncated due to size limits or an error retrieving results.

bool partial_result = 4;

Parameter
Name Description
value boolean

The partialResult to set.

Returns
Type Description
QueryResult.Builder

This builder for chaining.

setRows(int index, Row value)

public QueryResult.Builder setRows(int index, Row value)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameters
Name Description
index int
value Row
Returns
Type Description
QueryResult.Builder

setRows(int index, Row.Builder builderForValue)

public QueryResult.Builder setRows(int index, Row.Builder builderForValue)

Rows returned by the SQL statement.

repeated .google.cloud.sql.v1beta4.Row rows = 2;

Parameters
Name Description
index int
builderForValue Row.Builder
Returns
Type Description
QueryResult.Builder

setStatus(Status value)

public QueryResult.Builder setStatus(Status value)

If results were truncated due to an error, details of that error.

.google.rpc.Status status = 8;

Parameter
Name Description
value com.google.rpc.Status
Returns
Type Description
QueryResult.Builder

setStatus(Status.Builder builderForValue)

public QueryResult.Builder setStatus(Status.Builder builderForValue)

If results were truncated due to an error, details of that error.

.google.rpc.Status status = 8;

Parameter
Name Description
builderForValue com.google.rpc.Status.Builder
Returns
Type Description
QueryResult.Builder