Package datomic
Interface Attribute
-
public interface AttributeProgrammatic 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.ObjectCARDINALITY_MANYstatic java.lang.ObjectCARDINALITY_ONEstatic java.lang.ObjectTYPE_BIGDECstatic java.lang.ObjectTYPE_BIGINTstatic java.lang.ObjectTYPE_BOOLEANstatic java.lang.ObjectTYPE_BYTESstatic java.lang.ObjectTYPE_DOUBLEstatic java.lang.ObjectTYPE_FLOATstatic java.lang.ObjectTYPE_FNstatic java.lang.ObjectTYPE_INSTANTstatic java.lang.ObjectTYPE_KEYWORDstatic java.lang.ObjectTYPE_LONGstatic java.lang.ObjectTYPE_REFstatic java.lang.ObjectTYPE_STRINGstatic java.lang.ObjectTYPE_URIstatic java.lang.ObjectTYPE_UUIDstatic java.lang.ObjectUNIQUE_IDENTITYstatic java.lang.ObjectUNIQUE_VALUE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectcardinality()The attribute's cardinalitybooleanhasAVET()Does this attribute currently have an AVET index?booleanhasFulltext()Does this attribute have a fulltext index?booleanhasNoHistory()Is this a noHistory attribute?java.lang.Objectid()The attribute's entity idjava.lang.Objectident()The attribute's ident (programmatic name)booleanisComponent()Is this a component attribute?booleanisIndexed()Is this attribute configured for an AVET index?java.lang.Objectunique()Type of the attribute's unique index, if any.java.lang.ObjectvalueType()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_MANYorCARDINALITY_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/isComponenttrue for this attribute
-
isIndexed
boolean isIndexed()
Is this attribute configured for an AVET index?- Returns:
- true if
:db/indextrue 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/indexto 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/noHistorytrue for this attribute
-
hasFulltext
boolean hasFulltext()
Does this attribute have a fulltext index?- Returns:
- true if
:db/fulltexttrue for this attribute
-
-