Methods (11)
close() → {Promise.<void>}
Disconnects with GridDB without releases related resources.
closeSync() → {void}
Disconnects with GridDB without releases related resources (synchronously).
createRowKeyPredicate(type) → {Promise.<RowKeyPredicate>}
Creates a matching condition with the specified Type as the type of Row key.
The target Container must have a Row key, and it must be the same type as the specified Type.
The type of Row key that can be set must be the same type that is allowed by the individual Container type derived from Container.
Parameters:
Name |
Type |
Description |
type |
Type
|
The type of Row key used as a matching condition. |
createRowKeyPredicateSync(type) → {RowKeyPredicate}
Creates a matching condition with the specified Type as the type of Row key (synchronously).
The target Container must have a Row key, and it must be the same type as the specified Type.
The type of Row key that can be set must be the same type that is allowed by the individual Container type derived from Container.
Parameters:
Name |
Type |
Description |
type |
Type
|
The type of Row key used as a matching condition. |
dropContainer(name) → {Promise.<void>}
Delete a Container with the specified name.
If the specified Container is already deleted, nothing is changed.
When a transaction(s) is active in a target Container, it deletes the Container after waiting for the transaction completion.
Parameters:
Name |
Type |
Description |
name |
string
|
Container name to be processed. |
fetchAll(queryList) → {Promise.<void>}
Query execution and fetch is carried out on a specified arbitrary number of Query , with the request unit enlarged as much as possible.
For each Query included in a specified query column, perform a similar query execution and fetch as when Query.fetch() is performed individually and set the RowSet in the results. Use getRowSet() to extract the execution results of each Query . However, unlike the case when carried out individually, the target node is requested for the same storage destination, etc. with a unit that is as large as possible. Based on this, the larger the number of elements in the list, the higher is the possibility that the number of correspondences with the target node will be reduced. Query in a list are not executed in any particular order.
Only a Query that has not been closed, including corresponding Container acquired via the specified Store instance, can be included in a specified query column. Like a fetch() , the Row operations via RowSet finally generated and held by each Query will be unavailable. If the same instance is included multiple times in an array, the behavior will be the same as the case in which the respective instances differ.
Like other Container or Row operations, consistency between Containers is not guaranteed. Therefore, the processing results for a certain Container may be affected by other operation commands that have been completed prior to the start of the process.
The commit mode of each Container corresponding to the specified Query can be used in either the auto commit mode or manual commit mode. The transaction status is reflected in the execution results of the query. If the operation is completed normally, the corresponding transaction of each Container will not be aborted so long as the transaction timeout time has not been reached.
If an exception occurs in the midst of processing each Query , a new RowSet may be set for only some of the Query . In addition, uncommitted transactions of each Query corresponding to the designated Container may be aborted.
If the system tries to acquire a large number of Rows all at once, the upper limit of the communication buffer size managed by the GridDB node may be reached, possibly resulting in a failure. Refer to "System limiting values" in the Appendix of GridDB API Reference for the upper limit size.
Parameters:
Name |
Type |
Description |
queryList |
Array.<Query>
|
A list of target Queries |
getContainer(name) → {Promise.<Container>}
Get a Container instance whose Rows can be processed using a Row.
Parameters:
Name |
Type |
Description |
name |
string
|
Container name to be processed |
getContainerInfo(name) → {Promise.<ContainerInfo>}
Get information related to a Container with the specified name.
A name stored in GridDB is set for the Container name to be included in a returned ContainerInfo . Therefore, compared to the specified Container name, the notation of the ASCII uppercase characters and lowercase characters may differ.
When a transaction(s) is active in a target Container, it deletes the Container after waiting for the transaction completion.
Parameters:
Name |
Type |
Description |
name |
string
|
Container name to be processed. |
multiGet(predicateEntry) → {object.<string, Array.<object>>}
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.
Returns the Row contents in accordance with the conditions included in the specified entry column, similar to invoking Container.get() or Query.fetch() individually. However, unlike the case when carried out individually, the target node is requested for the same storage destination, etc. with a unit that is as large as possible. Based on this, the larger the total number of Rows conforming to the conditions and the larger the total number of target Containers, the higher is the possibility that the number of correspondences with the target node will be reduced.
A specified condition entry column is composed of an arbitrary number of condition entries that adopt the Container name as the key and the acquisition condition represented by RowKeyPredicate as the value. Multiple instances with the same RowKeyPredicate can also be included. In addition, a subject Container may be a mixture of different Container types and column layouts. However, there are some acquisition conditions that cannot be evaluated due to the composition of the Container. Refer to the definitions of the various setting functions for RowKeyPredicate for the specific restrictions. In addition, the specified Container name must be a real Container. It is prohibited to set null in the Container name or the acquisition condition.
An acquired entry column is composed of entries that adopt the Container name as its key and column of Row objects as its value. All entries included in a specified entry as acquisition conditions are included in an acquired entry column. If multiple entries pointing the same Container are included in a specified condition entry column, a single entry consolidating these is stored in the acquired entry column. If multiple Row objects are included in the same list, the stored order follows the Container type and the definition of the individual Container type derived from the corresponding Container . If there is no Row corresponding to the specified Container, the number of elements in corresponding column of Row object will be 0.
Like other Container or Row operations, consistency between Containers is not guaranteed. Therefore, the processing results for a certain Container may be affected by other operation commands that have been completed prior to the start of the process.
Like Container.get() or Query.fetch() , a transaction cannot be maintained and requests for updating locks cannot be made.
If the system tries to acquire a large number of Rows all at once, the upper limit of the communication buffer size managed by the GridDB node may be reached, possibly resulting in a failure. Refer to "System limiting values" in the Appendix of GridDB API Reference for the upper limit size.
Parameters:
Name |
Type |
Description |
predicateEntry |
object.<string, RowKeyPredicate>
|
The column of condition entry consisting of a combination of the target Container name and the acquisition condition. It consists of the array of RowKeyPredicate. |
multiPut(containerEntry) → {Promise.<void>}
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.
For each Row object included in a specified entry column, a new creation or update operation is carried out just like the case when Container.put() is invoked individually. However, unlike the case when carried out individually, the target node is requested for the same storage destination, etc. with a unit that is as large as possible. Based on this, the larger the total number of Row objects specified and the larger the total number of target Containers, the higher is the possibility that the number of correspondences with the target node will be reduced.
A specified entry column is composed of an arbitrary number of entries that adopt the Container name as its key and the column of Row objects as its value. A subject Container may be a mixture of different Container types and column layouts. However, the Containers must already exist. Null can not be set as the Container name in the entry column. Also null can not be set as the array address to the column of Row objects if the number of elements in the column of Row objects is positive value.
An arbitrary number of Row with the same column layout as the subject Container can be included in each column of Row objects. In the current version, all the column order must also be the same. The Container cannot include null as an element of the column of Row objects. Depending on the Container type and setting, the same restrictions as Container.put() are established for the contents of Rows that can be operated. If there are multiple columns of Row objects having the same Row key targeting the same Container in the designated entry column, the contents of the rear-most Row object having a Row key with the same value will be reflected using the element order of entry column as a reference if it is between different lists, or the element order of the column of Row object as a reference if it is within the same column of Row object. The transaction cannot be maintained and the lock cannot continue to be retained. However, if the lock that affects the target Row is secured by an existing transaction, the system will continue to wait for all the locks to be released. Like other Container or Row operations, consistency between Containers is not guaranteed. Therefore, the processing results for a certain Container may be affected by other operation commands that have been completed prior to the start of the process. If an error occurs in the midst of processing a Container and its Rows, only the results for some of the Rows of some of the Containers may remain reflected.
Parameters:
Name |
Type |
Description |
containerEntry |
object.<string, Array.<Array.<object>>>
|
dict-type data consisting of container name and the list of Row objects |
putContainer(info, modifiable) → {Promise.<Container>}
Newly creates or update a Container with the specified ContainerInfo.
It can be used only for RowSet obtained with locking enabled.
Parameters:
Name |
Type |
Default |
Description |
info |
ContainerInfo
|
|
Container information to be processed. |
modifiable |
boolean
|
false
|
Indicates whether the column layout of the existing Container can be modified or not. |