-
Notifications
You must be signed in to change notification settings - Fork 312
Javascript API
Kristian Mandrup edited this page Feb 27, 2016
·
14 revisions
Here an overview of the Datascript API exported for use from Javascript.
DataScript has a dedicated JS API. Here’s a lot of examples: js tests
empty_db(schema)
init_db(datoms..., schema)
q(query, sources)
pull(db, pattern, eid)
pull_many(db, pattern, eids)
db_with(db, entities)
entity(db, eid)
touch(..)
entity_db(..)
filter(db, pred)
is_filtered(..)
create_conn(schema)
conn_from_db(db)
conn_from_datoms(datoms, schema)
db(conn)
transact(conn, entities..., tx-meta)
reset_conn(conn, db, tx-meta)
listen(conn, callback)
unlisten(conn, key)
resolve_tempid(tempids, tempid)
datoms(db, index, components)
seek_datoms(db, index, components)
index_range(db, attr, start end)
squuid()
squuid_time_millis(uuid)