Liking cljdoc? Tell your friends :D

clj-pail.core


createclj

(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`.
sourceraw docstring

find-or-createclj

(find-or-create pstruct path & {:as create-key-args})
source

object-seqclj

(object-seq pail)

Returns a sequence of objects read from the Pail.

Returns a sequence of objects read from the Pail.
sourceraw docstring

pailclj

(pail path)
(pail fs path)

Opens an existing Pail.

Opens an existing Pail.
sourceraw docstring

specclj

(spec structure)
(spec format structure opts)

Builds a PailSpec from a PailStructure.

Builds a PailSpec from a PailStructure.
sourceraw docstring

with-snapshotcljmacro

(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")]
    ...)
sourceraw docstring

write-objectsclj

(write-objects pail objects)

Writes a list of objects to a Pail.

Writes a list of objects to a Pail.
sourceraw docstring

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

× close