(create spec-or-structure
path
&
{:keys [filesystem fail-on-exists] :or {fail-on-exists true} :as opts})
Creates a Pail from a PailSpec at path
.
Creates a Pail from a PailSpec at `path`.
(object-seq pail)
Returns a sequence of objects read from the Pail.
Returns a sequence of objects read from the Pail.
(spec structure)
(spec format structure opts)
Builds a PailSpec from a PailStructure.
Builds a PailSpec from a PailStructure.
(with-snapshot pail bindings & body)
Automatically deletes Pail snapshots after successfuly executing a block of code. The snapshots
should be created with Pail.snapshot()
and will only be deleted if the body finishes
successfully. If the body throws an exception, the snapshot will not be deleted.
This is intended to be used to safely delete data that was successfully processed while not deleting data that fails to process.
The first argument should be the original Pail that the snapshots are derived from. If the body finishes correctly, this is the Pail from which the data will be deleted.
The second argument is a vector of bindings. The bindings should specify snapshots that can be
deleted from the original Pail with Pail.deleteSnapshot()
.
Example:
(with-snapshot original-pail [snapshot-pail (.snapshot origin-pail "/path/to/snapshot")] ...)
Automatically deletes Pail snapshots after successfuly executing a block of code. The snapshots should be created with `Pail.snapshot()` and will only be deleted if the body finishes successfully. If the body throws an exception, the snapshot will not be deleted. This is intended to be used to safely delete data that was successfully processed while not deleting data that fails to process. The first argument should be the original Pail that the snapshots are derived from. If the body finishes correctly, this is the Pail from which the data will be deleted. The second argument is a vector of bindings. The bindings should specify snapshots that can be deleted from the original Pail with `Pail.deleteSnapshot()`. Example: (with-snapshot original-pail [snapshot-pail (.snapshot origin-pail "/path/to/snapshot")] ...)
(write-objects pail objects)
Writes a list of objects to a Pail.
Writes a list of objects to a Pail.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close