Package datomic
Interface Attribute
public interface Attribute
Programmatic representation of a schema attribute.
Attribute information always resides in memory, so using this interface is more efficient than accessing the same information from the database via e.g. query.- Since:
- 0.9.4470
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
static final Object
-
Method Summary
Modifier and TypeMethodDescriptionThe attribute's cardinalityboolean
hasAVET()
Does this attribute currently have an AVET index?boolean
Does this attribute have a fulltext index?boolean
Is this a noHistory attribute?id()
The attribute's entity idident()
The attribute's ident (programmatic name)boolean
Is this a component attribute?boolean
Is this attribute configured for an AVET index?unique()
Type of the attribute's unique index, if any.The attribute's value type
-
Field Details
-
CARDINALITY_MANY
-
CARDINALITY_ONE
-
UNIQUE_IDENTITY
-
UNIQUE_VALUE
-
TYPE_BIGDEC
-
TYPE_BIGINT
-
TYPE_BOOLEAN
-
TYPE_BYTES
-
TYPE_DOUBLE
-
TYPE_FN
-
TYPE_FLOAT
-
TYPE_INSTANT
-
TYPE_KEYWORD
-
TYPE_LONG
-
TYPE_REF
-
TYPE_STRING
-
TYPE_URI
-
TYPE_UUID
-
-
Method Details
-
id
Object id()The attribute's entity id- Returns:
- an entity id
-
ident
Object ident()The attribute's ident (programmatic name)- Returns:
- an ident
-
valueType
Object valueType()The attribute's value type- Returns:
- a value type
-
cardinality
Object cardinality()The attribute's cardinality- Returns:
- either
CARDINALITY_MANY
orCARDINALITY_ONE
-
unique
Object unique()Type of the attribute's unique index, if any.- Returns:
- one of
UNIQUE_IDENTITY
,UNIQUE_VALUE
, or null
-
isComponent
boolean isComponent()Is this a component attribute?- Returns:
- true if
:db/isComponent
true for this attribute
-
isIndexed
boolean isIndexed()Is this attribute configured for an AVET index?- Returns:
- true if
:db/index
true for this attribute, or attribute is unique
-
hasAVET
boolean hasAVET()Does this attribute currently have an AVET index?
When you alter an existing schema, indexes are created in the background after setting:db/index
to true. This method returns true once a recently-added index is ready for use.- Returns:
- true if AVET index available for this attribute
-
hasNoHistory
boolean hasNoHistory()Is this a noHistory attribute?- Returns:
- true if
:db/noHistory
true for this attribute
-
hasFulltext
boolean hasFulltext()Does this attribute have a fulltext index?- Returns:
- true if
:db/fulltext
true for this attribute
-