Class GPUdbRecord
Represent the data for a given record in GPUdb. Has convenience functions for encoding/decoding the data.
Create a GPUdbRecord object which holds the data for a given record.
Parameters
A GPUdbRecordType object that describes the columns of this record.
Either a dict or a list that contains the values for the columns. In either case, must contain values for ALL columns. If a list, then the columns must be in the correct order.
Decode binary encoded data (generally returned by GPUdb) using the schema for the data. Return the decoded data.
Parameters
If string, then the schema string for the record type, or a RecordType object representing the type.
The binary encoded data. Could be a single object or a list of data.
Returns
The decoded data (a single object or a list)
Decode binary encoded data (generally returned by GPUdb) using the schema for the data. Return the decoded data.
Parameters
If string, then the schema string for the record type, or a RecordType object representing the type.
The binary encoded data. Could be a single object or a list of data.
Returns
The decoded data (a single object or a list)
Decode binary encoded data in string form (generally returned by GPUdb). Return the decoded data.
Parameters
The stringified JSON encoded data. Could be a single object or a list of data.
Returns
The decoded data (a single object or a list)
Decode JSON encoded data (generally returned by GPUdb) using the embedded dynamic schema for the data. Return the decoded data.
Parameters
The JSON encoded data with a dynamic schema.
The schema string for the data
Returns
The decoded data (a single object or a list)
Decode JSON encoded data (generally returned by GPUdb) using the embedded dynamic schema for the data. Return the decoded data.
Parameters
The JSON encoded data with a dynamic schema.
The schema string for the data
Returns
The decoded data in row-format (a single object or a list)
Given some column major data, convert it to row major data.
Parameters
An OrderedDict of arrays containing the data by column names.
A JSON schema string describing the column major data.
Returns
A list of GPUdbRecord objects.
Given some row major data, convert it to column major data.
Parameters
Record or collections.OrderedDicts) –A list of Record or collections.OrderedDicts objects containing the data.
Returns
A dict of lists where the keys are column names and the values are –
lists (containing the values for the pertinent column of all the records)
The type for this record.
The values for this record.
The values for this record.
The binary encoded values for this record.
The stringified JSON encoded values for this record.
Return a list of the column names of the record.
Return a list of the values of the record.
Insert this record into GPUdb.
Parameters
A GPUdb client handle.
The name of the table into which we need to insert the record.
Optional encoding with which to perform the insertion. Default is binary encoding.
Optional parameter. If given, use the options for the insertion function.
Returns
The response from GPUdb.