Liking cljdoc? Tell your friends :D

fluree.db.query.schema


flake->pred-mapclj/s

(flake->pred-map flakes)

lang-sid->langclj/s


new-pred-changesclj/s

(new-pred-changes db tempids flakes)

Returns a map of predicate changes with their respective old value and new value, both the key and value of the map are two-tuples as follows: {subid {:new? true :type {:old :int :new :long} :index {:old nil :new true }}}

If the predicate being changed is the :type, it resolves the type _tag to its short keyword name

When an old value does not exist, old-val is nil. If they subject being created is completely new, :new? true

Returns a map of predicate changes with their respective old
value and new value, both the key and value of the map are two-tuples as follows:
{subid  {:new?  true
        :type  {:old :int :new :long}
        :index {:old nil  :new true }}}

If the predicate being changed is the :type, it resolves the type _tag to its short keyword name

When an old value does not exist, old-val is nil.
If they subject being created is completely new, :new? true 
raw docstring

pred-name->keywordclj/s

(pred-name->keyword pred-name)

Takes an predicate name (string) and returns the namespace portion of it as a keyword.

Takes an predicate name (string) and returns the namespace portion of it as a keyword.
raw docstring

pred-objects-unique?clj/s

(pred-objects-unique? db pred-id)

pred-reverse-ref-reclj/s


predicate-change-errorclj/s

(predicate-change-error pred-changes db)
(predicate-change-error pred-changes db throw?)

Accepts a db (should have root permissions) and a map of predicate changes as produced by new-pred-changes. Returns a db with updated idxs if relevant, i.e. if non-unique predicate converted to unique If optional throw? parameter is true, will throw with an ex-info error.

Accepts a db (should have root permissions) and a map of predicate changes as produced by new-pred-changes.
Returns a db with updated idxs if relevant, i.e. if non-unique predicate converted to unique
If optional throw? parameter is true, will throw with an ex-info error.
raw docstring

predicate-reclj/s


reverse-refclj/s

(reverse-ref predicate-name)

Reverses an predicate name.

Reverses an predicate name.
raw docstring

reverse-ref?clj/s

(reverse-ref? predicate-name)
(reverse-ref? predicate-name throw?)

Reverse refs must be strings that include a '/_' in them, which characters before and after.

Reverse refs must be strings that include a '/_' in them, which characters before and after.
raw docstring

schema-mapclj/s

(schema-map db)

Returns a map of the schema for a db to allow quick lookups of schema properties. Schema is a map with two keys:

  • :coll - collection info, mapping cid->name and name->cid all within the same map
  • :pred - predicate info, mapping pid->properties and name->properties for quick lookup based on id or name respectively
Returns a map of the schema for a db to allow quick lookups of schema properties.
Schema is a map with two keys:
- :coll - collection info, mapping cid->name and name->cid all within the same map
- :pred - predicate info, mapping pid->properties and name->properties for quick lookup based on id or name respectively
raw docstring

setting-mapclj/s

(setting-map db)

type-errorclj/s

(type-error current-type new-type throw?)
(type-error db current-type new-type throw?)

Throw an error if schema update attempt is invalid.

Throw an error if schema update attempt is invalid.
raw docstring

type-sid->typeclj/s


validate-schema-changeclj/s

(validate-schema-change db tempids flakes)

versionclj/s

(version db)

Returns schema version from a db, which is the :t when the schema was last updated.

Returns schema version from a db, which is the :t when the schema was last updated.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close