Liking cljdoc? Tell your friends :D

cloudship.data

Namespace with the data api

Namespace with the data api
raw docstring

->idclj

(->id id-or-map)
source

count-recordsclj

(count-records cloudship object)
(count-records cloudship object options)

Returns the number of records for a given Object and options. Options are the same as q.

Returns the number of records for a given Object and options. Options are the same as [[q]].
sourceraw docstring

datafy-resultsclj

(datafy-results cloudship rs)

EXPERIMENTAL.

Adds implementation for datafy to a result of q. Also adds navigatable special keys to all records.

keydescription
:cloudship/linknavigates to the url of this record
:cloudship/childrennavigates to the describe data of all child refs. From there you can navigate to all child records.
:cloudship/describe-datanavigates to the describe data of this type
:cloudship/all-datanavigates to the same record but queries all fields
EXPERIMENTAL.

Adds implementation for datafy to a result of [[q]].
Also adds navigatable special keys to all records.

| key              | description |
|------------------| ------------|
| `:cloudship/link`| navigates to the url of this record
| `:cloudship/children` | navigates to the describe data of all child refs. From there you can navigate to all child records.
| `:cloudship/describe-data` | navigates to the describe data of this type
| `:cloudship/all-data` | navigates to the same record but queries all fields
sourceraw docstring

deleteclj

(delete cloudship records-or-ids)
(delete cloudship records-or-ids options)

Deletes the given maps (with :Id) or ids. Asks for permission.

Options are: | key | vals | description | | ------------| ----------- | ------------| | :dont-ask | true/false | skips asking for permission | :batch-size | int | Batch size for soap and bulk calls | :bulk | true/false | uses bulk api | :soap-parallel | true/false | simple pmap for inserts via soap (no effect in bulk) | :bulk-serial | true/false | serial mode for bulk (no effect in soap)

Deletes the given maps (with `:Id`) or ids.
Asks for permission.

Options are:
| key         | vals        | description |
| ------------| ----------- | ------------|
| `:dont-ask`   | true/false  | skips asking for permission
| `:batch-size` | int         | Batch size for soap and bulk calls
| `:bulk`     | true/false  | uses bulk api
| `:soap-parallel` | true/false | simple pmap for inserts via soap (no effect in bulk)
| `:bulk-serial`  | true/false | serial mode for bulk (no effect in soap)
sourceraw docstring

describeclj

(describe cloudship)

Returns the global describe data for the given cloudship.

Returns the global describe data for the given cloudship.
sourceraw docstring

describe-idclj

(describe-id cloudship id)

Returns the Objectnames for the given cloudship and salesforce id(-prefix). Only checks the first 3 letters of a given id as they determine the object type. As there are edge cases where more than one object with a given prefix, a list is returned. If no Object is found, returns nil and logs a warning.

Returns the Objectnames for the given `cloudship` and salesforce id(-prefix).
Only checks the first 3 letters of a given id as they determine the object type.
As there are edge cases where more than one object with a given prefix, a list is returned.
If no Object is found, returns nil and logs a warning.
sourceraw docstring

describe-objectclj

(describe-object cloudship object-name)

Returns the describe data for the given cloudship and a single given object.

Returns the describe data for the given cloudship and a single given object.
sourceraw docstring

describe-objectsclj

(describe-objects cloudship & object-names)

Returns the describe data for the given cloudship and objects (as list or as varargs).

Returns the describe data for the given cloudship and objects (as list or as varargs).
sourceraw docstring

evictclj

(evict cloudship)

Removes the connection for this keyword/prop-map from the cache. Usefull if the describe data changed on the org and needs to be pulled again

Removes the connection for this keyword/prop-map from the cache.
Usefull if the describe data changed on the org and needs to be pulled again
sourceraw docstring

infoclj

(info cloudship)

Returns information for this client. Usally contains :username, :session, :url and the underlying client.

Returns information for this client.
Usally contains `:username`, `:session`, `:url` and the underlying client.
sourceraw docstring

insertclj

(insert cloudship records)
(insert cloudship records options)

Insert for given maps. All records must have a valid :type.

Options are: | key | vals | description | | ------------| ----------- | ------------| | :batch-size | int | Batch size for soap and bulk calls | :bulk | true/false | uses bulk api | :soap-parallel | true/false | simple pmap for inserts via soap (no effect in bulk) | :bulk-serial | true/false | serial mode for bulk (no effect in soap)

Insert for given maps.
All records must have a valid `:type`.

Options are:
| key         | vals        | description |
| ------------| ----------- | ------------|
| `:batch-size` | int         | Batch size for soap and bulk calls
| `:bulk`     | true/false  | uses bulk api
| `:soap-parallel` | true/false | simple pmap for inserts via soap (no effect in bulk)
| `:bulk-serial`  | true/false | serial mode for bulk (no effect in soap)
sourceraw docstring

processclj

(process cloudship records)

Processes 'ProcessSubmitRequest' or 'ProcessWorkitemRequest'

Processes 'ProcessSubmitRequest' or 'ProcessWorkitemRequest'
sourceraw docstring

qclj

