Methods
asOf(t) → {Db}
Return a database value as of the given t value.
Parameters:
Name | Type | Description |
---|---|---|
t |
The database t query as of. |
Returns:
The new Db.
- Type
- Db
datoms(m) → {Promise.<channel.Channel>}
Fetch datoms from the index.
Arguments in the argument map include:
- index: one of client.EAVT, client.AVET, client.AEVT, or client.VAET.
- components: an array of components to match against the index.
- timeout -- query timeout in milliseconds. Default 60s.
- offset -- the offset in the result set. Default 0.
- limit -- the maximum number of results to read. Default 1000.
- chunk -- the maximum number of results to return in each chunk. Default 1000.
Parameters:
Name | Type | Description |
---|---|---|
m |
object | The arguments. |
Returns:
The channel that will return chunks of
datoms.
- Type
- Promise.<channel.Channel>
dbStats() → {Promise.<*>}
Return stats about the database.
Returns:
The promise that will yield the stats.
- Type
- Promise.<*>
history() → {Db}
Return a database value that scans the history of the database.
Returns:
The new history database value.
- Type
- Db
indexRange(m) → {Promise.<channel.Channel>}
Return a promise that yields a channel that returns datoms read out
of the AVET index.
Arguments supported in the argument map:
- attrid -- the attribute to scan.
- start -- an optional start attribute value.
- end -- an optional end attribute value.
- timeout -- query timeout in milliseconds. Default 60s.
- offset -- the offset in the result set. Default 0.
- limit -- the maximum number of results to read. Default 1000.
- chunk -- the maximum number of results to return in each chunk. Default 1000.
Parameters:
Name | Type | Description |
---|---|---|
m |
The arguments. |
Returns:
The promise that yields the channel, or an error.
- Type
- Promise.<channel.Channel>
pull(m) → {Promise.<Object>}
Pull attributes from the database.
Arguments include:
- eid: the entity ID to pull. Either an entity ID (number, bigint, or array for an entity reference).
- selector: a selector expression
- timeout: an optional timeout in milliseconds.
Parameters:
Name | Type | Description |
---|---|---|
m |
The arguments. |
Returns:
The pulled value.
- Type
- Promise.<Object>
since(t) → {Db}
Return a database value that only includes facts asserted after the
given t value.
Parameters:
Name | Type | Description |
---|---|---|
t |
The t value. |
Returns:
The new database value.
- Type
- Db
with(m) → {Promise.<Object>}
Acts like Connection.transact, but does not alter the database.
Takes similar values as transact. This must only be called on a database
value returned by Connection.withDb, or by another call to with.
Parameters:
Name | Type | Description |
---|---|---|
m |
The arguments. |
Returns:
A promise yielding the transaction result.
- Type
- Promise.<Object>