datomisca

Database

Related Docs: object Database | package datomisca

final class Database extends AnyVal

Source
Database.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Database
  2. AnyVal
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Database(underlying: datomic.Database)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  2. final def ##(): Int

    Definition Classes
    Any
  3. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Database to any2stringadd[Database] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Database, B)

    Implicit information
    This member is added by an implicit conversion from Database to ArrowAssoc[Database] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def asOf[T](t: T)(implicit ev: AsPointT[T]): Database

    Returns the value of the database as of some point t, inclusive.

    Returns the value of the database as of some point t, inclusive.

    t

    a transactor number, transaction id, or date.

    returns

    the value of the database as of some point t, inclusive.

  8. def asOfT: Option[Long]

    returns

    the asOf point

  9. def basisT: Long

    returns

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

  10. def datoms(index: Keyword, components: AnyRef*): Iterable[Datom]

    Raw access to the index data, by index.

    Raw access to the index data, by 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.

    (Copied from Datomic docs)

    index

    the index to use.

    components

    optional leading components of the index to match.

    returns

    an iterable collection of Datom.

  11. def ensuring(cond: (Database) ⇒ Boolean, msg: ⇒ Any): Database

    Implicit information
    This member is added by an implicit conversion from Database to Ensuring[Database] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (Database) ⇒ Boolean): Database

    Implicit information
    This member is added by an implicit conversion from Database to Ensuring[Database] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: ⇒ Any): Database

    Implicit information
    This member is added by an implicit conversion from Database to Ensuring[Database] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): Database

    Implicit information
    This member is added by an implicit conversion from Database to Ensuring[Database] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def entid(kw: Keyword): Long

    Returns the entity id associated with a symbolic keyword

    Returns the entity id associated with a symbolic keyword

    kw

    a keyword.

    returns

    the entity id.

    Exceptions thrown

    DatomiscaException if no entity is found.

  16. def entid[T](id: T)(implicit ev: AsPermanentEntityId[T]): Long

    Returns the entity id passed.

    Returns the entity id passed.

    id

    an entity id.

    returns

    the entity id passed.

  17. def entidAt[T](partition: Partition, t: T)(implicit ev: AsPointT[T]): Long

    Returns a fabricated entity id in the supplied partition whose T component is at or after the supplied t.

    Returns a fabricated entity id in the supplied partition whose T component is at or after the supplied t.

    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 method can be used to fabricate a time-based entity id component for use in e.g. seekDatoms.

    (Copied from Datomic docs)

    partition

    a partition name.

    t

    a transaction number, transaction id, or date.

    returns

    a fabricated entity id at or after some point t.

    See also

    seekDatoms

  18. def entity(kw: Keyword): Entity

    Returns the entity for the given keyword.

    Returns the entity for the given keyword.

    This will return an empty Entity, if there are no facts about the given entity ident. The :db/id of the entity will null.

    kw

    a keyword.

    returns

    an entity.

  19. def entity[T](id: T)(implicit ev: AsPermanentEntityId[T]): Entity

    Returns the entity for the given entity id.

    Returns the entity for the given entity id.

    This will return an empty Entity, if there are no facts about the given entity id. The :db/id of the entity will be the given id.

    id

    an entity id.

    returns

    an entity.

  20. def filter(filterFn: (Datom) ⇒ Boolean): Database

  21. def filter(filterFn: (Database, Datom) ⇒ Boolean): Database

    Returns the value of the database containing only Datoms satisfying the predicate.

    Returns the value of the database containing only Datoms satisfying the predicate.

    The predicate will be passed the unfiltered db and a Datom. Chained calls compose the predicate with 'and'.

    filterFn

    a predicate

    returns

    the value of the database satisfying the predicate

  22. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Database to StringFormat[Database] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  23. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  24. def history: Database

    Returns a special database containing all assertions and retractions across time.

    Returns a special database containing all assertions and retractions across time.

    This special database can be used for datoms() and indexRange() calls and queries, but not for entity() or with() calls. asOf() and since() bounds are also supported. Note that queries will get all of the additions and retractions, which can be distinguished by the fifth datom field 'added' (true for add/assert) [e a v tx added]

  25. def id: String

    returns

    the database id

  26. def ident(kw: Keyword): Keyword

    Returns the symbolic keyword

    Returns the symbolic keyword

    kw

    a keyword

    returns

    a keyword

  27. def ident[T](id: T)(implicit ev: AsPermanentEntityId[T]): Keyword

    Returns the symbolic keyword associated with an id

    Returns the symbolic keyword associated with an id

    id

    an entity id

    returns

    a keyword

    Exceptions thrown

    DatomiscaException if no keyword is found

  28. def indexRange(attr: Keyword, start: Option[AnyRef] = None, end: Option[AnyRef] = None): Iterable[Datom]

    Raw access to the index data for an indexed attribute.

    Raw access to the index data for an indexed attribute.

    Returns a range of datoms in index specified by attrid, starting at start, or from beginning if start is null, and ending before end, or through end of attr index if end is null

    (Copied from Datomic docs)

    attr

    attribute keyword (attribute must be indexed or unique).

    start

    some start value or none if beginning.

    end

    some end value (non-inclusive), or None if through end.

    returns

    an iterable collection of Datom.

  29. def invoke[T](id: T, args: AnyRef*)(implicit ev: AsPermanentEntityId[T]): AnyRef

    Look up the database function of the entity id, and invoke the function with args.

    Look up the database function of the entity id, and invoke the function with args.

    The function value is stored as the value of the :db/fn attribute of the resolved entity.

    Note that no casts or conversions are applied to the arguments or the return value.

    id

    the entity id.

    args

    the raw arguments to pass to the function.

    returns

    the result of the function invocation.

  30. def invoke(ident: Keyword, args: AnyRef*): AnyRef

    Look up the database function of the ident entity ident, and invoke the function with args.

    Look up the database function of the ident entity ident, and invoke the function with args.

    The function value is stored as the value of the :db/fn attribute of the resolved entity.

    Note that no casts or conversions are applied to the arguments or the return value.

    ident

    the entity ident.

    args

    the raw arguments to pass to the function.

    returns

    the result of the function invocation.

  31. def isFiltered: Boolean

    returns

    true if db has had a filter set with filter(filterFn)

  32. def isHistory: Boolean

    returns

    true if this is a special history db

  33. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  34. def nextT: Long

    the t one beyond the highest reachable via this db value

  35. def seekDatoms(index: Keyword, components: AnyRef*): Iterable[Datom]

    Raw access to the index data, by index.

    Raw access to the index data, by 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 method, 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, seekDatoms is for more advanced applications, and datoms should be preferred wherever it is adequate.

    (Copied from Datomic docs)

    index

    the index to use.

    components

    optional leading components of the index to search for.

    returns

    an iterable collection of Datom.

    See also

    entidAt

  36. def since[T](t: T)(implicit ev: AsPointT[T]): Database

    Returns the value of the database since some point t, exclusive.

    Returns the value of the database since some point t, exclusive.

    t

    a transactor number, or transaction id.

    returns

    the value of the database since some point t, exclusive.

  37. def sinceT: Option[Long]

    returns

    the since point

  38. def toString(): String

    Definition Classes
    Any
  39. def touch[T](id: T)(implicit arg0: AsPermanentEntityId[T]): Entity

    Combines entity() and entity.touch()

    Combines entity() and entity.touch()

    id

    an entity id

    returns

    a touched entity

  40. val underlying: datomic.Database

  41. def withData(ops: Seq[TxData]): TxReport

    Applies transaction data to the database

    Applies transaction data to the database

    It is as if the data was applied in a transaction, but the source of the database is unaffected.

    ops

    a sequence of tranaction data

    returns

    a transaction report

  42. def [B](y: B): (Database, B)

    Implicit information
    This member is added by an implicit conversion from Database to ArrowAssoc[Database] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyVal

Inherited from Any

Inherited by implicit conversion any2stringadd from Database to any2stringadd[Database]

Inherited by implicit conversion StringFormat from Database to StringFormat[Database]

Inherited by implicit conversion Ensuring from Database to Ensuring[Database]

Inherited by implicit conversion ArrowAssoc from Database to ArrowAssoc[Database]

Ungrouped