class | method | description | Input example | Output example | Remark |
AggregationResult | object get(Type type) | Returns the aggregation result | |||
Container | void create_index(string column_name, IndexType index_type=DEFAULT, name=None) | Creates a specified type of index on the specified Column | |||
void drop_index(string colum_name, IndexType index_type=DEFAULT, name=None) | Removes the specified type of index among indexes on the specified Column | ||||
void flush() | Writes the results of earlier updates to a non-volatile storage medium, such as SSD, so as to prevent the data loss even if all cluster nodes stop suddenly | ||||
boolean put(list[object] row) | Newly creates or update a Row | row = [1, "val"] | |||
Query query(string query) | Creates a query to execute the specified TQL statement | ||||
ContainerType type | Read-only attribute | ||||
void abort() | Rolls back the result of the current transaction and starts a new transaction in the manual commit mode | ||||
void commit() | Commits the result of the current transaction and start a new transaction in the manual commit mode | ||||
void set_auto_commit(boolean enabled) | Change the setting of the commit mode | ||||
list[object] get(object key) | Returns the content of a Row corresponding to Row key | [1, "val"] | |||
boolean remove(object key) | Deletes a Row corresponding to Row key | ||||
void multi_put(list[list[object]] row_list) | Newly creates an arbitrary number of Rows together based on the specified Row objects group | row_list
= [[1, "val1"], [2, "val2"]] |
|||
AggregationResult aggregate_time_series(object start, object end, Aggregation type, string column_name=None) | Performs an aggregation operation based on the specified start and end times. This function is used only by TIME_SERIES container type. | ||||
Query query_by_time_series_range(object start, object end, QueryOrder order=QueryOrder.ASCENDING) | Creates a query to obtain a set of Rows within a specific range between the specified start and end times. This function is used only by TIME_SERIES container type. | Function doesn't throw exception when parsing invalid data (for example : negative value to start/end parameters). The GSException will be thrown in Query.fetch() function. | |||
Query query_by_time_series_sampling(object start, object end, list[string] column_name_list, InterpolationMode mode, int interval, TimeUnit interval_unit) | Creates a query to take a sampling of Rows within a specific range. This function is used only by TIME_SERIES container type. | ||||
QueryAnalysisEntry | list get() | Returns one of information entries composing a query plan and the results of analyzing a query operation | [1, 3, "xxx", "yyy", "zzz", "ppp"] | ||
GSException | boolean is_timeout | Read-only attribute | |||
int get_error_stack_size() | Returns the stack size of last error information related to specified resource | ||||
int get_error_code(int stack_index) | Returns the error code of last error related to specified resource | ||||
string get_message(int stack_index) | Returns the message of last error related to specified resource | ||||
string get_location(int stack_index) | Returns the error location of the internal module to the message of last error related to specified resource | ||||
PartitionController | int partition_count | Read-only attribute | |||
int get_container_count(int partition_index) | Get the total number of containers belonging to a specified partition | ||||
list[string] get_container_names(int partition_index, int start, int limit) | Get a list of the Container names belonging to a specified partition | ["container1", "container2", "container3"] | |||
int get_partition_index_of_container(string container_name) | Get the partition index corresponding to the specified Container name | ||||
Query | RowSet fetch(boolean for_update=False) | Executes a specified query with the specified option and returns a set of Rows as an execution result | |||
RowSet get_row_set() | Returns RowSet as the latest result | ||||
void set_fetch_options(int limit=None, boolean partial=False) | Sets an fetch option for a result acquisition | ||||
RowKeyPredicate | Type key_type | Read-only attribute | |||
list[object, object] get_range() | Returns the value of Row key at the start and end position of the range condition | [1,
100] Note: two values means start and end position |
|||
void set_range(object start, object end) | Sets the value of Row key as the start and end position of the range conditions | ||||
void set_distinct_keys(list[object] keys) | Adds the value of Row key as one of the elements in the individual condition | keys = ["val1", "val2", "val3"] | |||
list[object] get_distinct_keys() | Returns a set of the values of the Row keys that configure the individual condition. | ["val1", "val2", "val3"] | |||
RowSet | void remove() | Deletes the Row at the current cursor position | |||
object next() Note: object is AggregationResult or QueryAnalysisEntry or list[object] |
Moves the cursor to the next element in a object set and returns the object at the moved position | [1, "val"] | |||
RowSetType type | Read-only attribute | ||||
int size | Read-only attribute | ||||
boolean has_next() | Returns whether a Row set has at least one Row ahead of the current cursor position | ||||
void update(list[object] row) | Updates the values except a Row key of the Row at the cursor position, using the specified Row object | row = [1, "val"] | |||
list[string] get_column_names() | Get a list of column names | ["ts", "val"] | |||
Store | Container put_container(ContainerInfo info, boolean modifiable=False) | Newly creates or update a Container with the specified Container properties | |||
Container get_container(string name) | Get a Container instance whose rows can be processed using a Row object | ||||
void drop_container(string name) | Delete a Container with the specified name | ||||
ContainerInfo get_container_info(string name) | Get information related to a Container with the specified name | ||||
void fetch_all(list[Query] query_list) | Query execution and fetch is carried out on a specified arbitrary number of Query, with the request unit enlarged as much as possible | ||||
void multi_put(dict{string name : list[list[object]] row_list} container_entry) | New creation or update operation is carried out on an arbitrary number of rows of a Container, with the request unit enlarged as much as possible | container_entry
= {"container1": [[1, "val1"], [2, "val2"]], "container2": [[1, "val3"], [2, "val4"]]} |
|||
dict{string name : list row_list} multi_get(dict{string container_name : RowKeyPredicate predicate} predicate_entry) | Returns an arbitrary number and range of Rows in any Container based on the specified conditions, with the request unit enlarged as much as possible | predicate_entry
= {"container1":pred1, "container2":pred2} |
{"container1":
[[1, "val1"], [2, "val2"]], "container2": [[1, "val3"], [2, "val4"]]} |
||
PartitionContoroller partition_controller | Read-only attribute | ||||
RowKeyPredicate create_row_key_predicate(Type type) | Creates a matching condition with the specified GSType as the type of Row key | ||||
StoreFactory | @staticmethod StoreFactory get_instance() | Returns a default StoreFactory instance | |||
Store get_store(string host=None, int port=None, string cluster_name=None, string database=None, string username=None, string password=None, string notification_member=None, string notification_provider=None) | Returns
a Store with the specified properties Note: If this host is multicast address, host/port means notificationAddress/notificationPort for C Client. |
||||
string get_version() | Returns the current version of client | ||||
ContainerInfo | ContainerInfo(string name, list[list[string, Type]] column_info_list, ContainerType type=COLLECTION, boolean row_key=True, ExpirationInfo expiration=None, string dataAffinity=None) | Constructor | column_info_list
= [["ts", Type.TIMESTAMP], ["val", Type.LONG, TypeOption.NOT_NULL]] |
||
string name | attribute | ||||
list[list[string, Type]] column_info_list | attribute | [["ts",
Type.TIMESTAMP], ["val", Type.LONG, TypeOption.NOT_NULL]] |
[["ts",
Type.TIMESTAMP], ["val", Type.LONG, TypeOption.NOT_NULL]] |
||
ContainerType type | attribute | ||||
boolean row_key | attribute | ||||
ExpirationInfo expiration | attribute | ||||
string dataAffinity | attribute. If attribute is empty, then container will not support affinity function. | ||||
ExpirationInfo | ExpirationInfo(int time, TimeUnit unit, int division_count) | Constructor | |||
int time | attribute | ||||
TimeUnit unit | attribute | ||||
int division_count | attribute | ||||
TimestampUtils | @staticmethod int get_time_mills(float timestamp) | Calculate int-type timestamp in millisecond from datetime.timestamp() | |||
Note: None can set/get as a field value of Row. It means NULL. | |||||