public class GetRecordsFromCollectionRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.getRecordsFromCollection
.
Retrieves records from a collection. The operation can optionally return the
record IDs which can be used in certain queries such as GPUdb.deleteRecords
.
This operation supports paging through the data via the offset
and limit
parameters.
Note that when using the Java API, it is not possible to retrieve records from join views using this operation. (DEPRECATED)
Modifier and Type | Class and Description |
---|---|
static class |
GetRecordsFromCollectionRequest.Encoding
A set of string constants for the
GetRecordsFromCollectionRequest parameter encoding . |
static class |
GetRecordsFromCollectionRequest.Options
A set of string constants for the
GetRecordsFromCollectionRequest parameter options . |
Constructor and Description |
---|
GetRecordsFromCollectionRequest()
Constructs a GetRecordsFromCollectionRequest object with default
parameters.
|
GetRecordsFromCollectionRequest(String tableName,
long offset,
long limit,
Map<String,String> options)
Constructs a GetRecordsFromCollectionRequest object with the specified
parameters.
|
GetRecordsFromCollectionRequest(String tableName,
long offset,
long limit,
String encoding,
Map<String,String> options)
Constructs a GetRecordsFromCollectionRequest object with the specified
parameters.
|
Modifier and Type | Method and Description | ||
---|---|---|---|
boolean |
equals(Object obj) |
||
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
String |
getEncoding()
|
||
long |
getLimit()
A positive integer indicating the maximum number of results to be
returned, or END_OF_SET (-9999) to indicate that the maximum number of
results allowed by the server should be returned.
|
||
long |
getOffset()
A positive integer indicating the number of initial results to skip
(this can be useful for paging through the results).
|
||
Map<String,String> |
getOptions()
RETURN_RECORD_IDS : If TRUE then return the internal record ID along with
each returned record. |
||
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
String |
getTableName()
Name of the collection or table from which records are to be retrieved,
in [schema_name.]table_name format, using standard
int hashCode() | ||
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
GetRecordsFromCollectionRequest |
setEncoding(String encoding)
|
||
GetRecordsFromCollectionRequest |
setLimit(long limit)
A positive integer indicating the maximum number of results to be
returned, or END_OF_SET (-9999) to indicate that the maximum number of
results allowed by the server should be returned.
|
||
GetRecordsFromCollectionRequest |
setOffset(long offset)
A positive integer indicating the number of initial results to skip
(this can be useful for paging through the results).
|
||
GetRecordsFromCollectionRequest |
setOptions(Map<String,String> options)
RETURN_RECORD_IDS : If TRUE then return the internal record ID along with
each returned record. |
||
GetRecordsFromCollectionRequest |
setTableName(String tableName)
|
public GetRecordsFromCollectionRequest()
public GetRecordsFromCollectionRequest(String tableName, long offset, long limit, Map<String,String> options)
tableName
- Name of the collection or table from which records are
to be retrieved, in [schema_name.]table_name format,
using standard name resolution rules. Must be an
existing collection or table.offset
- A positive integer indicating the number of initial
results to skip (this can be useful for paging through
the results). The default value is 0. The minimum allowed
value is 0. The maximum allowed value is MAX_INT.limit
- A positive integer indicating the maximum number of
results to be returned, or END_OF_SET (-9999) to indicate
that the maximum number of results allowed by the server
should be returned. The number of records returned will
never exceed the server's own limit, defined by the max_get_records_size parameter in the
server configuration. Use offset
& limit
to request subsequent pages of results. The default value
is -9999.options
- RETURN_RECORD_IDS
: If TRUE
then return the internal record ID along with
each returned record.
Supported values:
The default value is FALSE
.
EXPRESSION
: Optional
filter expression to apply to the table. The
default value is ''.
Map
.public GetRecordsFromCollectionRequest(String tableName, long offset, long limit, String encoding, Map<String,String> options)
tableName
- Name of the collection or table from which records are
to be retrieved, in [schema_name.]table_name format,
using standard name resolution rules. Must be an
existing collection or table.offset
- A positive integer indicating the number of initial
results to skip (this can be useful for paging through
the results). The default value is 0. The minimum allowed
value is 0. The maximum allowed value is MAX_INT.limit
- A positive integer indicating the maximum number of
results to be returned, or END_OF_SET (-9999) to indicate
that the maximum number of results allowed by the server
should be returned. The number of records returned will
never exceed the server's own limit, defined by the max_get_records_size parameter in the
server configuration. Use offset
& limit
to request subsequent pages of results. The default value
is -9999.encoding
- Specifies the encoding for returned records; either
BINARY
or JSON
.
Supported values:
The default value is BINARY
.options
- RETURN_RECORD_IDS
: If TRUE
then return the internal record ID along with
each returned record.
Supported values:
The default value is FALSE
.
EXPRESSION
: Optional
filter expression to apply to the table. The
default value is ''.
Map
.public static org.apache.avro.Schema getClassSchema()
public String getTableName()
tableName
.public GetRecordsFromCollectionRequest setTableName(String tableName)
tableName
- The new value for tableName
.this
to mimic the builder pattern.public long getOffset()
offset
.public GetRecordsFromCollectionRequest setOffset(long offset)
offset
- The new value for offset
.this
to mimic the builder pattern.public long getLimit()
offset
& limit
to request subsequent pages of results. The default value is
-9999.limit
.public GetRecordsFromCollectionRequest setLimit(long limit)
offset
& limit
to request subsequent pages of results. The default value is
-9999.limit
- The new value for limit
.this
to mimic the builder pattern.public String getEncoding()
BINARY
or JSON
.
Supported values:
The default value is BINARY
.encoding
.public GetRecordsFromCollectionRequest setEncoding(String encoding)
BINARY
or JSON
.
Supported values:
The default value is BINARY
.encoding
- The new value for encoding
.this
to mimic the builder pattern.public Map<String,String> getOptions()
RETURN_RECORD_IDS
: If TRUE
then return the internal record ID along with
each returned record.
Supported values:
The default value is FALSE
.
EXPRESSION
: Optional filter
expression to apply to the table. The default value is ''.
Map
.options
.public GetRecordsFromCollectionRequest setOptions(Map<String,String> options)
RETURN_RECORD_IDS
: If TRUE
then return the internal record ID along with
each returned record.
Supported values:
The default value is FALSE
.
EXPRESSION
: Optional filter
expression to apply to the table. The default value is ''.
Map
.options
- The new value for options
.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2025. All rights reserved.