40ants-pg - A set of utilities to work with Postgresql using Mito and Common Lisp.
40ANTS-PG ASDF System Details
Description: A set of utilities to work with Postgresql using Mito and Common Lisp.
Licence: Unlicense
Author: Alexander Artemenko <svetlyak.40wt@gmail.com>
Homepage: https://40ants.com/40ants-pg/
Bug tracker: https://github.com/40ants/40ants-pg/issues
Source control: GIT
Depends on: alexandria, bordeaux-threads, cl-dbi, cl-mustache, dbd-postgres, dbi, ironclad, local-time, log4cl, mito, secret-values, serapeum, snakes, str, sxql
Installation
You can install this library from Quicklisp, but you want to receive updates quickly, then install it from Ultralisp.org:
(ql-dist:install-dist "http://dist.ultralisp.org/"
:prompt nil)
(ql:quickload :40ants-pg)
Usage
TODO
: Write a library description. Put some examples here.
API
40ANTS-PG/CONNECTION
Classes
CONNECTION-ERROR
Readers
Functions
Macros
Establish a new connection and start transaction
40ANTS-PG/LOCKS
Classes
LOCK-TIMEOUT
Raised when you are trying to get lock to was unable to do this during current lock_timeout.
Readers
UNABLE-TO-AQUIRE-LOCK
Signaled if some thread was unable to get a lock on a database.
Readers
Macros
40ANTS-PG/QUERY
Functions
Iterates through all objects of given class fetching them in batches.
Returns CLOS
objects with given ids.
Results are returned in the same order as was in ids list. If some objects were not fetched, nil is returned at it's position in the resulting list.
40ANTS-PG/SETTINGS
Functions
40ANTS-PG/TRANSACTIONS
Macros
40ANTS-PG/UTILS
Functions
Given a list of items, returns a string like "(?,?,?)" where number of questionmarks corresponds to number of list items.