public interface ICruxDatasource
extends java.io.Closeable
Modifier and Type | Method and Description |
---|---|
DBBasis |
dbBasis() |
CruxDocument |
entity(java.lang.Object eid)
Returns the document map for an entity.
|
default java.util.List<java.util.Map<clojure.lang.Keyword,?>> |
entityHistory(java.lang.Object eid,
HistoryOptions.SortOrder sortOrder)
Eagerly retrieves entity history for the given entity.
|
java.util.List<java.util.Map<clojure.lang.Keyword,?>> |
entityHistory(java.lang.Object eid,
HistoryOptions options)
Eagerly retrieves entity history for the given entity.
|
java.util.Map<clojure.lang.Keyword,?> |
entityTx(java.lang.Object eid)
Returns the transaction details for an entity.
|
default ICursor<java.util.Map<clojure.lang.Keyword,?>> |
openEntityHistory(java.lang.Object eid,
HistoryOptions.SortOrder sortOrder)
Lazily retrieves entity history for the given entity.
|
ICursor<java.util.Map<clojure.lang.Keyword,?>> |
openEntityHistory(java.lang.Object eid,
HistoryOptions options)
Lazily retrieves entity history for the given entity.
|
ICursor<java.util.List<?>> |
openQuery(java.lang.Object query,
java.lang.Object... args)
Queries the db lazily.
|
java.util.Map<clojure.lang.Keyword,?> |
pull(java.lang.Object projection,
java.lang.Object eid)
Returns the requested data for the given entity ID, based on the projection spec
e.g.
|
java.util.List<java.util.Map<clojure.lang.Keyword,?>> |
pullMany(java.lang.Object projection,
java.lang.Iterable<?> eids)
Returns the requested data for the given entity IDs, based on the projection spec
e.g.
|
java.util.List<java.util.Map<clojure.lang.Keyword,?>> |
pullMany(java.lang.Object projection,
java.lang.Object... eids)
Returns the requested data for the given entity IDs, based on the projection spec
e.g.
|
java.util.Collection<java.util.List<?>> |
query(java.lang.Object query,
java.lang.Object... args)
Queries the db.
|
java.util.Date |
transactionTime() |
java.util.Date |
validTime()
The valid time of this db.
|
ICruxDatasource |
withTx(java.util.List<java.util.List<?>> transaction)
Deprecated.
in favour of
withTx(Transaction) |
ICruxDatasource |
withTx(crux.api.tx.Transaction transaction)
Returns a new db value with the txOps speculatively applied.
|
CruxDocument entity(java.lang.Object eid)
eid
- an object that can be coerced into an entity id.java.util.Map<clojure.lang.Keyword,?> entityTx(java.lang.Object eid)
eid
- an object that can be coerced into an entity id.java.util.Collection<java.util.List<?>> query(java.lang.Object query, java.lang.Object... args)
query
- the query in map, vector or string form.args
- bindings for in.ICursor<java.util.List<?>> openQuery(java.lang.Object query, java.lang.Object... args)
query
- the query in map, vector or string form.args
- bindings for in.java.util.Map<clojure.lang.Keyword,?> pull(java.lang.Object projection, java.lang.Object eid)
projection
- An EQL projection spec as a String or Clojure data structure - see https://opencrux.com/reference/queries.html#pulleid
- entity IDjava.util.List<java.util.Map<clojure.lang.Keyword,?>> pullMany(java.lang.Object projection, java.lang.Iterable<?> eids)
projection
- An EQL projection spec as a String or Clojure data structure - see https://opencrux.com/reference/queries.html#pulleids
- entity IDsjava.util.List<java.util.Map<clojure.lang.Keyword,?>> pullMany(java.lang.Object projection, java.lang.Object... eids)
projection
- An EQL projection spec - see https://opencrux.com/reference/queries.html#pulleids
- entity IDsjava.util.List<java.util.Map<clojure.lang.Keyword,?>> entityHistory(java.lang.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 java.util.List<java.util.Map<clojure.lang.Keyword,?>> entityHistory(java.lang.Object eid, HistoryOptions.SortOrder sortOrder)
entityHistory(Object, HistoryOptions)
ICursor<java.util.Map<clojure.lang.Keyword,?>> openEntityHistory(java.lang.Object eid, HistoryOptions options)
entityHistory(Object, HistoryOptions)
default ICursor<java.util.Map<clojure.lang.Keyword,?>> openEntityHistory(java.lang.Object eid, HistoryOptions.SortOrder sortOrder)
entityHistory(Object, HistoryOptions)
java.util.Date validTime()
java.util.Date transactionTime()
DBBasis dbBasis()
ICruxDatasource withTx(crux.api.tx.Transaction transaction)
transaction
- the transaction to be applied.@Deprecated ICruxDatasource withTx(java.util.List<java.util.List<?>> transaction)
withTx(Transaction)
transaction
- the transaction to be applied.