(q cloudship object field-or-fields)
(q cloudship object field-or-fields {:keys [in all] :as options})

Structured version of the query function.

  • Is not limited to 2000 records (uses QueryLocator if needed).
  • Also understands "*",:all (all fields), :required (required fields) as field-or-fields.
  • Given a function for field-or-fields, it will run it as predicate on the field metadata.
    • This especially works for keywords like :updateable or :createable.
  • Always queries :Id.
  • Supports subqueries using ["relationFieldOnParent", fieldlist, options] as an entry in the field list

Options are:

keyvalsdescriptionexample
:wherewhereStringwhere string of a soql queryName LIKE '%Test%'
:in[infield vals]field and list of val for an in query[:Id ["A" "B"]] result in Id IN ('A', 'B')
:alltrue/falseuses query all (includes deleted records), default: false
:limitIntegerlimits the number of results
:datafytrue/falsereturned results are datafieable and navigatable
  • If the idset of :in is too big and results in a too long query, it will automaticly split the query and concat the results again.
  • With :datafy true the results will contain special keys. See datafy-results.
Structured version of the [[query]] function.
   * Is not limited to 2000 records (uses QueryLocator if needed).
   * Also understands `"*"`,`:all` (all fields), `:required` (required fields) as `field-or-fields`.
   * Given a function for `field-or-fields`, it will run it as predicate on the field metadata.
     * This especially works for keywords like `:updateable` or `:createable`.
   * Always queries `:Id`.
   * Supports subqueries using `["relationFieldOnParent", fieldlist, options]` as an entry in the field list

Options are:

   | key      | vals          | description | example |
   | -------- | --------------|-------------|---------|
   | `:where` | whereString   | where string of a soql query | `Name LIKE '%Test%'`
   | `:in`    | [infield vals]| field and list of val for an in query | `[:Id ["A" "B"]]` result in `Id IN ('A', 'B')`
   | `:all`   | true/false    | uses query all (includes deleted records), default: false |  |
   | `:limit` | Integer       | limits the number of results |
   | `:datafy`| true/false    | returned results are datafieable and navigatable |

   * If the `idset` of `:in` is too big and results in a too long query, it will automaticly split the query and concat the results again.
   * With `:datafy true` the results will contain special keys. See [[datafy-results]].
sourceraw docstring

queryclj

(query cloudship query-string)
(query cloudship query-string options)

Returns the result of this SOQL query-string for the given cloudship. Have a look at q for a more structured way to query.

Returns the result of this SOQL `query-string` for the given `cloudship`.
Have a look at [[q]] for a more structured way to query.
sourceraw docstring

remove-from-binclj

(remove-from-bin cloudship records-or-ids)
(remove-from-bin cloudship records-or-ids options)

Removes the given maps (with ids) or ids from the bin

Removes the given maps (with ids) or ids from the bin
sourceraw docstring

undeleteclj

(undelete cloudship records-or-ids)
(undelete cloudship records-or-ids options)

Undeletes the given maps (with ids) or ids

Undeletes the given maps (with ids) or ids
sourceraw docstring

updateclj

(update cloudship records)
(update cloudship records options)

Update for given maps. All records must have :Id and a valid :type.

Options are: | key | vals | description | | ------------| ----------- | ------------| | :batch-size | int | Batch size for soap and bulk calls | :bulk | true/false | uses bulk api | :soap-parallel | true/false | simple pmap for inserts via soap (no effect in bulk) | :bulk-serial | true/false | serial mode for bulk (no effect in soap)

Update for given maps.
All records must have `:Id` and a valid `:type`.

Options are:
| key         | vals        | description |
| ------------| ----------- | ------------|
| `:batch-size` | int         | Batch size for soap and bulk calls
| `:bulk`     | true/false  | uses bulk api
| `:soap-parallel` | true/false | simple pmap for inserts via soap (no effect in bulk)
| `:bulk-serial`  | true/false | serial mode for bulk (no effect in soap)
sourceraw docstring

upsertclj

(upsert cloudship records options)

Upsert for given maps. All records must have :Id and a valid :type.

Options are: | key | vals | description | | ------------| ----------- | ------------| | :upsert-key | keyword | field to use for upsert lookup | :batch-size | int | Batch size for soap and bulk calls | :bulk | true/false | uses bulk api | :soap-parallel | true/false | simple pmap for inserts via soap (no effect in bulk) | :bulk-serial | true/false | serial mode for bulk (no effect in soap)

Upsert for given maps.
All records must have `:Id` and a valid `:type`.

Options are:
| key         | vals        | description |
| ------------| ----------- | ------------|
| `:upsert-key` | keyword     | field to use for upsert lookup
| `:batch-size` | int         | Batch size for soap and bulk calls
| `:bulk`       | true/false  | uses bulk api
| `:soap-parallel` | true/false | simple pmap for inserts via soap (no effect in bulk)
| `:bulk-serial`  | true/false | serial mode for bulk (no effect in soap)
sourceraw docstring

user-infoclj

(user-info cloudship)

Returns the userinfo for a cloudship

Returns the userinfo for a cloudship
sourceraw docstring

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

× close