Extends
Methods
(async) close()
Closes the cursor. Obtaining elements from the results is not possible after this.
This method should be called if no more elements are needed. It is not neccessary to call it if all elements have been already obtained.
- Inherited From:
- Source:
(async) getAll() → {Promise.<Array.<Array.<*>>>}
Returns all elements (arrays with values of the fields) from the query results.
May be used instead of getValue() method if the number of returned elements is relatively small and will not cause memory utilization issues.
- Overrides:
- Source:
Returns:
- all results returned by SQL Fields query. Every element of the array is an array with values of the fields requested by the query.
- Type
- Promise.<Array.<Array.<*>>>
getFieldNames() → {Array.<string>}
Returns names of the fields which were requested in the SQL Fields query.
Empty array is returned if "include field names" flag was false in the query.
Returns:
- field names. The order of names corresponds to the order of field values returned in the results of the query.
- Type
- Array.<string>
(async) getValue() → {Promise.<Array.<*>>}
Returns one element (array with values of the fields) from the query results.
Every new call returns the next element from the query results. If the method returns null, no more elements are available.
- Overrides:
- Source:
Returns:
- array with values of the fields requested by the query.
- Type
- Promise.<Array.<*>>
hasMore() → {boolean}
Checks if more elements are available in the query results.
- Inherited From:
- Source:
Returns:
- true if more cache entries are available, false otherwise.
- Type
- boolean
setFieldTypes(…fieldTypes) → {SqlFieldsCursor}
Specifies types of the fields returned by the SQL Fields query.
By default, a type of every field is not specified that means during operations the Ignite client will try to make automatic mapping between JavaScript types and Ignite object types - according to the mapping table defined in the description of the ObjectType class.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
fieldTypes |
ObjectType.PRIMITIVE_TYPE | CompositeType |
<repeatable> |
types of the returned fields. The order of types must correspond the order of field values returned in the results of the query. A type of every field can be:
|
Returns:
- the same instance of the SqlFieldsCursor.
- Type
- SqlFieldsCursor