Liking cljdoc? Tell your friends :D

datomic-type-extensions.api


add-backing-typesclj

(add-backing-types tx)
source

add-listenerclj

(add-listener fut f executor)

Register a completion listener for the future. The listener will run once and only once, if and when the future's work is complete. If the future has completed already, the listener will run immediately. Ordering of listeners is not guaranteed.

Register a completion listener for the future. The listener
will run once and only once, if and when the future's work is
complete. If the future has completed already, the listener will
run immediately.  Ordering of listeners is not guaranteed.
sourceraw docstring

as-ofclj

(as-of db t)

Returns the value of the database as of some point t, inclusive. t can be a transaction number, transaction ID, or Date.

Returns the value of the database as of some point t, inclusive.
t can be a transaction number, transaction ID, or Date.
sourceraw docstring

as-of-tclj

(as-of-t db)

Returns the as-of point, or nil if none

Returns the as-of point, or nil if none
sourceraw docstring

attributeclj

(attribute db attrid)

Returns information about the attribute with the given id or ident. Supports ILookup interface for key-based access. Supported keys are:

:id, :ident, :cardinality, :value-type, :unique, :indexed, :has-avet, :no-history, :is-component, :fulltext

Returns information about the attribute with the given id or ident.
Supports ILookup interface for key-based access. Supported keys are:

:id, :ident, :cardinality, :value-type, :unique, :indexed, :has-avet,
:no-history, :is-component, :fulltext
sourceraw docstring

basis-tclj

(basis-t db)

Returns the t of the most recent transaction reachable via this db value.

Returns the t of the most recent transaction reachable via this db value.
sourceraw docstring

connectclj

(connect uri)
source

create-databaseclj

(create-database uri)

Creates database specified by uri. Returns true if the database was created, false if it already exists. See connect for a description of the URI syntax.

Creates database specified by uri. Returns true if the
database was created, false if it already exists. See connect
for a description of the URI syntax.
sourceraw docstring

datomsclj

(datoms db index & components)

Raw access to the index data, by index. The index must be supplied, and, optionally, one or more leading components of the index can be supplied to narrow the result.

:eavt and :aevt indexes will contain all datoms :avet contains datoms for attributes where :db/index = true. :vaet contains datoms for attributes of :db.type/ref :vaet is the reverse index

Raw access to the index data, by index. The index must be supplied,
 and, optionally, one or more leading components of the index can be
 supplied to narrow the result.

:eavt and :aevt indexes will contain all datoms
:avet contains datoms for attributes where :db/index = true.
:vaet contains datoms for attributes of :db.type/ref
       :vaet is the reverse index
sourceraw docstring

dbclj

(db connection)
source

delete-databaseclj

(delete-database uri)

Deletes the database specified by uri. Returns true if the delete occurred. See connect for a description of the URI syntax.

Deletes the database specified by uri. Returns true if the
delete occurred. See connect for a description of the URI
syntax.
sourceraw docstring

entidclj

(entid db ident)

Returns the entity id associated with a symbolic keyword, or the id itself if passed.

Returns the entity id associated with a symbolic keyword, or the id
itself if passed.
sourceraw docstring

entid-atclj

(entid-at db part t-or-date)

Returns a fabricated entity id in the supplied partition whose T component is at or after the supplied t. Entity ids sort by partition, then T component, such T components interleaving with transaction numbers. Thus this function can be used to fabricate a time-based entity id component for use in e.g. seek-datoms.

Returns a fabricated entity id in the supplied partition whose
T component is at or after the supplied t. Entity ids sort by partition,
then T component, such T components interleaving with transaction numbers.
Thus this function can be used to fabricate a time-based entity id component for use
in e.g. seek-datoms.
sourceraw docstring

entityclj

(entity db eid)
source

entity-dbclj

(entity-db entity)

Returns the database value that is the basis for this entity

Returns the database value that is the basis for this entity
sourceraw docstring

filterclj

(filter db pred)
source

find-attr->attr-infoclj

(find-attr->attr-info db)
source

functionclj

(function m)

Generates a function object given a map with required keys

:lang - clojure or java :params - a list of parameter names used in the code :code - a string or data containing the code of the body

and optional keys

:imports - a list to be spliced into (import ...) :requires - a list to be spliced into (require ...)

Clojure code should consist of a single expression in which the params will be in scope.

Returns a function object that implements IFn, and is a record with keys :lang, :params, :code, :imports, and :requires.

