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
Fields Modifier and Type Field Description static java.lang.Object
CARDINALITY_MANY
static java.lang.Object
CARDINALITY_ONE
static java.lang.Object
TYPE_BIGDEC
static java.lang.Object
TYPE_BIGINT
static java.lang.Object
TYPE_BOOLEAN
static java.lang.Object
TYPE_BYTES
static java.lang.Object
TYPE_DOUBLE
static java.lang.Object
TYPE_FLOAT
static java.lang.Object
TYPE_FN
static java.lang.Object
TYPE_INSTANT
static java.lang.Object
TYPE_KEYWORD
static java.lang.Object
TYPE_LONG
static java.lang.Object
TYPE_REF
static java.lang.Object
TYPE_STRING
static java.lang.Object
TYPE_URI
static java.lang.Object
TYPE_UUID
static java.lang.Object
UNIQUE_IDENTITY
static java.lang.Object
UNIQUE_VALUE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
cardinality()
The attribute's cardinalityboolean
hasAVET()
Does this attribute currently have an AVET index?boolean
hasFulltext()
Does this attribute have a fulltext index?boolean
hasNoHistory()
Is this a noHistory attribute?java.lang.Object
id()
The attribute's entity idjava.lang.Object
ident()
The attribute's ident (programmatic name)boolean
isComponent()
Is this a component attribute?boolean
isIndexed()
Is this attribute configured for an AVET index?java.lang.Object
unique()
Type of the attribute's unique index, if any.java.lang.Object
valueType()
The attribute's value type
-
-
-
Field Detail
-
CARDINALITY_MANY
static final java.lang.Object CARDINALITY_MANY
-
CARDINALITY_ONE
static final java.lang.Object CARDINALITY_ONE
-
UNIQUE_IDENTITY
static final java.lang.Object UNIQUE_IDENTITY
-
UNIQUE_VALUE
static final java.lang.Object UNIQUE_VALUE
-
TYPE_BIGDEC
static final java.lang.Object TYPE_BIGDEC
-
TYPE_BIGINT
static final java.lang.Object TYPE_BIGINT
-
TYPE_BOOLEAN
static final java.lang.Object TYPE_BOOLEAN
-
TYPE_BYTES
static final java.lang.Object TYPE_BYTES
-
TYPE_DOUBLE
static final java.lang.Object TYPE_DOUBLE
-
TYPE_FN
static final java.lang.Object TYPE_FN
-
TYPE_FLOAT
static final java.lang.Object TYPE_FLOAT
-
TYPE_INSTANT
static final java.lang.Object TYPE_INSTANT
-
TYPE_KEYWORD
static final java.lang.Object TYPE_KEYWORD
-
TYPE_LONG
static final java.lang.Object TYPE_LONG
-
TYPE_REF
static final java.lang.Object TYPE_REF
-
TYPE_STRING
static final java.lang.Object TYPE_STRING
-
TYPE_URI
static final java.lang.Object TYPE_URI
-
TYPE_UUID
static final java.lang.Object TYPE_UUID
-
-
Method Detail
-
id
java.lang.Object id()
The attribute's entity id- Returns:
- an entity id
-
ident
java.lang.Object ident()
The attribute's ident (programmatic name)- Returns:
- an ident
-
valueType
java.lang.Object valueType()
The attribute's value type- Returns:
- a value type
-
cardinality
java.lang.Object cardinality()
The attribute's cardinality- Returns:
- either
CARDINALITY_MANY
orCARDINALITY_ONE
-
unique
java.lang.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
-
-