(flake->pred-map flakes)
(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
(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.
(pred-objects-unique? db pred-id)
(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.
(reverse-ref predicate-name)
Reverses an predicate name.
Reverses an predicate name.
(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.
(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:
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
(setting-map db)
(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.
(validate-schema-change db tempids flakes)
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close