Generates a function object given a map with required keys

:lang  - clojure or java
:params - a list of parameter names used in the code
:code - a string or data containing the code of the body

and optional keys

:imports - a list to be spliced into (import ...)
:requires - a list to be spliced into (require ...)

Clojure code should consist of a single expression in which
the params will be in scope.

Returns a function object that implements IFn, and is a record with
keys :lang, :params, :code, :imports, and :requires.
sourceraw docstring

gc-storageclj

(gc-storage connection older-than)

Allow storage to reclaim garbage older than a certain age.

Allow storage to reclaim garbage older than a certain age.
sourceraw docstring

get-database-namesclj

(get-database-names uri)

Returns a list of database names. URI is a database URI as described under the connect documentation, but with a '' where the database name would be. For instance: datomic:dev://{transactor-host}:{port}/. When using the map form, :db-name should be omitted.

Returns a list of database names. URI is a database URI as
described under the connect documentation, but with a '*' where the
database name would be. For instance: datomic:dev://{transactor-host}:{port}/*.
When using the map form, :db-name should be omitted.
sourceraw docstring

historyclj

(history db)
source

identclj

(ident db eid)

Returns the keyword associated with an id, or the key itself if passed.

Returns the keyword associated with an id, or the key itself if passed.
sourceraw docstring

index-rangeclj

(index-range db attrid start end)

Returns an Iterable range of datoms in index named by attrid, starting at start, or from beginning if start is nil, and ending before end, or through end of attr index if end is nil.

Returns an Iterable range of datoms in index named by attrid,
starting at start, or from beginning if start is nil, and ending
before end, or through end of attr index if end is nil.
sourceraw docstring

init!clj

(init! conn)
source

invokeclj

(invoke db eid-or-ident & args)

Lookup the database function named by eid-or-ident, and call it with args.

Lookup the database function named by eid-or-ident, and call it with args.
sourceraw docstring

is-filteredclj

(is-filtered db)

Returns true if db has had a filter set with filter

Returns true if db has had a filter set with filter
sourceraw docstring

logclj

(log connection)

Retrieves a value of the log for use in tx-range or query.

Retrieves a value of the log for use in tx-range or query.
sourceraw docstring

next-tclj

(next-t db)

Returns the t one beyond the highest reachable via this db value.

Returns the t one beyond the highest reachable via this db value.
sourceraw docstring

partclj

(part eid)

Return the partition associated with an entity id.

Return the partition associated with an entity id.
sourceraw docstring

prepare-tx-dataclj

(prepare-tx-data db tx-data)
source

pullclj

(pull db pattern eid)
source

pull-manyclj

(pull-many db pattern eids)
source

qclj

(q q & inputs)
source

queryclj

(query query-map)
source

query-attr->attr-infoclj

(query-attr->attr-info db)
source

releaseclj

(release conn)

Request the release of resources associated with this connection.
Method returns immediately, resources will be released asynchronously. This method should only be called when the entire process is no longer interested in the connection. Note that Datomic connections do not adhere to an acquire/use/release pattern. They are thread-safe, cached, and long lived. Many processes (e.g. application servers) will never call release.

Request the release of resources associated with this connection.  
Method returns immediately, resources will be released 
asynchronously. This method should only be called when the entire 
process is no longer interested in the connection. Note
that Datomic connections do not adhere to an acquire/use/release 
pattern.  They are thread-safe, cached, and long lived.  Many 
processes (e.g. application servers) will never call release.
sourceraw docstring

remove-tx-report-queueclj

(remove-tx-report-queue connection)

Removes the queue associated with this connection.

Removes the queue associated with this connection.
sourceraw docstring

rename-databaseclj

(rename-database uri new-name)

Renames the database specified by uri to new-name. Returns true if rename succeeded. See connect for a description of the URI syntax.

Renames the database specified by uri to new-name. Returns
true if rename succeeded. See connect for a description of the
URI syntax.
sourceraw docstring

request-indexclj

(request-index connection)

Schedules a re-index of the database. The re-indexing happens asynchronously. Returns true if re-index is scheduled.

Schedules a re-index of the database. The re-indexing happens
asynchronously. Returns true if re-index is scheduled.
sourceraw docstring

resolve-tempidclj

(resolve-tempid db tempids tempid)

Resolve a tempid to the actual id assigned in a database. The tempids object must come from the :tempids member returned through transact or transact-async.

