public class RawInsertRecordsRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.insertRecordsRaw(RawInsertRecordsRequest)
.
options
can be used to customize this function's behavior. The only parameter available is update_on_existing_pk
. The value can be either 'true' or 'false'. If the table has a primary key
and if update_on_existing_pk
is 'true' then if any of the
records being added have the same primary key as existing records, the existing records are replaced (i.e. *updated*) with the
given records. If update_on_existing_pk
is false and if the records being added have the same primary key as existing
records, the given records with existing primary keys are ignored (the existing records are left unchanged). It is quite possible
that in this case some of the given records will be inserted and some (those having existing primary keys) will be ignored (or
updated). If the specified table does not have a primary key column then the update_on_existing_pk
option is ignored.
The Raw version of this method can be used to specify the encoding scheme of the request.Modifier and Type | Class and Description |
---|---|
static class |
RawInsertRecordsRequest.ListEncoding
The encoding of the records to be inserted.
|
static class |
RawInsertRecordsRequest.Options
Optional parameters.
|
Constructor and Description |
---|
RawInsertRecordsRequest()
Constructs a RawInsertRecordsRequest object with default parameters.
|
RawInsertRecordsRequest(String tableName,
List<ByteBuffer> list,
List<String> listStr,
String listEncoding,
Map<String,String> options)
Constructs a RawInsertRecordsRequest object with the specified parameters.
|
RawInsertRecordsRequest(String tableName,
List<ByteBuffer> list,
Map<String,String> options)
Constructs a RawInsertRecordsRequest object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
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.
|
List<ByteBuffer> |
getList()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
String |
getListEncoding()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
List<String> |
getListStr()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
Map<String,String> |
getOptions()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.
|
String |
getTableName()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
int |
hashCode()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called directly by the user.
|
RawInsertRecordsRequest |
setList(List<ByteBuffer> list)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
RawInsertRecordsRequest |
setListEncoding(String listEncoding)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
RawInsertRecordsRequest |
setListStr(List<String> listStr)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
RawInsertRecordsRequest |
setOptions(Map<String,String> options)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
RawInsertRecordsRequest |
setTableName(String tableName)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
String |
toString()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
public RawInsertRecordsRequest()
public RawInsertRecordsRequest(String tableName, List<ByteBuffer> list, Map<String,String> options)
tableName
- Table to which the records are to be added. Must be an existing table.list
- An array of binary-encoded data for the records to be added. All records must be of the same type as that of the
table. Empty array if listEncoding
is json
.options
- Optional parameters.
primary key
, then if the value is 'true' then if any of the records being added have the same primary key as
existing records, the existing records are replaced (i.e. *updated*) with the given records. If 'false' and
if the records being added have the same primary key as existing records, the given records with existing
primary keys are ignored (the existing records are left unchanged). It is quite possible that in this case
some of the given records will be inserted and some (those having existing primary keys) will be ignored (or
updated). If the specified table does not have a primary key column then this optional parameter is ignored.
Values: true, false.
public RawInsertRecordsRequest(String tableName, List<ByteBuffer> list, List<String> listStr, String listEncoding, Map<String,String> options)
tableName
- Table to which the records are to be added. Must be an existing table.list
- An array of binary-encoded data for the records to be added. All records must be of the same type as that of the
table. Empty array if listEncoding
is json
.listStr
- An array of JSON encoded data for the records to be added. All records must be of the same type as that of
the table. Empty array if listEncoding
is binary
.listEncoding
- The encoding of the records to be inserted. Values: binary, json.options
- Optional parameters.
primary key
, then if the value is 'true' then if any of the records being added have the same primary key as
existing records, the existing records are replaced (i.e. *updated*) with the given records. If 'false' and
if the records being added have the same primary key as existing records, the given records with existing
primary keys are ignored (the existing records are left unchanged). It is quite possible that in this case
some of the given records will be inserted and some (those having existing primary keys) will be ignored (or
updated). If the specified table does not have a primary key column then this optional parameter is ignored.
Values: true, false.
public static org.apache.avro.Schema getClassSchema()
public String getTableName()
public RawInsertRecordsRequest setTableName(String tableName)
tableName
- Table to which the records are to be added. Must be an existing table.this
to mimic the builder pattern.public List<ByteBuffer> getList()
listEncoding
is json
.public RawInsertRecordsRequest setList(List<ByteBuffer> list)
list
- An array of binary-encoded data for the records to be added. All records must be of the same type as that of the
table. Empty array if listEncoding
is json
.this
to mimic the builder pattern.public List<String> getListStr()
listEncoding
is binary
.public RawInsertRecordsRequest setListStr(List<String> listStr)
listStr
- An array of JSON encoded data for the records to be added. All records must be of the same type as that of
the table. Empty array if listEncoding
is binary
.this
to mimic the builder pattern.public String getListEncoding()
public RawInsertRecordsRequest setListEncoding(String listEncoding)
listEncoding
- The encoding of the records to be inserted. Values: binary, json.this
to mimic the builder pattern.public Map<String,String> getOptions()
primary
key
, then if the value is 'true' then if any of the records being added have the same primary key as existing
records, the existing records are replaced (i.e. *updated*) with the given records. If 'false' and if the records
being added have the same primary key as existing records, the given records with existing primary keys are ignored
(the existing records are left unchanged). It is quite possible that in this case some of the given records will be
inserted and some (those having existing primary keys) will be ignored (or updated). If the specified table does not
have a primary key column then this optional parameter is ignored. Values: true, false.
public RawInsertRecordsRequest setOptions(Map<String,String> options)
options
- Optional parameters.
primary key
, then if the value is 'true' then if any of the records being added have the same primary key as
existing records, the existing records are replaced (i.e. *updated*) with the given records. If 'false' and
if the records being added have the same primary key as existing records, the given records with existing
primary keys are ignored (the existing records are left unchanged). It is quite possible that in this case
some of the given records will be inserted and some (those having existing primary keys) will be ignored (or
updated). If the specified table does not have a primary key column then this optional parameter is ignored.
Values: true, false.
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
public boolean equals(Object obj)
public String toString()
Copyright © 2016. All rights reserved.