Liking cljdoc? Tell your friends :D

eacl.datahike.schema


compare-schemaclj


count-relationships-using-relationclj

(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.
raw docstring

create-connclj

(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.
raw docstring

current-schema-generationclj

(current-schema-generation db)

datahike-schemaclj

EACL's own attributes, as datahike transaction data.

EACL's own attributes, as datahike transaction data.
raw docstring

default-configclj


live-source-id-keyclj

Connection-local lineage identity carried by non-durable store configs.

Connection-local lineage identity carried by non-durable store configs.
raw docstring

merge-schemaclj

(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.
raw docstring

migrate-v7-permissions!clj

(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.
raw docstring

permission-key-attrclj


permission-pullclj


permission-storage-shapeclj

(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.
raw docstring

permission-storage-versionclj


plan-schema-replacementclj

(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.
raw docstring

prepare-cache-coherence!clj

(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.
raw docstring

read-authorization-schemaclj

(read-authorization-schema db)

Reads permission structure without compiling undemanded Caveat programs.

Reads permission structure without compiling undemanded Caveat programs.
raw docstring

read-caveatsclj

(read-caveats db)

read-permissionsclj

(read-permissions db)

read-relationsclj

(read-relations db)

Canonical Relation definitions, including named Caveat alternatives.

Canonical Relation definitions, including named Caveat alternatives.
raw docstring

read-schemaclj

(read-schema db & [_format])

relation-key-attrclj


relation-pullclj


relationship-present-for-relation?clj

(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.
raw docstring

stamped-permission-storage-versionclj

(stamped-permission-storage-version db)

validate-schema-referencesclj


write-schema!clj

(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.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close