Resolve a tempid to the actual id assigned in a database. The
tempids object must come from the :tempids member returned through
transact or transact-async.
sourceraw docstring

seek-datomsclj

(seek-datoms db index & components)

Raw access to the index data, by index. The index must be supplied, and, optionally, one or more leading components of the index can be supplied for the initial search. Note that, unlike the datoms function, there need not be an exact match on the supplied components. The iteration will begin at or after the point in the index where the components would reside. Further, the iteration is not bound by the supplied components, and will only terminate at the end of the index. Thus you will have to supply your own termination logic, as you rarely want the entire index. As such, seek-datoms is for more advanced applications, and datoms should be preferred wherever it is adequate. See also - entid-at.

   :eavt and :aevt indexes will contain all datoms
   :avet contains datoms for attributes where :db/index = true.
   :vaet contains datoms for attributes of :db.type/ref
   :vaet is the reverse index
Raw access to the index data, by index. The index must be supplied,
and, optionally, one or more leading components of the index can be supplied for the initial search.
Note that, unlike the datoms function, there need not be an exact match on the supplied components.
The iteration will begin at or after the point in the index where the components would reside.
Further, the iteration is not bound by the supplied components, and will only terminate
at the end of the index. Thus you will have to supply your own termination logic, as you rarely
want the entire index. As such, seek-datoms is for more advanced applications, and datoms should be preferred
wherever it is adequate. See also - entid-at.

       :eavt and :aevt indexes will contain all datoms
       :avet contains datoms for attributes where :db/index = true.
       :vaet contains datoms for attributes of :db.type/ref
       :vaet is the reverse index
sourceraw docstring

shutdownclj

(shutdown shutdown-clojure)

Shutdown all peer resources. This method should be called as part of clean shutdown of a JVM process. Will release all Connections, and, if shutdown-clojure is true, will release Clojure resources. Programs written in Clojure can set shutdown-clojure to false if they manage Clojure resources (e.g. agents) outside of Datomic; programs written in other JVM languages should typically set shutdown-clojure to true.

Shutdown all peer resources.  This method should be called as
part of clean shutdown of a JVM process.  Will release all Connections,
and, if shutdown-clojure is true, will release Clojure resources.
Programs written in Clojure can set shutdown-clojure to false if they
manage Clojure resources (e.g. agents) outside of Datomic; programs
written in other JVM languages should typically set shutdown-clojure
to true.
sourceraw docstring

sinceclj

(since db t)
source

since-tclj

(since-t db)

Returns the since point, or nil if none

Returns the since point, or nil if none
sourceraw docstring

squuidclj

(squuid)

Constructs a semi-sequential UUID. Useful for creating UUIDs that don't fragment indexes. Returns a UUID whose most significant 32 bits are currentTimeMillis rounded to seconds.

Constructs a semi-sequential UUID. Useful for creating UUIDs
that don't fragment indexes. Returns a UUID whose most significant
32 bits are currentTimeMillis rounded to seconds.
sourceraw docstring

squuid-time-millisclj

(squuid-time-millis squuid)

get the time part of a squuid (a UUID created by squuid), in the format of System.currentTimeMillis

get the time part of a squuid (a UUID created by squuid), in
the format of System.currentTimeMillis
sourceraw docstring

syncclj

(sync connection)
(sync connection t)

Used to coordinate with other peers.

When called with a t: returns a future that will acquire a database value with basisT >= t. Does not communicate with the transactor.

When called with no t: Returns a future that will acquire a database value guaranteed to include all transactions that were complete at the time sync was called. Communicates with the transactor.

db is the preferred way to get a database value, as it does not need to wait nor block. Only use sync when coordination is required, and prefer the two-argument version when you have a basis t.

The future returned by sync can take arbitrarily long to complete. Waiters should use deref forms that specify a timeout.

Used to coordinate with other peers.

When called with a t: returns a future that will acquire a
database value with basisT >= t. Does not communicate with the
transactor.

When called with no t: Returns a future that will acquire a
database value guaranteed to include all transactions that were
complete at the time sync was called.  Communicates with the
transactor.

db is the preferred way to get a database value, as it does not
need to wait nor block. Only use sync when coordination is
required, and prefer the two-argument version when you have a
basis t.

The future returned by sync can take arbitrarily long to
complete.  Waiters should use deref forms that specify a timeout.
sourceraw docstring

sync-exciseclj

(sync-excise connection t)

Used to coordinate with background excision. Returns a future that will acquire a database value that is aware of excisions through time <= t.

