cl-postgres-plus-uuid

2018-10-18

Common Lisp library providing a cl-postgres SQL reader for the PostgreSQL UUID type.

Upstream URL

github.com/michaeljforster/cl-postgres-plus-uuid

Author

Michael J. Forster <mike@forsterfamily.ca>

License

MIT
README

cl-postgres-plus-uuid

cl-postgres-plus-uuid is a Common Lisp library that defines a cl-postgres SQL reader for the PostgreSQL UUID type.

cl-postgres-plus-uuid depends on cl-postgres and UUID.

cl-postgres-plus-uuid is being developed with SBCL, CCL, and LispWorks on OS X. cl-postgres-plus-uuid is being deployed with SBCL on FreeBSD/AMD64 and Linux/AMD64.

Installation

(ql:quickload "cl-postgres-plus-uuid")

Example

(defvar *connection* (cl-postgres:open-database *dbname* *dbuser* *dbpassword* *dbhost*))

(cl-postgres:exec-query *connection* "SELECT uuid_generate_v4();" 'cl-postgres:list-row-reader)
=> (("ce29603b-59b8-4354-9e3c-3798a10451de"))

(cl-postgres-plus-uuid:set-uuid-sql-reader)

(cl-postgres:exec-query *connection* "SELECT uuid_generate_v4();" 'cl-postgres:list-row-reader)
=> ((C526D222-9A51-4453-99D1-FCC691826020))

(type-of (caar *))
=> UUID:UUID

(cl-postgres:close-database *connection*)

License

cl-postgres-plus-uuid is distributed under the MIT license. See LICENSE.

Dependencies (2)

  • postmodern
  • uuid

Dependents (0)

    • GitHub
    • Quicklisp