Liking cljdoc? Tell your friends :D

sails-forth.datomic

Provides fns to assert the results of salesforce queries as datoms.

Provides fns to assert the results of salesforce queries as datoms.
raw docstring

assert-objectclj

(assert-object client ns-prefix object-key m)

assert-queryclj

(assert-query client ns-prefix query)

Returns a seq of transaction seqs that if transacted in order will assert the results of the given query in a datomic database.

Given an ns-prefix of "sf" and a query of {:find [:customer :id :sectors [:contact :id :phone]]}:

The first transaction asserts a set of attributes that will be defined on the attributes that will model the salesforce fields where there is no direct datomic analog, e.g. sf.field/helptext.

The second transaction asserts a set of attributes that model the fields of objects used in the query, e.g. sf.object.customer/id. Note this is a complete set of attributes, not limited simply to those used in the query.

The last transaction asserts the entities returned by the query.

Most field values have natural datomic types. Notable exceptions include:

  • picklist, multipicklist: stored as strings. The api does not provide any access to inactive picklist items, which makes asserting e.g. enum values problematic
  • recordtype references: stored as strings for similar reasons
  • address: stored as component references

There are some modest restrictions on the queries that can be asserted. All join references must include an identity field, except for recordtype joins which must only include the :name field.

Returns a seq of transaction seqs that if transacted in order will assert
the results of the given query in a datomic database.

Given an ns-prefix of `"sf"` and a query of
`{:find [:customer :id :sectors [:contact :id :phone]]}`:

The first transaction asserts a set of attributes that will be defined on the
attributes that will model the salesforce fields where there is no direct
datomic analog, e.g. `sf.field/helptext`.

The second transaction asserts a set of attributes that model the
fields of objects used in the query,
e.g. `sf.object.customer/id`. Note this is a complete set of
attributes, not limited simply to those used in the query.

The last transaction asserts the entities returned by the query.

Most field values have natural datomic types. Notable exceptions include:

* picklist, multipicklist: stored as strings. The api does not provide any
  access to inactive picklist items, which makes asserting e.g. enum values
  problematic
* recordtype references: stored as strings for similar reasons
* address: stored as component references

There are some modest restrictions on the queries that can be asserted.
All join references must include an identity field, except for recordtype
joins which must only include the `:name` field.
raw docstring

build-schemaclj

(build-schema client ns-prefix object-keys)

compound-identclj

(compound-ident ns-prefix compound-name field-name)

datomic-typesclj


field-attrclj

(field-attr ns-prefix object-name field-name)

field-identclj

(field-ident ns-prefix field-name)

metadata-schemaclj

(metadata-schema ns-prefix)

object-schemaclj

(object-schema ns-prefix object-key fields)

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

× close