Does not communicate with the transactor, so the future may be available immediately.

The future can take arbitrarily long to complete. Waiters should specify a timeout.

Used to coordinate with background excision. Returns a
future that will acquire a database value that is aware of
excisions through time <= t.

Does not communicate with the transactor, so the future may be
available immediately.

The future can take arbitrarily long to complete.  Waiters
should specify a timeout.
sourceraw docstring

sync-indexclj

(sync-index connection t)

Used to coordinate with background indexing jobs. Returns a future that will acquire a database value that is indexed through time <= t.

Does not communicate with the transactor, so the future may be available immediately.

The future can take arbitrarily long to complete. Waiters should specify a timeout.

Used to coordinate with background indexing jobs. Returns a
future that will acquire a database value that is indexed
through time <= t.

Does not communicate with the transactor, so the future may be
available immediately.

The future can take arbitrarily long to complete.  Waiters
should specify a timeout.
sourceraw docstring

sync-schemaclj

(sync-schema connection t)

Used to coordinate with background schema changes. Returns a future that will acquire a database value that is aware of all schema changes through time <= t.

Does not communicate with the transactor, so the future may be available immediately.

The future can take arbitrarily long to complete. Waiters should specify a timeout.

Used to coordinate with background schema changes. Returns a
future that will acquire a database value that is aware of
all schema changes through time <= t.

Does not communicate with the transactor, so the future may be
available immediately.

The future can take arbitrarily long to complete.  Waiters
should specify a timeout.
sourceraw docstring

t->txclj

(t->tx t)

Return the transaction id associated with a t value.

Return the transaction id associated with a t value.
sourceraw docstring

tempidclj

(tempid partition)
(tempid partition n)

Generate a tempid in the specified partition. Within the scope of a single transaction, tempids map consistently to permanent ids. Values of n from -1 to -1000000, inclusive, are reserved for user-created tempids.

Generate a tempid in the specified partition. Within the scope
of a single transaction, tempids map consistently to permanent
ids. Values of n from -1 to -1000000, inclusive, are reserved for
user-created tempids.
sourceraw docstring

touchclj

(touch entity)

Touches all of the attributes of the entity, including any component entities recursively. Returns the entity.

Touches all of the attributes of the entity, including any component entities recursively.
Returns the entity.
sourceraw docstring

transactclj

(transact connection tx-data)
source

transact-asyncclj

(transact-async connection tx-data)
source

tx->tclj

(tx->t tx)

Return the t value associated with a transaction id.

Return the t value associated with a transaction id.
sourceraw docstring

tx-rangeclj

(tx-range log start end)

Returns a range of transactions in log, starting at start, or from beginning if start is nil, and ending before end, or through end of log if end is nil. start and end can be can be a transaction number, transaction ID, Date or nil.

Each transaction is a map with the following keys: :t - the T point of the transaction :data - a Collection of the Datoms asserted/retracted by the transaction

Returns a range of transactions in log, starting at start,
or from beginning if start is nil, and ending before end, or through
end of log if end is nil. start and end can be can be a transaction
number, transaction ID, Date or nil.

Each transaction is a map with the following keys:
 :t - the T point of the transaction
 :data -  a Collection of the Datoms asserted/retracted by the transaction
sourceraw docstring

tx-report-queueclj

(tx-report-queue connection)

Gets the data queue associated with this connection, creating one if necessary. At any point in time either zero or one queue is associated with a connection. The returned queue may be consumed from more than one thread. Note that the returned queue does not block producers, and will consume memory until you consume the elements from it. Reports will be added to the queue at some point after the db has been updated. If this connection originated the transaction, the transaction future will be notified first, before a report is placed on the queue.

Reports are records with the following keys:

:db-before value of database before the transaction :db-after value of database after the transaction :tx-data the transaction data in E/A/V/Tx form.

Gets the data queue associated with this connection, creating one
if necessary. At any point in time either zero or one queue is
associated with a connection. The returned queue may be consumed
from more than one thread. Note that the returned queue does not
block producers, and will consume memory until you consume the
elements from it. Reports will be added to the queue at some point
after the db has been updated. If this connection originated the
transaction, the transaction future will be notified first, before
a report is placed on the queue.

Reports are records with the following keys:

  :db-before    value of database before the transaction
  :db-after     value of database after the transaction
  :tx-data      the transaction data in E/A/V/Tx form.
sourceraw docstring

withclj

(with db tx-data)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close