(count-relationships-using-relation
db
{:eacl.relation/keys [resource-type relation-name subject-type]})Counts relationships that reference the given relation.
The maximum of the two endpoint-index cardinalities is exact for healthy pairs and remains positive for either one-sided ghost, so corruption cannot make a relation definition appear unused.
Counts relationships that reference the given relation. The maximum of the two endpoint-index cardinalities is exact for healthy pairs and remains positive for either one-sided ghost, so corruption cannot make a relation definition appear unused.
(create-conn)(create-conn extra-schema)(create-conn extra-schema config)A datahike connection carrying EACL's schema.
config is merged over default-config; temporal history is enabled unless
the caller explicitly passes {:keep-history? false}. Pass
{:attribute-refs? true} to get Datomic's numeric attribute representation.
A memory store gets a fresh lineage id per created live source even when the
caller supplies a fixed store id.
A datahike connection carrying EACL's schema.
`config` is merged over `default-config`; temporal history is enabled unless
the caller explicitly passes `{:keep-history? false}`. Pass
`{:attribute-refs? true}` to get Datomic's numeric attribute representation.
A memory store gets a fresh lineage id per created live source even when the
caller supplies a fixed store id.(current-schema-generation db)EACL's own attributes, as datahike transaction data.
EACL's own attributes, as datahike transaction data.
Connection-local lineage identity carried by non-durable store configs.
Connection-local lineage identity carried by non-durable store configs.
(merge-schema)(merge-schema extra-schema)EACL's attributes plus the caller's. extra-schema is datahike-native
transaction data (a sequence of attribute maps), NOT DataScript's map of
attribute to options: datahike's :write flexibility needs value types that
a DataScript schema map does not carry, so the two are not interconvertible.
EACL's attributes plus the caller's. `extra-schema` is datahike-native transaction data (a sequence of attribute maps), NOT DataScript's map of attribute to options: datahike's `:write` flexibility needs value types that a DataScript schema map does not carry, so the two are not interconvertible.
(migrate-v7-permissions! conn schema-string)(migrate-v7-permissions! conn schema-string expression-limit-overrides)Atomically activates v8 expressions over released-v7 flat permissions.
This is a schema-row migration only. It proves exact relation and permission
denotation before installing additive v8 attributes, then writes canonical
expressions and the version-8 authority stamp behind the existing
schema-write fence. Flat entities remain inert history; avoiding persistent
index deletions is material for remote S3 stores. Relationship tuples are
neither enumerated nor rewritten. schema-string may be nil when the
database's schema singleton contains the authoritative source text.
Atomically activates v8 expressions over released-v7 flat permissions. This is a schema-row migration only. It proves exact relation and permission denotation before installing additive v8 attributes, then writes canonical expressions and the version-8 authority stamp behind the existing schema-write fence. Flat entities remain inert history; avoiding persistent index deletions is material for remote S3 stores. Relationship tuples are neither enumerated nor rewritten. `schema-string` may be nil when the database's schema singleton contains the authoritative source text.
(permission-storage-shape db)Classifies only bounded permission-definition rows.
:flat is the released-v7 representation. Ordinary v8 reads accept only
:expression or :none; :mixed is evidence of an interrupted or external
rewrite and is never guessed through. Relationship tuples are not read.
Classifies only bounded permission-definition rows. `:flat` is the released-v7 representation. Ordinary v8 reads accept only `:expression` or `:none`; `:mixed` is evidence of an interrupted or external rewrite and is never guessed through. Relationship tuples are not read.
(plan-schema-replacement db
schema-string
{:keys [allow-empty-schema? expression-limits
orphan-policy allow-caveats?]
:or {orphan-policy :error}})Pure schema replacement planner shared by committed and speculative paths.
Pure schema replacement planner shared by committed and speculative paths.
(prepare-cache-coherence! conn)Initializes missing native schema/relation generations and the schema write fence additively.
Initializes missing native schema/relation generations and the schema write fence additively.
(read-authorization-schema db)Reads permission structure without compiling undemanded Caveat programs.
Reads permission structure without compiling undemanded Caveat programs.
(read-caveats db)(read-permissions db)(read-relations db)Canonical Relation definitions, including named Caveat alternatives.
Canonical Relation definitions, including named Caveat alternatives.
(read-schema db & [_format])(relationship-present-for-relation?
db
{:eacl.relation/keys [resource-type subject-type] :as relation})At most one bounded AVET probe per physical direction for speculative retain-inert diagnostics. Either half witnesses retained relationship data, including a one-sided tuple left by earlier corruption.
At most one bounded AVET probe per physical direction for speculative retain-inert diagnostics. Either half witnesses retained relationship data, including a one-sided tuple left by earlier corruption.
(stamped-permission-storage-version db)(write-schema! conn schema-string)(write-schema! conn schema-string options)(write-schema! conn schema-string options known-schema-generation)Plans through plan-schema-replacement, adds committed CAS guards, and
transacts the resulting Datahike schema replacement.
Plans through `plan-schema-replacement`, adds committed CAS guards, and transacts the resulting Datahike schema replacement.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |