Provides fns to assert the results of salesforce queries as datoms.
Provides fns to assert the results of salesforce queries as datoms.
(assert-object client ns-prefix object-key m)
(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:
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.
(build-schema client ns-prefix object-keys)
(compound-ident ns-prefix compound-name field-name)
(field-attr ns-prefix object-name field-name)
(field-ident ns-prefix field-name)
(metadata-schema ns-prefix)
(object-schema ns-prefix object-key fields)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close