public interface ICruxDatasource extends Closeable
| Modifier and Type | Method and Description |
|---|---|
DBBasis |
dbBasis() |
CruxDocument |
entity(Object eid)
Returns the document map for an entity.
|
default List<Map<Keyword,?>> |
entityHistory(Object eid,
HistoryOptions.SortOrder sortOrder)
Eagerly retrieves entity history for the given entity.
|
List<Map<Keyword,?>> |
entityHistory(Object eid,
HistoryOptions options)
Eagerly retrieves entity history for the given entity.
|
Map<Keyword,?> |
entityTx(Object eid)
Returns the transaction details for an entity.
|
default ICursor<Map<Keyword,?>> |
openEntityHistory(Object eid,
HistoryOptions.SortOrder sortOrder)
Lazily retrieves entity history for the given entity.
|
ICursor<Map<Keyword,?>> |
openEntityHistory(Object eid,
HistoryOptions options)
Lazily retrieves entity history for the given entity.
|
ICursor<List<?>> |
openQuery(Object query,
Object... args)
Queries the db lazily.
|
Map<Keyword,?> |
pull(Object projection,
Object eid)
Returns the requested data for the given entity ID, based on the projection spec
e.g.
|
List<Map<Keyword,?>> |
pullMany(Object projection,
Iterable<?> eids)
Returns the requested data for the given entity IDs, based on the projection spec
e.g.
|
List<Map<Keyword,?>> |
pullMany(Object projection,
Object... eids)
Returns the requested data for the given entity IDs, based on the projection spec
e.g.
|
Collection<List<?>> |
query(Object query,
Object... args)
Queries the db.
|
Date |
transactionTime() |
Date |
validTime()
The valid time of this db.
|
ICruxDatasource |
withTx(List<List<?>> transaction)
Deprecated.
in favour of
withTx(Transaction) |
ICruxDatasource |
withTx(Transaction transaction)
Returns a new db value with the txOps speculatively applied.
|
CruxDocument entity(Object eid)
eid - an object that can be coerced into an entity id.Map<Keyword,?> entityTx(Object eid)
eid - an object that can be coerced into an entity id.Collection<List<?>> query(Object query, Object... args)
query - the query in map, vector or string form.args - bindings for in.ICursor<List<?>> openQuery(Object query, Object... args)
query - the query in map, vector or string form.args - bindings for in.Map<Keyword,?> pull(Object projection, Object eid)
projection - An EQL projection spec as a String or Clojure data structure - see https://opencrux.com/reference/queries.html#pulleid - entity IDList<Map<Keyword,?>> pullMany(Object projection, Iterable<?> eids)
projection - An EQL projection spec as a String or Clojure data structure - see https://opencrux.com/reference/queries.html#pulleids - entity IDsList<Map<Keyword,?>> pullMany(Object projection, Object... eids)
projection - An EQL projection spec - see https://opencrux.com/reference/queries.html#pulleids - entity IDsList<Map<Keyword,?>> entityHistory(Object eid, HistoryOptions options)
withDocs is set on the options).
If withCorrections is set
on the options, bitemporal corrections are also included in the sequence,
sorted first by valid-time, then tx-id.
No matter what `start` and `end` parameters you specify, you won't receive
results later than the valid-time and transact-time of this DB value.eid - The entity id to return history fordefault List<Map<Keyword,?>> entityHistory(Object eid, HistoryOptions.SortOrder sortOrder)
entityHistory(Object, HistoryOptions)ICursor<Map<Keyword,?>> openEntityHistory(Object eid, HistoryOptions options)
entityHistory(Object, HistoryOptions)default ICursor<Map<Keyword,?>> openEntityHistory(Object eid, HistoryOptions.SortOrder sortOrder)
entityHistory(Object, HistoryOptions)Date validTime()
Date transactionTime()
DBBasis dbBasis()
ICruxDatasource withTx(Transaction transaction)
transaction - the transaction to be applied.@Deprecated ICruxDatasource withTx(List<List<?>> transaction)
withTx(Transaction)transaction - the transaction to be applied.