The SWC-DB Thrift Protocol & Supported Languages
The Supported Languages by SWC-DB Thrift
Available SWC-DB Thrift Client Service libraries:
Additional only generated SWC-DB Thrift Client Service:
Languages Support can be extended upto supported languages by Apache-Thrift
Some of use cases can be found at:
The SWC-DB Thrift Modules
Constants
Constant | Type | Value | |
---|---|---|---|
TIMESTAMP_NULL | i64 | -9223372036854775807 | The TIMESTAMP NULL value |
TIMESTAMP_AUTO | i64 | -9223372036854775806 | The TIMESTAMP AUTO value |
COUNTER_OP_EQUAL | i8 | 1 | The COUNTER equal operation |
FU_CTRL_DEFAULT | i8 | 0 | A control bit of default-state |
FU_CTRL_NO_ADD_FIELD | i8 | 1 | A control bit to not add a new field in case a field for update does not exist (Except for BY_INDEX OP) |
FU_CTRL_DELETE_FIELD | i8 | 2 | A control bit to delete the given field |
FU_CTRL_VALUE_SET | i8 | 4 | A control bit to add/set if not exists (only available with OP used by BY_UNIQUE OR BY_COND in List field-types ) |
FU_CTRL_VALUE_DEL | i8 | 8 | A control bit delete any that exist (only available with OP used by BY_UNIQUE OR BY_COND in List field-types ) |
Enumerations
Enumeration: KeySeq
Column Key Sequences
Name | Value | Description |
---|---|---|
UNKNOWN | 0 | Unknown/Unrecognized Type |
LEXIC | 1 | The Lexical Key Order Sequence |
VOLUME | 2 | The Volumetric Key Order Sequence |
FC_LEXIC | 3 | The by Fractions Count on Lexical Key Order Sequence |
FC_VOLUME | 4 | The by Fractions Count on Volumetric Key Order Sequence |
Enumeration: ColumnType
Column Value Types
Name | Value | Description |
---|---|---|
UNKNOWN | 0 | Unknown/Unrecognized Type |
PLAIN | 1 | A Plain Column Value |
COUNTER_I64 | 2 | A Counter Column Value with integrity of signed-64bit |
COUNTER_I32 | 3 | A Counter Column Value with integrity of signed-32bit |
COUNTER_I16 | 4 | A Counter Column Value with integrity of signed-16bit |
COUNTER_I8 | 5 | A Counter Column Value with integrity of signed-8bit |
SERIAL | 6 | A Serial Column Value |
CELL_DEFINED | 15 | Not used - experimental |
Enumeration: EncodingType
Data Encoding Types
Name | Value | Description |
---|---|---|
DEFAULT | 0 | Encoding by Ranger DEFAULT configurations |
PLAIN | 1 | No Encoding |
ZLIB | 2 | Encode with zlib |
SNAPPY | 3 | Encode with snappy |
ZSTD | 4 | Encode with zstandard |
UNKNOWN | 255 | Unrecognized Type |
Enumeration: SchemaFunc
Manage Columns schema function Flags
Name | Value | Description |
---|---|---|
CREATE | 3 | Create Column Function |
REMOVE | 5 | Delete Column Function |
MODIFY | 7 | Modify Column Function |
Enumeration: Comp
The available logical Comparators, plus extended logic options applied with ‘v' for VOLUME
Name | Value | Description |
---|---|---|
NONE | 0 | [ ] : none (no comparison applied) |
PF | 1 | [ =^ ] : -pf [prefix] (starts-with) |
GT | 2 | [ > ] : -gt (greater-than) |
GE | 3 | [ >= ] : -ge (greater-equal) |
EQ | 4 | [ = ] : -eq (equal) |
LE | 5 | [ <= ] : -le (lower-equal) |
LT | 6 | [ < ] : -lt (lower-than) |
NE | 7 | [ != ] : -ne (not-equal) |
RE | 8 | [ re ] : -re [r,regexp] (regular-expression) |
VGT | 9 | [ v> ] : -vgt (vol greater-than) |
VGE | 10 | [ v>= ] : -vge (vol greater-equal) |
VLE | 11 | [ v<= ] : -vle (vol lower-equal) |
VLT | 12 | [ v< ] : -vlt (vol lower-than) |
SBS | 13 | [ %> ] : -subset [sbs] (subset) |
SPS | 14 | [ <% ] : -supset [sps] (superset) |
POSBS | 15 | [ ~> ] : -posubset [posbs] (eq/part ordered subset) |
POSPS | 16 | [ <~ ] : -posupset [posps] (eq/part ordered superset) |
FOSBS | 17 | [ -> ] : -fosubset [fosbs] (eq/full ordered subset) |
FOSPS | 18 | [ <- ] : -fosupset [fosps] (eq/full ordered superset) |
FIP | 19 | [ :< ] : -fip (fraction include prior) |
FI | 20 | [ : ] : -fi (fraction include) |
Enumeration: SpecFlagsOpt
The Scan options Flags Specifications for the SpecFlags ‘options' bit
Name | Value | Description |
---|---|---|
NONE | 0 | No Flag Applied |
LIMIT_BY_KEYS | 1 | Cells Limit by Keys |
OFFSET_BY_KEYS | 4 | Cells Offset by Keys |
ONLY_KEYS | 8 | Select Cells Only Keys without Value data |
ONLY_DELETES | 10 | Select Cells Only with DELETE(cell-flag) |
Enumeration: UpdateOP
Name | Value | Description |
---|---|---|
REPLACE | 0 | The OP supported by column-types: PLAIN, SERIAL, COUNTER. Replaces with the update value (default as well if other OP not supported by the col-type) |
APPEND | 1 | The OP supported by column-types: PLAIN, SERIAL. Appends the update value to the cell's current |
PREPEND | 2 | The OP supported by column-types: PLAIN, SERIAL. Prepends the update value to the cell's current |
INSERT | 3 | The OP supported by column-type PLAIN. Inserts the update value at position in current value (appends if pos above value) |
OVERWRITE | 4 | The OP supported by column-type PLAIN. Overwrites the current value at position with new value (appends if pos above value) |
SERIAL | 5 | The OP supported by column-type SERIAL. update is done by the inner serial-fields defintions |
Enumeration: SpecIntervalOptions
The Scan Interval Specs Options for the SpecIntervalPlain, SpecIntervalCounter and SpecIntervalSerial ‘options' bit
Name | Value | Description |
---|---|---|
UPDATING | 4 | Update Bit Option |
DELETING | 8 | Delete Bit Option |
Enumeration: Flag
The Cell Flag
Name | Value | Description |
---|---|---|
NONE | 0 | Unknown/Undefined |
INSERT | 1 | The Cell is an insert |
DELETE_LE | 2 | The Cell is a delete versions lower-equal |
DELETE_EQ | 3 | The Cell is a delete version equal |
Enumeration: FU_MATH_OP
MATH Operations for Serial Field Update of types INT64 and DOUBLE
Name | Value | Description |
---|---|---|
EQUAL | 0 | set field value to the new value |
PLUS | 1 | plus new value to field's value (negative number allowed) |
MULTIPLY | 2 | multiply current value by update value |
DIVIDE | 3 | divide current value by the new value (ignored at zero) |
Enumeration: FU_LIST_OP
LIST Operations for Serial Field Update of array/list/bytes with LIST-op in the inner SERIAL fields
Name | Value | Description |
---|---|---|
REPLACE | 0 | Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Replaces with the update value |
APPEND | 1 | Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Appends the update value to a field value |
PREPEND | 2 | Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Prepends the update value to a field value |
INSERT | 3 | Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Insert the update value at position in a field value (appends if pos above value) |
OVERWRITE | 4 | Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Overwrites a field value at position with new value (appends if pos above value) |
ERASE | 5 | Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Erases the position in a field value |
BY_UNIQUE | 6 | Supported by field-types: LIST_BYTES, LIST_INT64. The field value items have CTRL_VALUE_SET/DEL OP |
BY_COND | 7 | Supported by field-types: LIST_BYTES, LIST_INT64. The field value items have CTRL_VALUE_SET/DEL OP and Comparator |
BY_INDEX | 8 | Supported by field-types: LIST_BYTES, LIST_INT64. The field value is with Postion and OP in items |
Enumeration: CellsResult
The Cells Results types for using with CellsGroup requests
Name | Value | Description |
---|---|---|
IN_LIST | 0 | Correspond to result on Cells (Cells in list) |
ON_COLUMN | 1 | Correspond to result on CCells (Columns Cells) |
ON_KEY | 2 | Correspond to result on KCells (Keys Cells) |
ON_FRACTION | 3 | Correspond to result on FCells (Fraction Cells) |
Type declarations
Typedef: Schemas
A list-container of Schemas
Base type: list<Schema
>
Typedef: Key
A Cell Key defined as binary(bytes) items in a list-container
Base type: list<binary
>
Typedef: SpecValueSerialFields
The Serial Cell Value Specifications defined as SpecValueSerialField items in a list-container
Base type: list<SpecValueSerialField
>
Typedef: SpecValuesPlain
The Cell Value Specifications defined as SpecValuePlain items in a list-container
Base type: list<SpecValuePlain
>
Typedef: SpecValuesCounter
The Cell Value Specifications defined as SpecValueCounter items in a list-container
Base type: list<SpecValueCounter
>
Typedef: SpecValuesSerial
The Cell Value Specifications defined as SpecValueSerial items in a list-container
Base type: list<SpecValueSerial
>
Typedef: SpecKey
The Key Specifications defined as SpecFraction items in a list-container
Base type: list<SpecFraction
>
Typedef: SpecKeyIntervals
The Key Intervals Specifications defined as SpecKeyInterval items in a list-container
Base type: list<SpecKeyInterval
>
Typedef: UCellsPlain
The Cells for Update defined as UCellPlain items in a list-container
Base type: list<UCellPlain
>
Typedef: UCCellsPlain
The Cells for Update for a Column Id defined as UCellsPlain items in a map-container by CID
Base type: map<i64
, UCellsPlain
>
Typedef: UCellsCounter
The Cells for Update defined as UCellCounter items in a list-container
Base type: list<UCellCounter
>
Typedef: UCCellsCounter
The Cells for Update for a Column Id defined as UCellsCounter items in a map-container by CID
Base type: map<i64
, UCellsCounter
>
Typedef: CellValuesSerial
The Serial Cell Value Fields defined as CellValueSerial items in a list-container
Base type: list<CellValueSerial
>
Typedef: CellValuesSerialOp
The Serial Cell Value Fields defined as CellValueSerialOp items in a list-container
Base type: list<CellValueSerialOp
>
Typedef: UCellsSerial
The Cells for Update defined as UCellSerial items in a list-container
Base type: list<UCellSerial
>
Typedef: UCCellsSerial
The Cells for Update for a Column Id defined as UCellsSerial items in a map-container by CID
Base type: map<i64
, UCellsSerial
>
Typedef: CellsPlain
A list-container of Plain Cells
Base type: list<CellPlain
>
Typedef: CellsCounter
A list-container of Counter Cells
Base type: list<CellCounter
>
Typedef: CellsSerial
A list-container of Serial Cells
Base type: list<CellSerial
>
Typedef: CCells
The Columns Cells for results on Columns of scan, defined as cCells items in a map-container by Column Name
Base type: map<string
, cCells
>
Typedef: KCells
The Keys Cells for results on Key of scan, defined as kCells items in a list-container
Base type: list<kCells
>
Typedef: CompactResults
The Compact Results, defined as CompactResult items in a list-container
Base type: list<CompactResult
>
Data structures
Exception: Exception
The SWC::Thrift::Exception a base for any Exceptions both for the Thrift-Protocol and SWC-DB Errors.
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | code | i32 | The corresponding Thrift-Procotol or SWC-DB Error Code | default | |
2 | message | string | The message describing the error code | default |
Struct: Schema
The Schema Definition
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | cid | i64 | Column ID | optional | |
2 | col_name | string | Column Name | optional | |
3 | col_tags | list<string > | Column Tags | default | |
4 | col_seq | KeySeq | Column Key Sequence | optional | |
5 | col_type | ColumnType | Column Type | optional | |
6 | cell_versions | i32 | Cell Versions | optional | |
7 | cell_ttl | i32 | Cell Time to Live | optional | |
8 | blk_encoding | EncodingType | Block Encoding | optional | |
9 | blk_size | i32 | Block Size in Bytes | optional | |
10 | blk_cells | i32 | Number of Cells in Block | optional | |
11 | cs_replication | i8 | CellStore file Replication | optional | |
12 | cs_size | i32 | CellStore Size in Bytes | optional | |
13 | cs_max | i8 | Max CellStores in a Range | optional | |
14 | log_rollout_ratio | i8 | Write Fragment File on ratio reached | optional | |
15 | log_compact_cointervaling | i8 | Min. Cointervaling Fragments for Compaction | optional | |
16 | log_fragment_preload | i8 | Number of Fragment to Preload | optional | |
17 | compact_percent | i8 | Compact at percent reach | optional | |
18 | revision | i64 | Schema's revision/id | optional |
Struct: SchemaPattern
The Schema matching Pattern
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply | default | |
2 | value | string | The patern value to match against | default |
Struct: SchemaTagsPatterns
The Schema Tags patterns for the SchemaPatterns
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply, unsupported PF, RE and Vol. kind | default | |
2 | values | list<SchemaPattern > | The tags patterns to match against schema's column tags | default |
Struct: SchemaPatterns
The Schema Patterns for the SpecSchemas
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | names | list<SchemaPattern > | The Schema patterns for selecting by Column Name | default | |
2 | tags | SchemaTagsPatterns | The Schema patterns for selecting by Column Tags | default |
Struct: SpecSchemas
The Specs for Schemas for using with list_columns or compact_columns
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | cids | list<i64 > | The Column IDs | default | |
2 | names | list<string > | The Column Names | default | |
3 | patterns | SchemaPatterns | The Schema's selector patterns | default |
Struct: SpecFlags
The Scan Specifications Flags
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | limit | i64 | Limit to this number of cells | optional | |
2 | offset | i64 | Scan from this number of cells Offset on matching Cell-Interval | optional | |
3 | max_versions | i32 | Select only this number of Versions of a given Cell-Key | optional | |
4 | max_buffer | i32 | return results with reach of this Buffer size in bytes | optional | |
5 | options | i8 | The options bit by SpecFlagsOpt | optional |
Struct: SpecUpdateOP
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | op | UpdateOP | The Operation of update | default | |
2 | pos | i32 | The position/index of INSERT and OVERWRITE update operations | optional |
Struct: SpecIntervalUpdatePlain
The Value specs for an Updating Interval of ‘updating' in SpecIntervalPlain
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | v | binary | The bytes value for the updated cell | default | |
2 | ts | i64 | The timestamp for the updated cell NULL: MIN_INT64+1, AUTO:MIN_INT64+2 (or not-set) | optional | |
3 | encoder | EncodingType | Optionally the Cell Value Encoding Type: ZLIB/SNAPPY/ZSTD | optional | |
4 | update_op | SpecUpdateOP | Optionally the operaton of value update | optional |
Struct: SpecIntervalUpdateCounter
The Value specs for an Updating Interval of ‘updating' in SpecIntervalCounter
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | v | i64 | The int64 value for the updated cell | default | |
2 | op | i64 | The Opration pf Counter, available: COUNTER_OP_EQUAL | default | 0 |
3 | ts | i64 | The timestamp for the updated cell NULL: MIN_INT64+1, AUTO:MIN_INT64+2 (or not-set) | optional | |
4 | update_op | SpecUpdateOP | Optionally the operaton of value update | optional |
Struct: SpecIntervalUpdateSerial
The Value specs for an Updating Interval of ‘updating' in SpecIntervalSerial
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | ts | i64 | The timestamp for the updated cell NULL: MIN_INT64-1, AUTO:MIN_INT64-1 | default | |
2 | v | CellValuesSerial | The values of serial-fields for the updated cell | default | |
3 | v_op | CellValuesSerialOp | The values of serial-fields for the the SERIAL operation update | default | |
4 | encoder | EncodingType | Optionally the Cell Value Encoding Type: ZLIB/SNAPPY/ZSTD | optional | |
5 | update_op | SpecUpdateOP | Optionally the operaton of value update | optional |
Struct: SpecValueSerial_INT64
The Specifications of INT64 Serial Value Field
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply | default | |
2 | v | i64 | The int64 to match against the value field | default |
Struct: SpecValueSerial_DOUBLE
The Specifications of DOUBLE Serial Value Field
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply | default | |
2 | v | double | The double to match against the value field | default |
Struct: SpecValueSerial_BYTES
The Specifications of BYTES Serial Value Field
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply | default | |
2 | v | binary | The binary(bytes) to match against the value field | default |
Struct: SpecValueSerial_KEY
The Specifications of KEY Serial Value Field
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | seq | KeySeq | The Key Sequence to use | default | |
2 | v | SpecKey | The Specification of the Key to match against the value field | default |
Struct: SpecValueSerial_LI
The Specifications of LIST_INT64(LI) Serial Value Field
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply | default | |
2 | v | list<SpecValueSerial_INT64 > | The List of Int64 to match against the value field | default |
Struct: SpecValueSerial_LB
The Specifications of LIST_BYTES(LB) Serial Value Field
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply | default | |
2 | v | list<SpecValueSerial_BYTES > | The List of Bytes to match against the value field | default |
Struct: SpecValueSerialField
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | field_id | i32 | The Field Id of the Value Field | default | |
2 | spec_int64 | SpecValueSerial_INT64 | The specifications of Int64 for the field | optional | |
3 | spec_double | SpecValueSerial_DOUBLE | The specifications of Double for the field | optional | |
4 | spec_bytes | SpecValueSerial_BYTES | The specifications of Bytes for the field | default | |
5 | spec_key | SpecValueSerial_KEY | The specifications of Cell-Key for the field | default | |
6 | spec_li | SpecValueSerial_LI | The specifications of List Int64 for the field | default | |
7 | spec_lb | SpecValueSerial_LB | The specifications of List Bytes for the field | default |
Struct: SpecValuePlain
The Plain Value Specifications, option to use with Extended Logical Comparators
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply | default | |
2 | v | binary | The binary(bytes) to match against the Cell value | default |
Struct: SpecValueCounter
The Counter Value Specifications, option to use with Extended Logical Comparators
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply | default | |
2 | v | i64 | The int64 to match against the Cell value | default |
Struct: SpecValueSerial
The Serial Value Specifications
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply | default | |
2 | fields | SpecValueSerialFields | The Serial Value Specifications to match against the SERIAL Cell value fields | default |
Struct: SpecFraction
The Fraction Specifications
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply | default | |
2 | f | binary | The binary(bytes) to match against a fraction of a Cell-Key | default |
Struct: SpecTimestamp
The Timestamp Specifications
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | comp | Comp | Logical comparator to Apply | default | |
2 | ts | i64 | The timestamp in nanoseconds to match against the Cell timestamp/version (not the revision) | default |
Struct: SpecKeyInterval
The Key Interval Specifications
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | start | SpecKey | The Key Start Spec, the start of cells-interval key match | default | |
2 | finish | SpecKey | The Key Finish Spec, the finish of cells-interval key match | default |
Struct: SpecIntervalPlain
The Cells Interval Plain type Specifications with interval-scope Flags
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | range_begin | Key | Begin of Ranges evaluation with this Key inclusive | default | |
2 | range_end | Key | End of Ranges evaluation with this Key inclusive | default | |
3 | offset_key | Key | Offset Cell Key of a Scan, select cells from this key inclusive | default | |
4 | offset_rev | i64 | Offset Cell Timestamp of a Scan, select cells after this timestamp | optional | |
5 | key_intervals | SpecKeyIntervals | The Key Intervals | default | |
6 | values | SpecValuesPlain | The Cell Value Specifications, cell-value match for plain type | default | |
7 | ts_start | SpecTimestamp | The Timestamp Start Spec, the start of cells-interval timestamp match | optional | |
8 | ts_finish | SpecTimestamp | The Timestamp Finish Spec, the finish of cells-interval timestamp match | optional | |
9 | flags | SpecFlags | The Interval Flags Specification | optional | |
10 | options | SpecIntervalOptions | The Interval Options Specification | optional | |
11 | updating | SpecIntervalUpdatePlain | The Value spec of an Updating Interval | optional |
Struct: SpecIntervalCounter
The Cells Interval Counter type Specifications with interval-scope Flags
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | range_begin | Key | Begin of Ranges evaluation with this Key inclusive | default | |
2 | range_end | Key | End of Ranges evaluation with this Key inclusive | default | |
3 | offset_key | Key | Offset Cell Key of a Scan, select cells from this key inclusive | default | |
4 | offset_rev | i64 | Offset Cell Timestamp of a Scan, select cells after this timestamp | optional | |
5 | key_intervals | SpecKeyIntervals | The Key Intervals | default | |
6 | values | SpecValuesCounter | The Cell Value Specifications, cell-value match for counter type | default | |
7 | ts_start | SpecTimestamp | The Timestamp Start Spec, the start of cells-interval timestamp match | optional | |
8 | ts_finish | SpecTimestamp | The Timestamp Finish Spec, the finish of cells-interval timestamp match | optional | |
9 | flags | SpecFlags | The Interval Flags Specification | optional | |
10 | options | SpecIntervalOptions | The Interval Options Specification | optional | |
11 | updating | SpecIntervalUpdateCounter | The Value spec of an Updating Interval | optional |
Struct: SpecIntervalSerial
The Cells Interval Serial type Specifications with interval-scope Flags
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | range_begin | Key | Begin of Ranges evaluation with this Key inclusive | default | |
2 | range_end | Key | End of Ranges evaluation with this Key inclusive | default | |
3 | offset_key | Key | Offset Cell Key of a Scan, select cells from this key inclusive | default | |
4 | offset_rev | i64 | Offset Cell Timestamp of a Scan, select cells after this timestamp | optional | |
5 | key_intervals | SpecKeyIntervals | The Key Intervals | default | |
6 | values | SpecValuesSerial | The Serial Cell Value Specifications, cell-value fields match | default | |
7 | ts_start | SpecTimestamp | The Timestamp Start Spec, the start of cells-interval timestamp match | optional | |
8 | ts_finish | SpecTimestamp | The Timestamp Finish Spec, the finish of cells-interval timestamp match | optional | |
9 | flags | SpecFlags | The Interval Flags Specification | optional | |
10 | options | SpecIntervalOptions | The Interval Options Specification | optional | |
11 | updating | SpecIntervalUpdateSerial | The Serial-Value spec of an Updating Interval | optional |
Struct: SpecColumnPlain
The Column Specifications, the Cells-Intervals(SpecIntervalPlain/s) specification for a PLAIN Type column
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | cid | i64 | The Column ID | default | |
2 | intervals | list<SpecIntervalPlain > | The Cells Interval in a list-container | default |
Struct: SpecColumnCounter
The Column Specifications, the Cells-Intervals(SpecIntervalCounter/s) specification for a COUNTER Type column
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | cid | i64 | The Column ID | default | |
2 | intervals | list<SpecIntervalCounter > | The Cells Interval in a list-container | default |
Struct: SpecColumnSerial
The Column Specifications, the Cells-Intervals(SpecIntervalSerial/s) specification for a SERIAL Type Column
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | cid | i64 | The Column ID | default | |
2 | intervals | list<SpecIntervalSerial > | The Serial Cells Interval in a list-container | default |
Struct: SpecScan
The Scan Specifications, the Columns-Intervals(SpecColumn/s) with global-scope Flags
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | columns_plain | list<SpecColumnPlain > | The Plain Column Intervals(SpecColumnPlain) in a list-container | default | |
2 | columns_counter | list<SpecColumnCounter > | The Counter Column Intervals(SpecColumnCounter) in a list-container | default | |
3 | columns_serial | list<SpecColumnSerial > | The Serial Column Intervals(SpecColumnSerial) in a list-container | default | |
4 | flags | SpecFlags | The Global Flags Specification | optional |
Struct: UCellPlain
The Cell data for using with Update of PLAIN Column Type
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | f | Flag | The Cell Flag | default | |
2 | k | Key | The Cell Key | default | |
3 | ts | i64 | The Cell Timestamp in nanoseconds | optional | |
4 | ts_desc | bool | The Cell Version is in timestamp descending | optional | |
5 | v | binary | The Cell Value | default | |
6 | encoder | EncodingType | Optionally the Cell Value Encoding Type: ZLIB/SNAPPY/ZSTD | optional |
Struct: UCellCounter
The Cell data for using with Update of COUNTER Column Type
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | f | Flag | The Cell Flag | default | |
2 | k | Key | The Cell Key | default | |
3 | ts | i64 | The Cell Timestamp in nanoseconds | optional | |
4 | ts_desc | bool | The Cell Version is in timestamp descending | optional | |
5 | op | i8 | The Cell Counter Operation | default | 0 |
6 | v | i64 | The Cell Counter Value | default | 0 |
Struct: CellValueSerial
The Serial Value Cell field
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | field_id | i32 | The Field ID, a single ID can have any/all the field types | default | |
2 | v_int64 | i64 | The INT64 type field | optional | |
3 | v_double | double | The DOUBLE type field | optional | |
4 | v_bytes | binary | The BYTES type field | optional | |
5 | v_key | Key | The Cell KEY type field | optional | |
6 | v_li | list<i64 > | The LIST INT64 type field | optional | |
7 | v_lb | list<binary > | The LIST BYTES type field | optional |
Struct: FU_INT64
Serial INT64 Field Update
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | ctrl | i8 | default | 0 | |
2 | op | FU_MATH_OP | default | [ FU_MATH_OP.EQUAL](#constant-fu_math_opequal) | |
3 | pos | i32 | optional | ||
4 | comp | Comp | optional | ||
5 | v | i64 | default |
Struct: FU_DOUBLE
Serial DOUBLE Field Update
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | ctrl | i8 | default | 0 | |
2 | op | FU_MATH_OP | default | [ FU_MATH_OP.EQUAL](#constant-fu_math_opequal) | |
3 | pos | i32 | optional | ||
4 | comp | Comp | optional | ||
5 | v | double | default |
Struct: FU_BYTES
Serial BYTES Field Update
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | ctrl | i8 | default | 0 | |
2 | op | FU_LIST_OP | default | [ FU_LIST_OP.REPLACE](#constant-fu_list_opreplace) | |
3 | pos | i32 | optional | ||
4 | comp | Comp | optional | ||
5 | v | binary | default |
Struct: FU_LI
Serial LIST_INT64 Field Update
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | ctrl | i8 | default | 0 | |
2 | op | FU_LIST_OP | default | [ FU_LIST_OP.REPLACE](#constant-fu_list_opreplace) | |
3 | pos | i32 | optional | ||
4 | v | list<FU_INT64 > | default |
Struct: FU_LB
Serial LIST_BYTES Field Update
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | ctrl | i8 | default | 0 | |
2 | op | FU_LIST_OP | default | [ FU_LIST_OP.REPLACE](#constant-fu_list_opreplace) | |
3 | pos | i32 | optional | ||
4 | v | list<FU_BYTES > | default |
Struct: CellValueSerialOp
The Serial Values Cell field with Update Operation
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | field_id | i32 | The Field ID, a single ID can have any/all the field types | default | |
2 | v_int64 | FU_INT64 | The INT64 type update-field | optional | |
3 | v_double | FU_DOUBLE | The DOUBLE type update-field | optional | |
4 | v_bytes | FU_BYTES | The BYTES type update-field | optional | |
5 | v_key | Key | The Cell KEY type update-field | optional | |
6 | v_li | FU_LI | The LIST INT64 type update-field | optional | |
7 | v_lb | FU_LB | The LIST BYTES type update-field | optional |
Struct: UCellSerial
The Cell data for using with Update of SERIAL Column Type
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | f | Flag | The Cell Flag | default | |
2 | k | Key | The Cell Key | default | |
3 | ts | i64 | The Cell Timestamp in nanoseconds | optional | |
4 | ts_desc | bool | The Cell Version is in timestamp descending | optional | |
5 | v | CellValuesSerial | The Serial Cell Value fields | default | |
6 | encoder | EncodingType | Optionally the Cell Value Encoding Type: ZLIB/SNAPPY/ZSTD | optional |
Struct: CellPlain
The Cell for results list of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | c | string | The Column Name | default | |
2 | k | Key | The Cell Key | default | |
3 | ts | i64 | The Cell Timestamp | default | |
4 | v | binary | The Cell Value | default |
Struct: CellCounter
The Counter Cell for results list of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | c | string | The Column Name | default | |
2 | k | Key | The Cell Key | default | |
3 | ts | i64 | The Cell Timestamp | default | |
4 | v | i64 | The Cell Counter Value | default | |
5 | eq | i64 | The Counter EQ since ts | optional |
Struct: CellSerial
The Serial Cell for results list of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | c | string | The Column Name | default | |
2 | k | Key | The Cell Key | default | |
3 | ts | i64 | The Cell Timestamp | default | |
4 | v | CellValuesSerial | The Cell Serial Value | default |
Struct: Cells
The Cells for results list of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | plain_cells | CellsPlain | The Cells, defined as Cell items in a list-container | default | |
2 | counter_cells | CellsCounter | The Cells, defined as Cell items in a list-container | default | |
3 | serial_cells | CellsSerial | The Serial Cells, defined as CellSerial items in a list-container | default |
Struct: CCellPlain
The Plain column type Cell for results on Columns of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | k | Key | The Cell Key | default | |
2 | ts | i64 | The Cell Timestamp | default | |
3 | v | binary | The Cell Value | default |
Struct: CCellCounter
The Counter column type Cell for results on Columns of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | k | Key | The Cell Key | default | |
2 | ts | i64 | The Cell Timestamp | default | |
3 | v | i64 | The Cell Counter Value | default | |
4 | eq | i64 | The Counter EQ since ts | optional |
Struct: CCellSerial
The Serial column type Cell for results on Columns of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | k | Key | The Cell Key | default | |
2 | ts | i64 | The Cell Timestamp | default | |
3 | v | CellValuesSerial | The Cell Serial Value | default |
Struct: cCells
The Column Cells for results on Columns of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | plain_cells | list<CCellPlain > | The Plain type Cells, defined as CCellPlain items in a list-container | default | |
2 | counter_cells | list<CCellCounter > | The Counter type Cells, defined as CCellCounter items in a list-container | default | |
3 | serial_cells | list<CCellSerial > | The Serial type Cells, defined as CCellSerial items in a list-container | default |
Struct: KCellPlain
The Plain column type Key Cell for results on Key of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | c | string | The Column Name | default | |
2 | ts | i64 | The Cell Timestamp | default | |
3 | v | binary | The Cell Value | default |
Struct: KCellCounter
The Counter column type Key Cell for results on Key of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | c | string | The Column Name | default | |
2 | ts | i64 | The Cell Timestamp | default | |
3 | v | i64 | The Cell Counter Value | default | |
4 | eq | i64 | The Counter EQ since ts | optional |
Struct: KCellSerial
The Serial column type Key Cell for results on Key of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | c | string | The Column Name | default | |
2 | ts | i64 | The Cell Timestamp | default | |
3 | v | CellValuesSerial | The Cell Serial Value | default |
Struct: kCells
The Key Cells for results on Key of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | k | Key | The Cell Key | default | |
2 | plain_cells | list<KCellPlain > | The Plain type Key Cells, defined as KCellPlain items in a list-container | default | |
3 | counter_cells | list<KCellCounter > | The Counter type Key Cells, defined as KCellCounter items in a list-container | default | |
4 | serial_cells | list<KCellSerial > | The Serial type Key Cells, defined as KCellSerial items in a list-container | default |
Struct: FCellPlain
The Plain column type Fraction Cell for results on Fraction of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | c | string | The Column Name | default | |
2 | ts | i64 | The Cell Timestamp | default | |
3 | v | binary | The Cell Value | default |
Struct: FCellCounter
The Counter column type Fraction Cell for results on Fraction of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | c | string | The Column Name | default | |
2 | ts | i64 | The Cell Timestamp | default | |
3 | v | i64 | The Cell Counter Value | default | |
4 | eq | i64 | The Counter EQ since ts | optional |
Struct: FCellSerial
The Serial column type Fraction Cell for results on Fraction of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | c | string | The Column Name | default | |
2 | ts | i64 | The Cell Timestamp | default | |
3 | v | CellValuesSerial | The Cell Serial Value | default |
Struct: FCells
The Fraction Cells for results on Fraction of scan
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | f | map<binary , FCells > | The Fraction Container for the Next Fractions Tree, defined as FCells items in a map-container by current Fraction bytes | default | |
2 | plain_cells | list<FCellPlain > | The current Fraction's Cells, defined as FCellPlain items in a list-container | default | |
3 | counter_cells | list<FCellCounter > | The current Fraction's Cells, defined as FCellCounter items in a list-container | default | |
4 | serial_cells | list<FCellSerial > | The current Fraction's Serial Cells, defined as FCellSerial items in a list-container | default |
Struct: CellsGroup
A Grouped Cells result for results of scan, determined by the request's CellsResult enum
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | cells | Cells | The Cells in a list, defined as Cell items in a list-container | default | |
2 | ccells | CCells | The Columns Cells in a map-container, defined as cCells items by Column Name | default | |
3 | kcells | KCells | The Keys Cells in a list, defined as kCells items in a list-container | default | |
4 | fcells | FCells | The Fraction Cells in struct FCells | default |
Struct: CompactResult
The Compact Result
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | cid | i64 | Column ID | default | |
2 | err | i32 | Error | default |
Struct: Result
The Result of ‘exec_sql'
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | schemas | Schemas | Set with result for ‘list columns' query | default | |
2 | cells | Cells | Set with result for ‘select' query | default | |
3 | compact | CompactResults | Set with result for ‘compact columns' query | default |
Services
Service: Service
The SWC-DB Thrift Service
Function: Service.sql_mng_column
The direct SQL method to Manage Column.
void
sql_mng_column(string
sql)
throws
Exception
- parameters:
- sql - The SQL string to Execute
Function: Service.sql_list_columns
The direct SQL method to List Columns
Schemas
sql_list_columns(string
sql)
throws
Exception
- parameters:
- sql - The SQL string to Execute
Function: Service.sql_compact_columns
The direct SQL method to Compact Columns
CompactResults
sql_compact_columns(string
sql)
throws
Exception
- parameters:
- sql - The SQL string to Execute
Function: Service.sql_select_plain
The direct SQL method to select cells with result in CellsPlain.
CellsPlain
sql_select_plain(string
sql)
throws
Exception
- parameters:
- sql - The SQL string to Execute
Function: Service.sql_select_counter
The direct SQL method to select cells with result in CellsCounter.
CellsCounter
sql_select_counter(string
sql)
throws
Exception
- parameters:
- sql - The SQL string to Execute
Function: Service.sql_select_serial
The direct SQL method to select cells with result in CellsSerial.
CellsSerial
sql_select_serial(string
sql)
throws
Exception
- parameters:
- sql - The SQL string to Execute
Function: Service.sql_select
The direct SQL method to select cells with result in Cells List.
Cells
sql_select(string
sql)
throws
Exception
- parameters:
- sql - The SQL string to Execute
Function: Service.sql_select_rslt_on_column
The direct SQL method to select cells with result in Columns Cells map.
CCells
sql_select_rslt_on_column(string
sql)
throws
Exception
- parameters:
- sql - The SQL string to Execute
Function: Service.sql_select_rslt_on_key
The direct SQL method to select cells with result in Key Cells list.
KCells
sql_select_rslt_on_key(string
sql)
throws
Exception
- parameters:
- sql - The SQL string to Execute
Function: Service.sql_select_rslt_on_fraction
The direct SQL method to select cells with result in Fractons Cells.
FCells
sql_select_rslt_on_fraction(string
sql)
throws
Exception
- parameters:
- sql - The SQL string to Execute
Function: Service.sql_query
The SQL method to select cells with result set by the request's type of CellsResult.
CellsGroup
sql_query(string
sql, CellsResult
rslt)
throws
Exception
- parameters:
- sql - The SQL string to Execute
- rslt - The Type of Cells Result for the response
Function: Service.sql_update
The direct SQL method to update cells optionally to work with updater-id.
void
sql_update(string
sql, i64
updater_id = 0
)
throws
Exception
- parameters:
- sql - The SQL string to Execute
- updater_id - The Updater ID to work with
Function: Service.exec_sql
The SQL method to execute any query.
Result
exec_sql(string
sql)
throws
Exception
- parameters:
- sql - The SQL string to Execute
Function: Service.updater_create
The method to Create an Updater ID with buffering size in bytes.
i64
updater_create(i32
buffer_size)
throws
Exception
- parameters:
- buffer_size - The buffer size of the Updater
Function: Service.updater_close
The method to Close an Updater ID.
void
updater_close(i64
id)
throws
Exception
- parameters:
- id - The Updater ID to close
Function: Service.update_plain
The direct method to update cells with cell in Update-Columns-Cells-Plain, optionally to work with updater-id.
void
update_plain(UCCellsPlain
cells, i64
updater_id = 0
)
throws
Exception
- parameters:
- cells - The Cells to update
- updater_id - The Updater ID to use for write
Function: Service.update_counter
The direct method to update cells with cell in Update-Columns-Cells-Counter, optionally to work with updater-id.
void
update_counter(UCCellsCounter
cells, i64
updater_id = 0
)
throws
Exception
- parameters:
- cells - The Counter Cells to update
- updater_id - The Updater ID to use for write
Function: Service.update_serial
The direct method to update cells with cell in Update-Columns-Cells-Serial, optionally to work with updater-id.
void
update_serial(UCCellsSerial
cells, i64
updater_id = 0
)
throws
Exception
- parameters:
- cells - The Serial Cells to update
- updater_id - The Updater ID to use for write
Function: Service.update_by_types
The method is to update cells by several Column-Types, optionally to work with updater-id.
void
update_by_types(UCCellsPlain
plain, UCCellsCounter
counter, UCCellsSerial
serial, i64
updater_id = 0
)
throws
Exception
- parameters:
- plain - The PLAIN Cells to update
- counter - The COUNTER Cells to update
- serial - The SERIAL Cells to update
- updater_id - The Updater ID to use for write
Function: Service.mng_column
The direct method to Manage Column
void
mng_column(SchemaFunc
func, Schema
schema)
throws
Exception
- parameters:
- func - The Action Function to use
- schema - The Schema for the Action
Function: Service.list_columns
The direct method to List Columns
Schemas
list_columns(SpecSchemas
spec)
throws
Exception
- parameters:
- spec - The Schemas Specifications to match Schema for response
Function: Service.compact_columns
The direct method to Compact Columns
CompactResults
compact_columns(SpecSchemas
spec)
throws
Exception
- parameters:
- spec - The Schemas Specifications to match columns to Compact
Function: Service.scan
The direct method to select cells with result in Cells List.
throws
Exception
- parameters:
- spec - The Scan Specifications for the scan
Function: Service.scan_rslt_on_column
The direct method to select cells with result in Columns Cells map.
CCells
scan_rslt_on_column(SpecScan
spec)
throws
Exception
- parameters:
- spec - The Scan Specifications for the scan
Function: Service.scan_rslt_on_key
The direct method to select cells with result in Key Cells list.
KCells
scan_rslt_on_key(SpecScan
spec)
throws
Exception
- parameters:
- spec - The Scan Specifications for the scan
Function: Service.scan_rslt_on_fraction
The direct method to select cells with result in Fractons Cells.
FCells
scan_rslt_on_fraction(SpecScan
spec)
throws
Exception
- parameters:
- spec - The Scan Specifications for the scan
Function: Service.scan_rslt_on
The method to select cells with result set by the request's type of CellsResult.
CellsGroup
scan_rslt_on(SpecScan
spec, CellsResult
rslt)
throws
Exception
- parameters:
- spec - The Scan Specifications for the scan
- rslt - The Type of Cells Result for the response
- exceptions:
- Exception - The Base Exception