The postmodern Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The postmodern Reference Manual

This is the postmodern Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:26:00 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Postmodern

A Common Lisp PostgreSQL programming interface

Postmodern is a Common Lisp library for interacting with PostgreSQL databases. It is under active development. Features are:

The biggest differences between this library and CLSQL/CommonSQL or cl-dbi are that Postmodern has no intention of being portable across different SQL implementations (it embraces non-standard PostgreSQL features), and approaches extensions like lispy SQL and database access objects in a quite different way. This library was written because the CLSQL approach did not really work for me, your mileage may vary.

Contents


Dependencies


The library depends on usocket (except on SBCL and ACL, where the built-in socket library is used), md5, closer-mop, bordeaux-threads if you want thread-safe connection pools, and CL+SSL when SSL connections are needed.

Postmodern itself is split into four different packages, some of which can be used independently. Simple-date is a very basic implementation of date and time objects, used to support storing and retrieving time-related SQL types. CL-postgres is the low-level library used for interfacing with a PostgreSQL server over a socket. S-SQL is used to compile s-expressions to strings of SQL code, escaping any Lisp values inside, and doing as much as possible of the work at compile time. Finally, Postmodern itself is the library that tries to put all these things together into a convenient programming interface.

License


Postmodern is released under a zlib-style license. Which approximately means you can use the code in whatever way you like, except for passing it off as your own or releasing a modified version without indication that it is not the original.

Download and installation


We suggest using quicklisp for installation.

A git repository with the most recent changes can be viewed or checked out at https://github.com/marijnh/Postmodern

Quickstart


This quickstart is intended to give you a feel of the way coding with Postmodern works. Further details about the workings of the library can be found in the reference manual.

Assuming you have already installed it, first load and use the system:

(ql:quickload :postmodern)
(use-package :postmodern)

If you have a PostgreSQL server running on localhost, with a database called 'testdb' on it, which is accessible for user 'foucault' with password 'surveiller', you can connect like this:

(connect-toplevel "testdb" "foucault" "surveiller" "localhost")

Which will establish a connection to be used by all code, except for that wrapped in a with-connection form, which takes the same arguments but only establishes the connection locally.

Now for a basic sanity test:

(query "select 22, 'Folie et déraison', 4.5")
;; => ((22 "Folie et déraison" 9/2))

That should work. query is the basic way to send queries to the database. The same query can be expressed like this:

(query (:select 22 "Folie et déraison" 4.5))
;; => ((22 "Folie et déraison" 9/2))

In many contexts, query strings and lists starting with keywords can be used interchangeably. The lists will be compiled to SQL. The S-SQL manual describes the syntax used by these expressions. Lisp values occurring in them are automatically escaped. In the above query, only constant values are used, but it is possible to transparently use run-time values as well:

(defun database-powered-addition (a b)
  (query (:select (:+ a b)) :single))
(database-powered-addition 1030 204)
;; => 1234

That last argument, :single, indicates that we want the result not as a list of lists (for the result rows), but as a single value, since we know that we are only selecting one value. Some other options are :rows, :row, :column, :alists, and :none. Their precise effect is documented in the reference manual.

You do not have to pull in the whole result of a query at once, you can also iterate over it with the doquery macro:

(doquery (:select 'x 'y :from 'some-imaginary-table) (x y)
  (format t "On this row, x = ~A and y = ~A.~%" x y))

This is what a database-access class looks like:

(defclass country ()
  ((name :col-type string :initarg :name
         :reader country-name)
   (inhabitants :col-type integer :initarg :inhabitants
                :accessor country-inhabitants)
   (sovereign :col-type (or db-null string) :initarg :sovereign
              :accessor country-sovereign))
  (:metaclass dao-class)
  (:keys name))

The above defines a class that can be used to handle records in a table with three columns: name, inhabitants, and sovereign. In simple cases, the information above is enough to define the table as well:

(dao-table-definition 'country)
;; => "CREATE TABLE country (
;;      name TEXT NOT NULL,
;;      inhabitants INTEGER NOT NULL,
;;      sovereign TEXT,
;;      PRIMARY KEY (name))"
(execute (dao-table-definition 'country))

This defines our table in the database. execute works like query, but does not expect any results back.

Let us add a few countries:

(insert-dao (make-instance 'country :name "The Netherlands"
                                    :inhabitants 16800000
                                    :sovereign "Willem-Alexander"))
(insert-dao (make-instance 'country :name "Croatia"
                                    :inhabitants 4400000))

Then, to update Croatia's population, we could do this:

(let ((croatia (get-dao 'country "Croatia")))
  (setf (country-inhabitants croatia) 4500000)
  (update-dao croatia))
(query (:select '* :from 'country))
;; => (("The Netherlands" 16800000 "Willem-Alexander")
;;     ("Croatia" 4500000 :NULL))

Next, to demonstrate a bit more of the S-SQL syntax, here is the query the utility function list-tables uses to get a list of the tables in a database:

(sql (:select 'relname :from 'pg-catalog.pg-class
      :inner-join 'pg-catalog.pg-namespace :on (:= 'relnamespace 'pg-namespace.oid)
      :where (:and (:= 'relkind "r")
                   (:not-in 'nspname (:set "pg_catalog" "pg_toast"))
                   (:pg-catalog.pg-table-is-visible 'pg-class.oid))))
;; => "(SELECT relname FROM pg_catalog.pg_class
;;      INNER JOIN pg_catalog.pg_namespace ON (relnamespace = pg_namespace.oid)
;;      WHERE ((relkind = 'r') and (nspname NOT IN ('pg_catalog', 'pg_toast'))
;;             and pg_catalog.pg_table_is_visible(pg_class.oid)))"

sql is a macro that will simply compile a query, it can be useful for seeing how your queries are expanded or if you want to do something unexpected with them.

As you can see, lists starting with keywords are used to express SQL commands and operators (lists starting with something else will be evaluated and then inserted into the query). Quoted symbols name columns or tables (keywords can also be used but might introduce ambiguities). The syntax supports subqueries, multiple joins, stored procedures, etc. See the S-SQL reference manual for a complete treatment.

Finally, here is an example of the use of prepared statements:

(defprepared sovereign-of
  (:select 'sovereign :from 'country :where (:= 'name '$1))
  :single!)
(sovereign-of "The Netherlands")
;; => "Willem-Alexander"

The defprepared macro creates a function that takes the same amount of arguments as there are $X placeholders in the given query. The query will only be parsed and planned once (per database connection), which can be faster, especially for complex queries.

(disconnect-toplevel)

Reference


The reference manuals for the different components of Postmodern are kept in separate files. For using the library in the most straightforward way, you only really need to read the Postmodern reference and glance over the S-SQL reference. The simple-date reference explains the time-related data types included in Postmodern, and the CL-postgres reference might be useful if you just want a low-level library for talking to a PostgreSQL server.

Postmodern S-SQL Simple-date CL-postgres

Caveats and to-dos


Timezones

Simple-date has no concept of time zones. This means that using it is rather error-prone, and if you really need your time-keeping to be reliable and/or universal you should either not use the types it provides or think really hard about the way you handle time zones.

Recently, a lot of work has been done on local-time, which solves the same problem as simple-date, but does understand time zones. The 1.0 repository currently has code for integration with CL-postgres, though this might not be stable yet.

Portability

The Lisp code in Postmodern is theoretically portable across implementations, and seems to work on all major ones. Implementations that do not have meta-object protocol support will not have DAOs, but all other parts of the library should work (all widely used implementations do support this).

The library will definitely not work for PostgreSQL versions older than 7.4 (it uses a client/server protocol that was introduced in that version). On versions prior to 8.1, retrieving date and time objects is broken, because their binary representation was changed. Part of the functionality of insert-dao (automatic defaulting of unbound slots) only works in PostgreSQL 8.2 and up.

Things that should be implemented

It would be a nice feature if Postmodern could help you with defining your database schemas and, more importantly, updating your databases when your code changes. It would theoretically not be hard to build a function that compares a schema on the Lisp side with the state of the database, and helps you to interactively update your database. PostgreSQL has a quite complete introspection system. Unfortunately it would be a lot of work to implement this, since databases can contain so many different types of entities (tables, views, indices, procedures, constraints, sequences, etc.) which are all created, changed, and dropped in different ways.

Resources



Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Next: , Previous: , Up: Systems   [Contents][Index]

2.1 postmodern

Maintainer

Sabra Crolleton <sabra.crolleton@gmail.com>

Author

Marijn Haverbeke <marijnh@gmail.com>

License

BSD

Description

PostgreSQL programming API

Dependencies
Source

postmodern.asd (file)

Component

postmodern (module)


Next: , Previous: , Up: Systems   [Contents][Index]

2.2 s-sql

Dependency

cl-postgres (system)

Source

s-sql.asd (file)

Component

s-sql (module)


Previous: , Up: Systems   [Contents][Index]

2.3 cl-postgres

Description

Low-level client library for PostgreSQL

Dependencies
Source

cl-postgres.asd (file)

Component

cl-postgres (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Next: , Previous: , Up: Modules   [Contents][Index]

3.1 postmodern/postmodern

Parent

postmodern (system)

Location

postmodern/

Components

Next: , Previous: , Up: Modules   [Contents][Index]

3.2 s-sql/s-sql

Parent

s-sql (system)

Location

s-sql/

Component

s-sql.lisp (file)


Previous: , Up: Modules   [Contents][Index]

3.3 cl-postgres/cl-postgres

Parent

cl-postgres (system)

Location

cl-postgres/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 postmodern.asd

Location

postmodern.asd

Systems

postmodern (system)

Packages

postmodern-system


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 s-sql.asd

Location

s-sql.asd

Systems

s-sql (system)

Packages

s-sql-system


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 cl-postgres.asd

Location

cl-postgres.asd

Systems

cl-postgres (system)

Packages

cl-postgres-system

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 postmodern/postmodern/package.lisp

Parent

postmodern (module)

Location

postmodern/package.lisp

Packages

postmodern


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 postmodern/postmodern/connect.lisp

Dependency

package.lisp (file)

Parent

postmodern (module)

Location

postmodern/connect.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.6 postmodern/postmodern/query.lisp

Dependency

connect.lisp (file)

Parent

postmodern (module)

Location

postmodern/query.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.7 postmodern/postmodern/prepare.lisp

Dependency

query.lisp (file)

Parent

postmodern (module)

Location

postmodern/prepare.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.8 postmodern/postmodern/util.lisp

Dependency

query.lisp (file)

Parent

postmodern (module)

Location

postmodern/util.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.9 postmodern/postmodern/transaction.lisp

Dependency

query.lisp (file)

Parent

postmodern (module)

Location

postmodern/transaction.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.10 postmodern/postmodern/namespace.lisp

Dependency

query.lisp (file)

Parent

postmodern (module)

Location

postmodern/namespace.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.11 postmodern/postmodern/table.lisp

If Feature

postmodern-use-mop

Dependencies
Parent

postmodern (module)

Location

postmodern/table.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.12 postmodern/postmodern/deftable.lisp

Dependencies
Parent

postmodern (module)

Location

postmodern/deftable.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.13 s-sql/s-sql/s-sql.lisp

Parent

s-sql (module)

Location

s-sql/s-sql.lisp

Packages

s-sql

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.14 cl-postgres/cl-postgres/trivial-utf-8.lisp

Parent

cl-postgres (module)

Location

cl-postgres/trivial-utf-8.lisp

Packages

cl-postgres-trivial-utf-8

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.15 cl-postgres/cl-postgres/ieee-floats.lisp

Parent

cl-postgres (module)

Location

cl-postgres/ieee-floats.lisp

Packages

cl-postgres-ieee-floats

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.16 cl-postgres/cl-postgres/features.lisp

Parent

cl-postgres (module)

Location

cl-postgres/features.lisp

Packages

cl-postgres.features


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.17 cl-postgres/cl-postgres/package.lisp

Dependency

features.lisp (file)

Parent

cl-postgres (module)

Location

cl-postgres/package.lisp

Packages
Internal Definitions

*optimize* (special variable)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.18 cl-postgres/cl-postgres/errors.lisp

Dependency

package.lisp (file)

Parent

cl-postgres (module)

Location

cl-postgres/errors.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.19 cl-postgres/cl-postgres/sql-string.lisp

Dependency

package.lisp (file)

Parent

cl-postgres (module)

Location

cl-postgres/sql-string.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.20 cl-postgres/cl-postgres/strings-utf-8.lisp

Dependencies
Parent

cl-postgres (module)

Location

cl-postgres/strings-utf-8.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.21 cl-postgres/cl-postgres/communicate.lisp

Dependencies
Parent

cl-postgres (module)

Location

cl-postgres/communicate.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.22 cl-postgres/cl-postgres/messages.lisp

Dependency

communicate.lisp (file)

Parent

cl-postgres (module)

Location

cl-postgres/messages.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.23 cl-postgres/cl-postgres/oid.lisp

Dependency

package.lisp (file)

Parent

cl-postgres (module)

Location

cl-postgres/oid.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.24 cl-postgres/cl-postgres/interpret.lisp

Dependencies
Parent

cl-postgres (module)

Location

cl-postgres/interpret.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.25 cl-postgres/cl-postgres/protocol.lisp

Dependencies
Parent

cl-postgres (module)

Location

cl-postgres/protocol.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.26 cl-postgres/cl-postgres/public.lisp

Dependency

protocol.lisp (file)

Parent

cl-postgres (module)

Location

cl-postgres/public.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.27 cl-postgres/cl-postgres/bulk-copy.lisp

Dependency

public.lisp (file)

Parent

cl-postgres (module)

Location

cl-postgres/bulk-copy.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 postmodern-system

Source

postmodern.asd

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.2 postmodern

Source

package.lisp (file)

Nickname

pomo

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.3 s-sql-system

Source

s-sql.asd

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.4 s-sql

Source

s-sql.lisp (file)

Use List

common-lisp

Used By List

postmodern

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.5 cl-postgres-system

Source

cl-postgres.asd

Use List
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.6 cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.7 cl-postgres-ieee-floats

Source

ieee-floats.lisp (file)

Use List

common-lisp

Exported Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.8 cl-postgres.features

Source

features.lisp (file)

Use List

common-lisp


Next: , Previous: , Up: Packages   [Contents][Index]

5.9 cl-postgres-oid

Source

package.lisp (file)

Nickname

oid

Use List

common-lisp

Exported Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.10 cl-postgres-error

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

5.11 cl-postgres

Source

package.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Constants

Constant: +abstime+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +aclitem+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +any+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +any-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +anyelement+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +anyenum+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +anynon-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +anyrange+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +bit+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +bit-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +bool+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +bool-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +box+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +box-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +bpchar+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +bpchar-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +bytea+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +bytea-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +cash+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +char+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +char-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +cid+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +cidr+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +circle+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +cstring+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +cstring-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +date+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +date-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +evttrigger+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +fdw-handler+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +float4+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +float4-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +float8+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +float8-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +gtsvector+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +index-am-handler+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +inet+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +int2+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +int2-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +int2vector+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +int4+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +int4-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +int4range+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +int8+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +int8-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +internal+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +interval+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +interval-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +json+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +jsonb+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +language-handler+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +line+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +lseg+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +lseg-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +lsn+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +macaddr+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +name+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +name-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +numeric+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +numeric-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +oid+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +oid-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +oid-vector+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +opaque+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +path+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +pgddlcommand+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +pgnodetree+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +point+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +point-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +polygon+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +record+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +record-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +refcursor+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +regclass+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +regconfig+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +regdictionary+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +regnamespace+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +regoper+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +regoperator+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +regproc+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +regprocedure+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +regrole+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +regtype+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +regtype-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +reltime+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +text+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +text-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +tid+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +time+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +time-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +timestamp+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +timestamp-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +timestamptz+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +timestamptz-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +timetz+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +tinterval+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +trigger+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +tsm-handler+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +tsquery+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +tsvector+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +unknown+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +uuid+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +v-oid+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +varbit+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +varbit-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +varchar+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +varchar-array+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +xid+
Package

cl-postgres-oid

Source

oid.lisp (file)

Constant: +xml+
Package

cl-postgres-oid

Source

oid.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Special variables

Special Variable: *current-logical-transaction*
Package

postmodern

Source

transaction.lisp (file)

Special Variable: *database*

Special holding the current database. Most functions and macros operating on a database assume this contains a connected database.

Package

postmodern

Source

connect.lisp (file)

Special Variable: *default-use-ssl*
Package

postmodern

Source

connect.lisp (file)

Special Variable: *downcase-symbols*
Package

s-sql

Source

s-sql.lisp (file)

Special Variable: *escape-sql-names-p*

Setting this to T will make S-SQL add double quotes around identifiers in queries. Setting it :auto will turn on this behaviour only for reserved words.

Package

s-sql

Source

s-sql.lisp (file)

Special Variable: *ignore-unknown-columns*
Package

postmodern

Source

table.lisp (file)

Special Variable: *max-pool-size*

The maximum amount of connection that will be kept in a single pool, or NIL for no maximum.

Package

postmodern

Source

connect.lisp (file)

Special Variable: *query-callback*
Package

cl-postgres

Source

errors.lisp (file)

Special Variable: *query-log*
Package

cl-postgres

Source

errors.lisp (file)

Special Variable: *read-row-values-as-binary*

Controls whether row values (as in select row(1, ’foo’) ) should be received from the database in text or binary form. The default value is nil, specifying that the results be sent back as text. Set this to t to cause the results to be read as binary.

Package

cl-postgres

Source

interpret.lisp (file)

Special Variable: *silently-truncate-rationals*
Package

cl-postgres

Source

sql-string.lisp (file)

Special Variable: *sql-readtable*

The exported special var holding the current read table, a hash mapping OIDs to instances of the type-interpreter class that contain functions for retreiving values from the database in text, and possible binary, form.

Package

cl-postgres

Source

interpret.lisp (file)

Special Variable: *ssl-certificate-file*

When set to a filename, this file will be used as client certificate for SSL connections.

Package

cl-postgres

Source

protocol.lisp (file)

Special Variable: *ssl-key-file*

When set to a filename, this file will be used as client key for SSL connections.

Package

cl-postgres

Source

protocol.lisp (file)

Special Variable: *standard-sql-strings*

Indicate whether S-SQL will use standard SQL strings (just use ” for #’), or backslash-style escaping. Setting this to NIL is always safe, but when the server is configured to allow standard strings (parameter ’standard_conforming_strings’ is ’on’), the noise in queries can be reduced by setting this to T.

Package

s-sql

Source

s-sql.lisp (file)

Special Variable: *table-name*

Used inside deftable to find the name of the table being defined.

Package

postmodern

Source

deftable.lisp (file)

Special Variable: *table-symbol*

Used inside deftable to find the symbol naming the table being defined.

Package

postmodern

Source

deftable.lisp (file)

Special Variable: *unix-socket-dir*

Directory where the Unix domain socket for PostgreSQL be found.

Package

cl-postgres

Source

public.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Macros

Macro: def-row-reader NAME (FIELDS) &body BODY

Create a row reader, as in the row-reader macro, and assign a name to it.

Package

cl-postgres

Source

protocol.lisp (file)

Macro: define-dao-finalization ((DAO-NAME CLASS) &rest KEYWORD-ARGS) &body BODY
Package

postmodern

Source

table.lisp (file)

Macro: defprepared NAME QUERY &optional FORMAT

Like perpare, but gives the function a name instead of returning it.

Package

postmodern

Source

prepare.lisp (file)

Macro: defprepared-with-names NAME (&rest ARGS) (QUERY &rest QUERY-ARGS) &optional FORMAT

Like defprepared, but with lambda list for statement arguments.

Package

postmodern

Source

prepare.lisp (file)

Macro: deftable NAME &body DEFINITIONS

Define a table. name can be either a symbol or a (symbol string) list. In the first case, the table name is derived from the symbol by S-SQL’s rules, in the second case, the name is given explicitly. The body of definitions can contain anything that evaluates to a string, as well as S-SQL expressions. In this body, the variables *table-name* and *table-symbol* are bound to the relevant values.

Package

postmodern

Source

deftable.lisp (file)

Macro: do-query-dao ((TYPE TYPE-VAR) QUERY) &body BODY

Like query-dao, but rather than returning a list of results, executes BODY once for each result, with TYPE-VAR bound to the DAO representing that result.

Package

postmodern

Source

table.lisp (file)

Macro: do-select-dao ((TYPE TYPE-VAR) &optional TEST &rest ORDERING) &body BODY

Like select-dao, but rather than returning a list of results, executes BODY once for each result, with TYPE-VAR bound to the DAO representing that result.

Package

postmodern

Source

table.lisp (file)

Macro: doquery QUERY (&rest NAMES) &body BODY

Iterate over the rows in the result of a query, binding the given names to the results and executing body for every row. Query can be a string, an s-sql query, or a list starting with one of those, followed by the arguments to parameterize the query with.

Package

postmodern

Source

query.lisp (file)

Macro: ensure-transaction &body BODY

Executes body within a with-transaction form if and only if no transaction is already in progress.

Package

postmodern

Source

transaction.lisp (file)

Macro: execute QUERY &rest ARGS

Execute a query, ignore the results.

Package

postmodern

Source

query.lisp (file)

Macro: make-float-converters ENCODER-NAME DECODER-NAME EXPONENT-BITS SIGNIFICAND-BITS SUPPORT-NAN-AND-INFINITY-P

Writes an encoder and decoder function for floating point numbers with the given amount of exponent and significand bits (plus an extra sign bit). If support-nan-and-infinity-p is true, the decoders will also understand these special cases. NaN is represented as :not-a-number, and the infinities as :positive-infinity and :negative-infinity. Note that this means that the in- or output of these functions is not just floating point numbers anymore, but also keywords.

Package

cl-postgres-ieee-floats

Source

ieee-floats.lisp (file)

Macro: prepare QUERY &optional FORMAT

Wraps a query into a function that will prepare it once for a connection, and then execute it with the given parameters. The query should contain a placeholder ($1, $2, etc) for every parameter.

Package

postmodern

Source

prepare.lisp (file)

Macro: query QUERY &rest ARGS/FORMAT

Execute a query, optionally with arguments to put in the place of
$X elements. If one of the arguments is a known result style or a class name, it specifies the format in which the results should be returned.

Package

postmodern

Source

query.lisp (file)

Macro: query-dao TYPE QUERY &rest ARGS

Execute a query and return the result as daos of the given type. The fields returned by the query must match the slots of the dao, both by type and by name.

Package

postmodern

Source

table.lisp (file)

Macro: register-sql-operators ARITY &rest NAMES

Define simple operators. Arity is one of :unary (like
’not’), :unary-postfix (the operator comes after the operand), :n-ary (like ’+’: the operator falls away when there is only one operand), :2+-ary (like ’=’, which is meaningless for one operand), or :n-or-unary (like ’-’, where the operator is kept in the unary case). After the arity follow any number of operators, either just a keyword, in which case the downcased symbol name is used as the operator, or a two-element list containing a keyword and a name string.

Package

s-sql

Source

s-sql.lisp (file)

Macro: row-reader (FIELDS) &body BODY

Create a row-reader, using the given name for the fields argument and the given body for reading the rows. A row reader is a function that is used to do something with the results of a query. It has two local functions: next-row and next-field, the first should be called once per row and will return a boolean indicating whether there are any more rows, the second should be called once for every element in the fields vector, with that field as argument, to read a single value in a row. See list-row-reader in public.lisp for an example.

Package

cl-postgres

Source

protocol.lisp (file)

Macro: select-dao TYPE &optional TEST &rest ORDERING

Select daos for the rows in its table for which the given test holds, order them by the given criteria.

Package

postmodern

Source

table.lisp (file)

Macro: sql FORM

Compile form to an sql expression as far as possible.

Package

s-sql

Source

s-sql.lisp (file)

Macro: with-binary-row-values &body BODY

Helper macro to locally set *read-row-values-as-binary* to t while executing body so that row values will be returned as binary.

Package

cl-postgres

Source

interpret.lisp (file)

Macro: with-column-writers (&rest DEFS) &body BODY
Package

postmodern

Source

table.lisp (file)

Macro: with-connection SPEC &body BODY

Locally establish a database connection, and bind *database* to it.

Package

postmodern

Source

connect.lisp (file)

Macro: with-logical-transaction (&optional NAME) &body BODY

Executes the body within a with-transaction (if no transaction is already in progress) or a with-savepoint (if one is), binding the transaction or savepoint to NAME (if supplied)

Package

postmodern

Source

transaction.lisp (file)

Macro: with-savepoint NAME &body BODY

Execute the body within a savepoint, releasing savepoint when the body exits normally, and rolling back otherwise. NAME is both the variable that can be used to release or rolled back before the body unwinds, and the SQL name of the savepoint.

Package

postmodern

Source

transaction.lisp (file)

Macro: with-schema (SCHEMA &key STRICT IF-NOT-EXIST DROP-AFTER) &body FORM

A macro to set the schema search path of the postgresql
database to include as first entry a specified schema.

calling with strict ’t only the specified schema is set as current
search path. All other schema are then not searched any more.

calling with if-not-exist set to :create the schema is created if
this schema did not exist.

calling with drop-after set to ’t the schema is removed after the execution of the body form.

example :
(with-schema (:schema-name :strict nil :drop-after nil :if-not-exist :error) (foo 1)
(foo 2))

Package

postmodern

Source

namespace.lisp (file)

Macro: with-text-row-values &body BODY

Helper macro to locally set *read-row-values-as-binary* to nil while executing body so that row values will be returned as t.

Package

cl-postgres

Source

interpret.lisp (file)

Macro: with-transaction (&optional NAME) &body BODY

Execute the body within a database transaction, committing when the body exits normally, and aborting otherwise. An optional name can be given to the transaction, which can be used to force a commit or abort before the body unwinds.

Package

postmodern

Source

transaction.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Functions

Function: !dao-def ()

Used inside a deftable form. Define this table using the corresponding DAO class’ slots.

Package

postmodern

Source

deftable.lisp (file)

Function: !foreign TARGET FIELDS &rest TARGET-FIELDS/ON-DELETE/ON-UPDATE/DEFERRABLE/INITIALLY-DEFERRED

Used inside a deftable form. Define a foreign key on this table. Pass a table the index refers to, a list of fields or single field in *this* table, and, if the fields have different names in the table referred to, another field or list of fields for the target table, or :primary-key to indicate that the other table’s primary key should be referenced.

Package

postmodern

Source

deftable.lisp (file)

Function: !index &rest FIELDS

Used inside a deftable form. Define an index on the defined table.

Package

postmodern

Source

deftable.lisp (file)

Function: !unique TARGET-FIELDS &key DEFERRABLE INITIALLY-DEFERRED
Package

postmodern

Source

deftable.lisp (file)

Function: !unique-index &rest FIELDS

Used inside a deftable form. Define a unique index on the defined table.

Package

postmodern

Source

deftable.lisp (file)

Function: abort-transaction TRANSACTION

Immediately abort an open transaction.

Package

postmodern

Source

transaction.lisp (file)

Function: alist-row-reader G0 FIELDS
Package

cl-postgres

Source

public.lisp (file)

Function: call-with-connection SPEC THUNK

Binds *database* to a new connection, as specified by the spec argument, which should be a list of arguments that can be passed to connect, and runs the function given as a second argument with that database.

Package

postmodern

Source

connect.lisp (file)

Function: clear-connection-pool ()

Disconnect and remove all connections in the connection pool.

Package

postmodern

Source

connect.lisp (file)

Function: close-database CONNECTION

Gracefully disconnect a database connection.

Package

cl-postgres

Source

public.lisp (file)

Function: close-db-writer SELF &key ABORT
Package

cl-postgres

Source

bulk-copy.lisp (file)

Function: coalesce &rest ARGS
Package

postmodern

Source

util.lisp (file)

Function: commit-transaction TRANSACTION

Immediately commit an open transaction.

Package

postmodern

Source

transaction.lisp (file)

Function: connect DATABASE USER PASSWORD HOST &key PORT POOLED-P USE-SSL SERVICE

Create and return a database connection.

Package

postmodern

Source

connect.lisp (file)

Function: connect-toplevel DATABASE USER PASSWORD HOST &key PORT USE-SSL

Set *database* to a new connection. Use this if you only need one connection, or if you want a connection for debugging from the REPL.

Package

postmodern

Source

connect.lisp (file)

Function: connected-p DATABASE

Test whether a database connection is still connected.

Package

postmodern

Source

connect.lisp (file)

Function: connection-meta CONNECTION

Retrieves the meta field of a connection, the primary purpose of which is to store information about the prepared statements that exists for it.

Package

cl-postgres

Source

public.lisp (file)

Function: copy-sql-readtable &optional TABLE
Package

cl-postgres

Source

interpret.lisp (file)

Function: create-all-tables ()

Create all defined tables.

Package

postmodern

Source

deftable.lisp (file)

Function: create-package-tables PACKAGE

Create all tables whose identifying symbol is interned in the given package.

Package

postmodern

Source

deftable.lisp (file)

Function: create-schema SCHEMA

Creating a non existing schema.
If the schema exists an error is raised.

Package

postmodern

Source

namespace.lisp (file)

Function: create-table NAME

Create a defined table.

Package

postmodern

Source

deftable.lisp (file)

Function: dao-table-definition TABLE

Generate the appropriate CREATE TABLE query for this class.

Package

postmodern

Source

table.lisp (file)

Function: dao-table-name CLASS
Package

postmodern

Source

table.lisp (file)

Function: database-error-constraint-name ERR

Given a database-error for an integrity violation, will attempt to extract the constraint name.

Package

cl-postgres

Source

errors.lisp (file)

Function: database-open-p CONNECTION

Returns a boolean indicating whether the given connection is currently connected.

Package

cl-postgres

Source

public.lisp (file)

Function: db-write-row SELF ROW &optional DATA
Package

cl-postgres

Source

bulk-copy.lisp (file)

Function: decode-float32 BITS
Package

cl-postgres-ieee-floats

Source

ieee-floats.lisp (file)

Function: decode-float64 BITS
Package

cl-postgres-ieee-floats

Source

ieee-floats.lisp (file)

Function: default-sql-readtable ()
Package

cl-postgres

Source

interpret.lisp (file)

Function: disconnect-toplevel ()

Disconnect *database*.

Package

postmodern

Source

connect.lisp (file)

Function: drop-schema SCHEMA &key CASCADE

Drops an existing database schema ’schema’

Package

postmodern

Source

namespace.lisp (file)

Function: enable-s-sql-syntax &optional CHAR

Enable a syntactic shortcut #Q(...) for (sql (...)). Optionally takes a character to use instead of #\Q.

Package

s-sql

Source

s-sql.lisp (file)

Function: encode-float32 FLOAT
Package

cl-postgres-ieee-floats

Source

ieee-floats.lisp (file)

Function: encode-float64 FLOAT
Package

cl-postgres-ieee-floats

Source

ieee-floats.lisp (file)

Function: exec-prepared CONNECTION NAME PARAMETERS &optional ROW-READER

Execute a previously prepared query with the given parameters, apply a row-reader to the result.

Package

cl-postgres

Source

public.lisp (file)

Function: exec-query CONNECTION QUERY &optional ROW-READER

Execute a query string and apply the given row-reader to the result.

Package

cl-postgres

Source

public.lisp (file)

Function: from-sql-name STR

Convert a string to something that might have been its original lisp name (does not work if this name contained non-alphanumeric characters other than #-)

Package

s-sql

Source

s-sql.lisp (file)

Function: get-search-path ()
Package

postmodern

Source

namespace.lisp (file)

Function: ignore-row-reader G0 FIELDS
Package

cl-postgres

Source

public.lisp (file)

Function: list-row-reader G0 FIELDS
Package

cl-postgres

Source

public.lisp (file)

Function: list-schemata ()

List all existing user defined schemata.

Note: The query uses the portable information_schema relations instead of pg_tables relations
SELECT schema_name FROM information_schema.schemata where schema_name !~ ’(pg_*)|information_schema’ ORDER BY schema_name ;

Package

postmodern

Source

namespace.lisp (file)

Function: list-sequences &optional STRINGS-P

Return a list of the sequences in a database. Turn them into keywords if strings-p is not true.

Package

postmodern

Source

util.lisp (file)

Function: list-tables &optional STRINGS-P

Return a list of the tables in a database. Turn them into keywords if strings-p is not true.

Package

postmodern

Source

util.lisp (file)

Function: list-views &optional STRINGS-P

Return a list of the views in a database. Turn them into keywords if strings-p is not true.

Package

postmodern

Source

util.lisp (file)

Function: log-query QUERY TIME-UNITS
Package

cl-postgres

Source

errors.lisp (file)

Function: open-database DATABASE USER PASSWORD HOST &optional PORT USE-SSL SERVICE

Create and connect a database object. use-ssl may be :no, :yes, or :try.

Package

cl-postgres

Source

public.lisp (file)

Function: open-db-writer DB-SPEC TABLE COLUMNS
Package

cl-postgres

Source

bulk-copy.lisp (file)

Function: prepare-query CONNECTION NAME QUERY

Prepare a query string and store it under the given name.

Package

cl-postgres

Source

public.lisp (file)

Function: read-utf-8-string INPUT &key NULL-TERMINATED STOP-AT-EOF CHAR-LENGTH BYTE-LENGTH

Read utf-8 encoded data from a byte stream and construct a string with the characters found. When null-terminated is given it will stop reading at a null character, stop-at-eof tells it to stop at the end of file without raising an error, and the char-length and byte-length parameters can be used to specify the max amount of characters or bytes to read.

Package

cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)

Function: release-savepoint SAVEPOINT

Immediately release a savepoint, commiting its results.

Package

postmodern

Source

transaction.lisp (file)

Function: reopen-database CONN

Reconnect a disconnected database connection.

Package

cl-postgres

Source

public.lisp (file)

Function: rollback-savepoint SAVEPOINT

Immediately roll back a savepoint, aborting it results.

Package

postmodern

Source

transaction.lisp (file)

Function: save-dao DAO

Try to insert the content of a DAO. If this leads to a unique key violation, update it instead.

Package

postmodern

Source

table.lisp (file)

Function: save-dao/transaction DAO
Package

postmodern

Source

table.lisp (file)

Function: schema-exist-p NAME

Predicate for schema existence. Deprecated for schema-exits-p.

Package

postmodern

Source

namespace.lisp (file)

Function: sequence-exists-p SEQUENCE

Check whether a sequence exists. Takes either a string or a symbol for the sequence name.

Package

postmodern

Source

util.lisp (file)

Function: sequence-next SEQUENCE

Shortcut for getting the next value from a sequence.

Package

postmodern

Source

util.lisp (file)

Function: set-search-path PATH
Package

postmodern

Source

namespace.lisp (file)

Function: set-sql-datetime-readers &key DATE TIMESTAMP TIMESTAMP-WITH-TIMEZONE INTERVAL TIME TABLE
Package

cl-postgres

Source

interpret.lisp (file)

Function: set-sql-reader OID FUNCTION &key TABLE BINARY-P

Add an sql reader to a readtable. When the reader is not binary, it is wrapped by a function that will read the string from the socket.

Package

cl-postgres

Source

interpret.lisp (file)

Function: sql-compile FORM
Package

s-sql

Source

s-sql.lisp (file)

Function: sql-error CONTROL &rest ARGS
Package

s-sql

Source

s-sql.lisp (file)

Function: sql-escape-string STRING &optional PREFIX

Escape string data so it can be used in a query.

Package

s-sql

Source

s-sql.lisp (file)

Function: sql-template FORM
Package

s-sql

Source

s-sql.lisp (file)

Function: string-to-utf-8-bytes STRING &key NULL-TERMINATE

Convert a string into an array of unsigned bytes containing its utf-8 representation.

Package

cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)

Function: table-description TABLE &optional SCHEMA-NAME

Return a list of (name type null-allowed) lists for the fields of a table. If SCHEMA-NAME is specified, only fields from that schema are returned.

Package

postmodern

Source

util.lisp (file)

Function: table-exists-p TABLE

Check whether a table exists. Takes either a string or a symbol for the table name.

Package

postmodern

Source

util.lisp (file)

Function: to-sql-name ()

Convert a symbol or string into a name that can be an sql table,
column, or operation name. Add quotes when escape-p is true, or
escape-p is :auto and the name contains reserved words.
Quoted or delimited identifiers can be used by passing :literal as
the value of escape-p. If escape-p is :literal, and the name is a string then the string is still escaped but the symbol or string is not downcased, regardless of the setting for *downcase-symbols* and the hyphen
and forward slash characters are not replaced with underscores.

Package

s-sql

Source

s-sql.lisp (file)

Function: unprepare-query CONNECTION NAME

Close the prepared query given by name.

Package

cl-postgres

Source

public.lisp (file)

Function: utf-8-byte-length STRING

Calculate the amount of bytes needed to encode a string.

Package

cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)

Function: utf-8-bytes-to-string BYTES-IN &key START END

Convert a byte array containing utf-8 encoded characters into the string it encodes.

Package

cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)

Function: utf-8-group-size BYTE

Determine the amount of bytes that are part of the character starting with a given byte.

Package

cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)

Function: vector-row-reader G0 FIELDS
Package

cl-postgres

Source

public.lisp (file)

Function: view-exists-p VIEW

Check whether a view exists. Takes either a string or a symbol for the view name.

Package

postmodern

Source

util.lisp (file)

Function: wait-for-notification CONNECTION

Perform a blocking wait for asynchronous notification. Return the channel string, the payload and notifying pid as multiple values.

Package

cl-postgres

Source

public.lisp (file)

Function: write-utf-8-bytes STRING OUTPUT &key NULL-TERMINATE

Write a string to a byte-stream, encoding it as utf-8.

Package

cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.5 Generic functions

Generic Function: abort-hooks OBJECT
Generic Function: (setf abort-hooks) NEW-VALUE OBJECT
Package

postmodern

Methods
Method: abort-hooks (TRANSACTION-HANDLE transaction-handle)

automatically generated reader method

Source

transaction.lisp (file)

Method: (setf abort-hooks) NEW-VALUE (TRANSACTION-HANDLE transaction-handle)

automatically generated writer method

Source

transaction.lisp (file)

Generic Function: commit-hooks OBJECT
Generic Function: (setf commit-hooks) NEW-VALUE OBJECT
Package

postmodern

Methods
Method: commit-hooks (TRANSACTION-HANDLE transaction-handle)

automatically generated reader method

Source

transaction.lisp (file)

Method: (setf commit-hooks) NEW-VALUE (TRANSACTION-HANDLE transaction-handle)

automatically generated writer method

Source

transaction.lisp (file)

Generic Function: connection-parameters OBJECT
Generic Function: (setf connection-parameters) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: connection-parameters (DATABASE-CONNECTION database-connection)

automatically generated reader method

Source

public.lisp (file)

Method: (setf connection-parameters) NEW-VALUE (DATABASE-CONNECTION database-connection)

automatically generated writer method

Source

public.lisp (file)

Generic Function: dao-exists-p DAO

Return a boolean indicating whether the given dao exists in the database.

Package

postmodern

Source

table.lisp (file)

Generic Function: dao-keys OBJECT
Package

postmodern

Methods
Method: dao-keys DAO
Source

table.lisp (file)

Method: dao-keys (CLASS-NAME symbol)
Source

table.lisp (file)

Method: dao-keys (CLASS dao-class) before
Source

table.lisp (file)

Method: dao-keys (DAO-CLASS dao-class)

automatically generated reader method

Source

table.lisp (file)

Generic Function: database-error-cause CONDITION
Package

cl-postgres

Methods
Method: database-error-cause (CONDITION database-error)
Source

errors.lisp (file)

Generic Function: database-error-code CONDITION
Package

cl-postgres

Methods
Method: database-error-code (CONDITION database-error)
Source

errors.lisp (file)

Generic Function: database-error-detail CONDITION
Package

cl-postgres

Methods
Method: database-error-detail (CONDITION database-error)
Source

errors.lisp (file)

Generic Function: database-error-message CONDITION
Generic Function: (setf database-error-message) NEW-VALUE CONDITION
Package

cl-postgres

Methods
Method: database-error-message (CONDITION database-error)
Method: (setf database-error-message) NEW-VALUE (CONDITION database-error)
Source

errors.lisp (file)

Generic Function: database-error-query CONDITION
Package

cl-postgres

Methods
Method: database-error-query (CONDITION database-error)
Source

errors.lisp (file)

Generic Function: delete-dao DAO

Delete the given dao from the database.

Package

postmodern

Source

table.lisp (file)

Generic Function: disconnect DATABASE

Close a database connection. Returns it to a pool if it is a pooled connection.

Package

postmodern

Source

connect.lisp (file)

Methods
Method: disconnect (CONNECTION pooled-database-connection)

Add the connection to the corresponding pool, or drop it when the pool is full.

Method: disconnect (CONNECTION database-connection)
Generic Function: field-name OBJECT
Generic Function: (setf field-name) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: field-name (FIELD-DESCRIPTION field-description)

automatically generated reader method

Source

protocol.lisp (file)

Method: (setf field-name) NEW-VALUE (FIELD-DESCRIPTION field-description)

automatically generated writer method

Source

protocol.lisp (file)

Generic Function: field-type OBJECT
Generic Function: (setf field-type) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: field-type (FIELD-DESCRIPTION field-description)

automatically generated reader method

Source

protocol.lisp (file)

Method: (setf field-type) NEW-VALUE (FIELD-DESCRIPTION field-description)

automatically generated writer method

Source

protocol.lisp (file)

Generic Function: get-dao TYPE &rest ARGS

Get the object corresponding to the given primary key, or return nil if it does not exist.

Package

postmodern

Source

table.lisp (file)

Methods
Method: get-dao (CLASS-NAME symbol) &rest ARGS
Generic Function: insert-dao DAO

Insert the given object into the database.

Package

postmodern

Source

table.lisp (file)

Generic Function: make-dao TYPE &rest ARGS &key &allow-other-keys

Make the instance of the given class and insert it into the database

Package

postmodern

Source

table.lisp (file)

Methods
Method: make-dao (CLASS-NAME symbol) &rest ARGS &key &allow-other-keys
Method: make-dao (CLASS dao-class) &rest ARGS &key &allow-other-keys
Generic Function: postgresql-notification-channel CONDITION
Generic Function: (setf postgresql-notification-channel) NEW-VALUE CONDITION
Package

cl-postgres

Methods
Method: postgresql-notification-channel (CONDITION postgresql-notification)
Method: (setf postgresql-notification-channel) NEW-VALUE (CONDITION postgresql-notification)
Source

protocol.lisp (file)

Generic Function: postgresql-notification-payload CONDITION
Generic Function: (setf postgresql-notification-payload) NEW-VALUE CONDITION
Package

cl-postgres

Methods
Method: postgresql-notification-payload (CONDITION postgresql-notification)
Method: (setf postgresql-notification-payload) NEW-VALUE (CONDITION postgresql-notification)
Source

protocol.lisp (file)

Generic Function: postgresql-notification-pid CONDITION
Generic Function: (setf postgresql-notification-pid) NEW-VALUE CONDITION
Package

cl-postgres

Methods
Method: postgresql-notification-pid (CONDITION postgresql-notification)
Method: (setf postgresql-notification-pid) NEW-VALUE (CONDITION postgresql-notification)
Source

protocol.lisp (file)

Generic Function: reconnect DATABASE

Reconnect a database connection.

Package

postmodern

Source

connect.lisp (file)

Methods
Method: reconnect (DATABASE database-connection)
Method: reconnect (CONNECTION pooled-database-connection)
Generic Function: serialize-for-postgres ARG

Conversion function used to turn a lisp value into a value that PostgreSQL understands when sent through its socket connection. May return a string or a (vector (unsigned-byte 8)).

Package

cl-postgres

Source

sql-string.lisp (file)

Methods
Method: serialize-for-postgres ARG
Generic Function: sql-escape ARG

Get the representation of a Lisp value so that it can be used in a query.

Package

s-sql

Source

s-sql.lisp (file)

Methods
Method: sql-escape (ARG symbol)
Method: sql-escape (ARG vector)
Method: sql-escape ARG
Generic Function: sql-type-name LISP-TYPE &rest ARGS

Transform a lisp type into a string containing
something SQL understands. Default is to just use the type symbol’s name.

Package

s-sql

Source

s-sql.lisp (file)

Methods
Method: sql-type-name (LISP-TYPE symbol) &rest ARGS
Method: sql-type-name (LISP-TYPE (eql string)) &rest ARGS
Method: sql-type-name (LISP-TYPE (eql varchar)) &rest ARGS
Method: sql-type-name (LISP-TYPE (eql numeric)) &rest ARGS
Method: sql-type-name (LISP-TYPE (eql float)) &rest ARGS
Method: sql-type-name (LISP-TYPE (eql double-float)) &rest ARGS
Method: sql-type-name (LISP-TYPE (eql double-precision)) &rest ARGS
Method: sql-type-name (LISP-TYPE (eql serial)) &rest ARGS
Method: sql-type-name (LISP-TYPE (eql serial8)) &rest ARGS
Method: sql-type-name (LISP-TYPE (eql array)) &rest ARGS
Method: sql-type-name (LISP-TYPE (eql db-null)) &rest ARGS
Generic Function: to-sql-string ARG

Turn a lisp value into a string containing its SQL representation. Returns an optional second value that indicates whether the string should be escaped before being put into a query.

Package

cl-postgres

Source

sql-string.lisp (file)

Methods
Method: to-sql-string (ARG string)
Method: to-sql-string (ARG vector)
Method: to-sql-string (ARG array)
Method: to-sql-string (ARG integer)
Method: to-sql-string (ARG float)
Method: to-sql-string (ARG double-float)
Method: to-sql-string (ARG ratio)
Method: to-sql-string (ARG (eql t))
Method: to-sql-string (ARG (eql nil))
Method: to-sql-string (ARG (eql null))
Method: to-sql-string ARG
Generic Function: update-dao DAO

Update the object’s representation in the database with the values in the given instance.

Package

postmodern

Source

table.lisp (file)

Generic Function: upsert-dao DAO

Update or insert the given dao. If its primary key
is already in the database and all slots are bound, an update will occur. Otherwise it tries to insert it.

Package

postmodern

Source

table.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.6 Conditions

Condition: admin-shutdown ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

server-shutdown (condition)

Condition: cannot-connect-now ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

operator-intervention (condition)

Condition: check-violation ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

integrity-violation (condition)

Condition: crash-shutdown ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

server-shutdown (condition)

Condition: data-exception ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Direct subclasses
Condition: database-connection-error ()

Conditions of this type are signalled when an error
occurs that breaks the connection socket. They offer a :reconnect restart.

Package

cl-postgres

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Direct subclasses
Condition: database-connection-lost ()

Raised when a query is initiated on a disconnected connection object.

Package

cl-postgres

Source

errors.lisp (file)

Direct superclasses

database-connection-error (condition)

Condition: database-error ()

This is the condition type that will be used to
signal virtually all database-related errors (though in some cases socket errors may be raised when a connection fails on the IP level).

Package

cl-postgres

Source

errors.lisp (file)

Direct superclasses

error (condition)

Direct subclasses
Direct methods
Direct slots
Slot: error-code

Code: the SQLSTATE code for the error (see Appendix A). Not localizable. Always present.

Initargs

:code

Initform

(quote nil)

Readers

database-error-code (generic function)

Slot: message

Message: the primary human-readable error message. This should be accurate but terse (typically one line). Always present.

Initargs

:message

Readers

database-error-message (generic function)

Writers

(setf database-error-message) (generic function)

Slot: detail

Detail: an optional secondary error message carrying more detail about the problem. Might run to multiple lines.

Initargs

:detail

Initform

(quote nil)

Readers

database-error-detail (generic function)

Slot: hint

Hint: an optional suggestion what to do about the problem.

Initargs

:hint

Initform

(quote nil)

Readers

database-error-hint (generic function)

Slot: context

Where: an indication of the context in which the error occurred. Presently this includes a call stack traceback of active procedural language functions and internally-generated queries. The trace is one entry per line, most recent first.

Initargs

:context

Initform

(quote nil)

Readers

database-error-context (generic function)

Slot: query

Query that led to the error, if any.

Initform

(quote cl-postgres::*current-query*)

Readers

database-error-query (generic function)

Slot: position

Position: the field value is a decimal ASCII integer, indicating an error cursor position as an index into the original query string. The first character has index 1, and positions are measured in characters not bytes.

Initargs

:position

Initform

(quote nil)

Readers

database-error-position (generic function)

Slot: cause
Initargs

:cause

Initform

(quote nil)

Readers

database-error-cause (generic function)

Condition: database-socket-error ()

Used to wrap stream-errors and socket-errors, giving them a database-connection-error superclass.

Package

cl-postgres

Source

errors.lisp (file)

Direct superclasses

database-connection-error (condition)

Condition: db-division-by-zero ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

data-exception (condition)

Condition: deadlock-detected ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

transaction-rollback (condition)

Condition: feature-not-supported ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Condition: floating-point-exception ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

data-exception (condition)

Condition: foreign-key-violation ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

integrity-violation (condition)

Condition: insufficient-privilege ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

syntax-error-or-access-violation (condition)

Condition: insufficient-resources ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Condition: integrity-violation ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Direct subclasses
Condition: internal-error ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Condition: invalid-datetime-format ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

data-exception (condition)

Condition: lock-not-available ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

object-state-error (condition)

Condition: not-null-violation ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

integrity-violation (condition)

Condition: numeric-value-out-of-range ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

data-exception (condition)

Condition: object-in-use ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

object-state-error (condition)

Condition: object-state-error ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Direct subclasses
Condition: operator-intervention ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Direct subclasses
Condition: postgresql-notification ()
Package

cl-postgres

Source

protocol.lisp (file)

Direct superclasses

simple-warning (condition)

Direct methods
Direct slots
Slot: pid
Initargs

:pid

Readers

postgresql-notification-pid (generic function)

Writers

(setf postgresql-notification-pid) (generic function)

Slot: channel
Initargs

:channel

Readers

postgresql-notification-channel (generic function)

Writers

(setf postgresql-notification-channel) (generic function)

Slot: payload
Initargs

:payload

Readers

postgresql-notification-payload (generic function)

Writers

(setf postgresql-notification-payload) (generic function)

Condition: postgresql-warning ()
Package

cl-postgres

Source

protocol.lisp (file)

Direct superclasses

simple-warning (condition)

Condition: program-limit-exceeded ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Condition: query-canceled ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

operator-intervention (condition)

Condition: restrict-violation ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

integrity-violation (condition)

Condition: serialization-failure ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

transaction-rollback (condition)

Condition: server-shutdown ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses
Direct subclasses
Condition: sql-error ()
Package

s-sql

Source

s-sql.lisp (file)

Direct superclasses

simple-error (condition)

Condition: statement-completion-unknown ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

transaction-rollback (condition)

Condition: syntax-error-or-access-violation ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Direct subclasses

insufficient-privilege (condition)

Condition: system-error ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Condition: transaction-integrity-constraint-violation ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

transaction-rollback (condition)

Condition: transaction-rollback ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

database-error (condition)

Direct subclasses
Condition: unique-violation ()
Package

cl-postgres-error

Source

errors.lisp (file)

Direct superclasses

integrity-violation (condition)

Condition: utf-8-decoding-error ()
Package

cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)

Direct superclasses

simple-error (condition)

Direct slots
Slot: message
Initargs

:message

Slot: byte
Initargs

:byte

Initform

(quote nil)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.7 Classes

Class: dao-class ()

Metaclass for database-access-object classes.

Package

postmodern

Source

table.lisp (file)

Direct superclasses

standard-class (class)

Direct methods
  • make-dao (method)
  • effective-slot-definition-class (method)
  • compute-effective-slot-definition (method)
  • direct-slot-definition-class (method)
  • finalize-inheritance (method)
  • shared-initialize (method)
  • validate-superclass (method)
  • dao-keys (method)
  • dao-column-map (method)
  • dao-keys (method)
  • direct-keys (method)
Direct slots
Slot: direct-keys
Initargs

:keys

Readers

direct-keys (generic function)

Slot: effective-keys
Readers

dao-keys (generic function)

Slot: table-name
Slot: column-map
Readers

dao-column-map (generic function)

Class: database-connection ()

Representation of a database connection. Contains
login information in order to be able to automatically re-establish a connection when it is somehow closed.

Package

cl-postgres

Source

public.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

pooled-database-connection (class)

Direct methods
Direct slots
Slot: host
Initargs

:host

Readers

connection-host (generic function)

Slot: port
Initargs

:port

Readers

connection-port (generic function)

Slot: database
Initargs

:db

Readers

connection-db (generic function)

Slot: user
Initargs

:user

Readers

connection-user (generic function)

Slot: password
Initargs

:password

Readers

connection-password (generic function)

Slot: use-ssl
Initargs

:ssl

Readers

connection-use-ssl (generic function)

Slot: service
Initargs

:service

Readers

connection-service (generic function)

Writers

(setf connection-service) (generic function)

Slot: socket
Initargs

:socket

Readers

connection-socket (generic function)

Writers

(setf connection-socket) (generic function)

Slot: meta
Slot: available
Initform

t

Readers

connection-available (generic function)

Writers

(setf connection-available) (generic function)

Slot: parameters
Readers

connection-parameters (generic function)

Writers

(setf connection-parameters) (generic function)

Slot: timestamp-format
Readers

connection-timestamp-format (generic function)

Writers

(setf connection-timestamp-format) (generic function)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.8 Types

Type: bigint ()
Package

s-sql

Source

s-sql.lisp (file)

Type: bytea ()
Package

s-sql

Source

s-sql.lisp (file)

Type: db-null ()

Type for representing NULL values. Use like (or integer db-null) for declaring a type to be an integer that may be null.

Package

s-sql

Source

s-sql.lisp (file)

Type: double-precision ()
Package

s-sql

Source

s-sql.lisp (file)

Type: numeric &optional PRECISION/SCALE SCALE
Package

s-sql

Source

s-sql.lisp (file)

Type: smallint ()
Package

s-sql

Source

s-sql.lisp (file)

Type: text ()
Package

s-sql

Source

s-sql.lisp (file)

Type: varchar LENGTH
Package

s-sql

Source

s-sql.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Constants

Constant: +seconds-in-day+
Package

cl-postgres

Source

interpret.lisp (file)

Constant: +start-of-2000+
Package

cl-postgres

Source

interpret.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Special variables

Special Variable: *client-encoding*
Package

cl-postgres

Source

strings-utf-8.lisp (file)

Special Variable: *connection-params*

Bound to the current connection’s parameter table when executing a query.

Package

cl-postgres

Source

protocol.lisp (file)

Special Variable: *connection-pools*

Maps pool specifiers to lists of pooled connections.

Package

postmodern

Source

connect.lisp (file)

Special Variable: *current-query*
Package

cl-postgres

Source

errors.lisp (file)

Special Variable: *custom-column-writers*

A hook for locally overriding/adding behaviour to DAO row readers. Should be an alist mapping strings (column names) to symbols or functions. Symbols are interpreted as slot names that values should be written to, functions are called with the new object and the value as arguments.

Package

postmodern

Source

table.lisp (file)

Special Variable: *default-sql-readtable*

A copy of the default readtable that client code can fall back on.

Package

cl-postgres

Source

interpret.lisp (file)

Special Variable: *direct-column-slot*

This is used to communicate the fact that a slot is a column to effective-slot-definition-class.

Package

postmodern

Source

table.lisp (file)

Special Variable: *effected-rows*
Package

cl-postgres

Source

protocol.lisp (file)

Special Variable: *error-table*
Package

cl-postgres-error

Source

errors.lisp (file)

Special Variable: *expand-runtime*
Package

s-sql

Source

s-sql.lisp (file)

Special Variable: *optimize*
Package

cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)

Special Variable: *optimize*
Package

cl-postgres

Source

package.lisp (file)

Special Variable: *pool-lock*

A lock to prevent multiple threads from messing with the connection pool at the same time.

Package

postmodern

Source

connect.lisp (file)

Special Variable: *postgres-reserved-words*

A set of all PostgreSQL’s reserved words, for automatic escaping.

Package

s-sql

Source

s-sql.lisp (file)

Special Variable: *result-styles*

Mapping from keywords identifying result styles to the row-reader that should be used and whether all values or only one value should be returned.

Package

postmodern

Source

query.lisp (file)

Special Variable: *string-file*
Package

cl-postgres-system

Source

cl-postgres.asd

Special Variable: *tables*

Unexported ordered list containing the known table definitions.

Package

postmodern

Source

deftable.lisp (file)

Special Variable: *timestamp-format*

This is used to communicate the format (integer or float) used for timestamps and intervals in the current connection, so that the interpreters for those types know how to parse them.

Package

cl-postgres

Source

interpret.lisp (file)

Special Variable: *transaction-level*
Package

postmodern

Source

transaction.lisp (file)

Special Variable: *unicode*
Package

cl-postgres-system

Source

cl-postgres.asd


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Macros

Macro: all-rows FORM
Package

postmodern

Source

query.lisp (file)

Macro: as-utf-8-bytes CHAR WRITER

Given a character, calls the writer function for every byte in the encoded form of that character.

Package

cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)

Macro: binary-reader FIELDS &body VALUE

A slightly convoluted macro for defining interpreter functions. It allows two forms. The first is to pass a single type identifier, in which case a value of this type will be read and returned directly. The second is to pass a list of lists containing names and types, and then a body. In this case the names will be bound to values read from the socket and interpreted as the given types, and then the body will be run in the resulting environment. If the last field is of type bytes, string, or uint2s, all remaining data will be read and interpreted as an array of the given type.

Package

cl-postgres

Source

interpret.lisp (file)

Macro: dao-row-reader-with-body (TYPE TYPE-VAR) &body BODY
Package

postmodern

Source

table.lisp (file)

Macro: def-drop-op OP-NAME WORD
Package

s-sql

Source

s-sql.lisp (file)

Macro: def-sql-op NAME ARGLIST &body BODY

Macro to make defining syntax a bit more straightforward. Name should be the keyword identifying the operator, arglist a lambda list to apply to the arguments, and body something that produces a list of strings and forms that evaluate to strings.

Package

s-sql

Source

s-sql.lisp (file)

Macro: deferror CODE TYPENAME &optional SUPERCLASS
Package

cl-postgres-error

Source

errors.lisp (file)

Macro: define-interpreter OID NAME FIELDS &body VALUE

Shorthand for defining binary readers.

Package

cl-postgres

Source

interpret.lisp (file)

Macro: define-message NAME ID (&rest ARGLIST) &body PARTS

This macro synthesizes a function to send messages of a specific type. It takes care of the plumbing – calling writer functions on a stream, keeping track of the length of the message – so that the message definitions themselves stay readable.

Package

cl-postgres

Source

messages.lisp (file)

Macro: integer-reader BYTES

Create a function to read integers from a binary stream.

Package

cl-postgres

Source

communicate.lisp (file)

Macro: integer-writer BYTES

Create a function to write integers to a binary stream.

Package

cl-postgres

Source

communicate.lisp (file)

Macro: make-exists-query RELKIND NAME

Helper macro for the functions that check whether an object exists.

Package

postmodern

Source

util.lisp (file)

Macro: make-list-query RELKIND

Helper macro for the functions that list tables, sequences, and views.

Package

postmodern

Source

util.lisp (file)

Macro: message-case SOCKET &body CLAUSES

Helper macro for reading messages from the server. A list of cases (characters that identify the message) can be given, each with a body that handles the message, or the keyword :skip to skip the message. Cases for error and warning messages are always added.

The body may contain an initial parameter of the form :LENGTH-SYM SYMBOL where SYMBOL is a symbol to which the remaining length of the packet is bound. This value indicates the number of bytes that have to be read from the socket.

Package

cl-postgres

Source

protocol.lisp (file)

Macro: returning-effected-rows VALUE &body BODY

Computes a value, then runs a body, then returns, as multiple values, that value and the amount of effected rows, if any (see *effected rows*).

Package

cl-postgres

Source

protocol.lisp (file)

Macro: single-row FORM
Package

postmodern

Source

query.lisp (file)

Macro: single-row! FORM
Package

postmodern

Source

query.lisp (file)

Macro: split-on-keywords WORDS FORM &body BODY

Used to handle arguments to some complex SQL operations. Arguments are divided by keywords, which are interned with the name of the non-keyword symbols in words, and bound to these symbols. After the naming symbols, a ? can be used to indicate this argument group is optional, an * to indicate it can consist of more than one element, and a - to indicate it does not take any elements.

Package

s-sql

Source

s-sql.lisp (file)

Macro: using-connection CONNECTION &body BODY

This is used to prevent a row-reader from recursively calling some query function. Because the connection is still returning results from the previous query when a row-reading is being executed, starting another query will not work as expected (or at all, in general). This might also raise an error when you are using a single database connection from multiple threads, but you should not do that at all. Also binds *timestamp-format* and *connection-params*, which might be needed by the code interpreting the query results.

Package

cl-postgres

Source

public.lisp (file)

Macro: with-pool-lock &body BODY

Aquire a lock for the pool when evaluating body (if thread support is present).

Package

postmodern

Source

connect.lisp (file)

Macro: with-query (QUERY) &body BODY
Package

cl-postgres

Source

errors.lisp (file)

Macro: with-reconnect-restart CONNECTION &body BODY

When, inside the body, an error occurs that breaks the connection socket, a condition of type database-connection-error is raised, offering a :reconnect restart.

Package

cl-postgres

Source

public.lisp (file)

Macro: with-syncing &body BODY

Macro to wrap a block in a handler that will try to re-sync the connection if something in the block raises a condition. Not hygienic at all, only used right below here.

Package

cl-postgres

Source

protocol.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Functions

Function: %build-foreign-reference TARGET ON-DELETE ON-UPDATE
Package

s-sql

Source

s-sql.lisp (file)

Function: %eval CODE
Package

postmodern

Source

table.lisp (file)

Function: add-table-definition SYMBOL FUNC
Package

postmodern

Source

deftable.lisp (file)

Function: authenticate SOCKET CONN

Try to initiate a connection. Caller should close the socket if this raises a condition.

Package

cl-postgres

Source

protocol.lisp (file)

Function: bind-message SOCKET NAME RESULT-FORMATS PARAMETERS

Bind a prepared statement, ask for the given formats, and pass the given parameters, that can be either string or byte vector.
(vector (unsigned-byte 8)) parameters will be sent as binary data, useful for binding data for binary long object columns.

Package

cl-postgres

Source

messages.lisp (file)

Function: build-dao-methods CLASS

Synthesise a number of methods for a newly defined DAO class. (Done this way because some of them are not defined in every situation, and each of them needs to close over some pre-computed values.)

Package

postmodern

Source

table.lisp (file)

Function: build-row-reader FUNCTION-FORM FIELDS BODY

Helper for the following two macros.

Package

cl-postgres

Source

protocol.lisp (file)

Function: bytes-to-hex-string BYTES

Convert an array of 0-255 numbers into the corresponding string of (lowercase) hex codes.

Package

cl-postgres

Source

messages.lisp (file)

Function: call-with-ensured-transaction THUNK
Package

postmodern

Source

transaction.lisp (file)

Function: call-with-logical-transaction NAME BODY
Package

postmodern

Source

transaction.lisp (file)

Function: call-with-savepoint NAME BODY
Package

postmodern

Source

transaction.lisp (file)

Function: call-with-transaction BODY
Package

postmodern

Source

transaction.lisp (file)

Function: close-prepared-message G0 NAME
Package

cl-postgres

Source

messages.lisp (file)

Function: column-row-reader G0 FIELDS
Package

postmodern

Source

query.lisp (file)

Function: copier-write-sequence S VECTOR
Package

cl-postgres

Source

bulk-copy.lisp (file)

Function: copier-write-value S VAL
Package

cl-postgres

Source

bulk-copy.lisp (file)

Function: copy-data-message SOCKET DATA
Package

cl-postgres

Source

messages.lisp (file)

Function: copy-done-message G0
Package

cl-postgres

Source

messages.lisp (file)

Function: copy-fail-message G0 REASON
Package

cl-postgres

Source

messages.lisp (file)

Function: copy-query SELF
Package

cl-postgres

Source

bulk-copy.lisp (file)

Function: dao-column-fields CLASS
Package

postmodern

Source

table.lisp (file)

Function: dao-column-slots CLASS

Enumerate the slots in a class that refer to table rows.

Package

postmodern

Source

table.lisp (file)

Function: dao-from-fields CLASS COLUMN-MAP QUERY-FIELDS RESULT-NEXT-FIELD-GENERATOR-FN
Package

postmodern

Source

table.lisp (file)

Function: dao-row-reader CLASS

Defines a row-reader for objects of a given class.

Package

postmodern

Source

table.lisp (file)

Function: dao-spec-for-format FORMAT
Package

postmodern

Source

query.lisp (file)

Function: dao-superclasses CLASS

Build a list of superclasses of a given class that are DAO classes.

Package

postmodern

Source

table.lisp (file)

Function: dequote VAL
Package

s-sql

Source

s-sql.lisp (file)

Function: describe-prepared-message G0 NAME
Package

cl-postgres

Source

messages.lisp (file)

Function: dissect-type TYPE

Return the type and whether it may be NULL.

Package

s-sql

Source

s-sql.lisp (file)

Function: do-with-schema SCHEMA THUNK &key STRICT IF-NOT-EXIST DROP-AFTER
Package

postmodern

Source

namespace.lisp (file)

Function: enc-byte-length SEQUENCE
Package

cl-postgres

Source

strings-utf-8.lisp (file)

Function: enc-read-string INPUT &key NULL-TERMINATED BYTE-LENGTH
Package

cl-postgres

Source

strings-utf-8.lisp (file)

Function: enc-string-bytes STRING &key NULL-TERMINATE
Package

cl-postgres

Source

strings-utf-8.lisp (file)

Function: enc-write-string STRING OUTPUT &key NULL-TERMINATE
Package

cl-postgres

Source

strings-utf-8.lisp (file)

Function: ensure-connection CONN

Used to make sure a connection object is connected before doing anything with it.

Package

cl-postgres

Source

public.lisp (file)

Function: ensure-prepared CONNECTION ID QUERY

Make sure a statement has been prepared for this connection.

Package

postmodern

Source

prepare.lisp (file)

Function: ensure-socket-is-closed SOCKET &key ABORT
Package

cl-postgres

Source

communicate.lisp (file)

Function: escape-bytes BYTES

Escape an array of octets in PostgreSQL’s horribly inefficient textual format for binary data.

Package

cl-postgres

Source

sql-string.lisp (file)

Function: escape-sql-expression EXPR

Try to escape an expression at compile-time, if not possible, delay to runtime. Used to create stored procedures.

Package

s-sql

Source

s-sql.lisp (file)

Function: expand-create-index NAME ARGS
Package

s-sql

Source

s-sql.lisp (file)

Function: expand-foreign-on* ACTION
Package

s-sql

Source

s-sql.lisp (file)

Function: expand-joins ARGS

Helper for the select operator. Turns the part following :from into the proper SQL syntax for joining tables.

Package

s-sql

Source

s-sql.lisp (file)

Function: expand-rows ROWS LENGTH
Package

s-sql

Source

s-sql.lisp (file)

Function: expand-table-column COLUMN-NAME ARGS
Package

s-sql

Source

s-sql.lisp (file)

Function: expand-table-constraint OPTION ARGS
Package

s-sql

Source

s-sql.lisp (file)

Function: flat-table-name &optional TABLE
Package

postmodern

Source

deftable.lisp (file)

Function: flush-message G0
Package

cl-postgres

Source

messages.lisp (file)

Function: for-update/share SHARE-OR-UPDATE FORM &rest ARGS
Package

s-sql

Source

s-sql.lisp (file)

Function: formats-to-bytes FORMATS

Formats have to be passed as arrays of 2-byte integers, with 1 indicating binary and 0 indicating plain text.

Package

cl-postgres

Source

messages.lisp (file)

Function: generate-dao-query TYPE &optional TEST ORDERING
Package

postmodern

Source

table.lisp (file)

Function: generate-prepared FUNCTION-FORM QUERY FORMAT

Helper macro for the following two functions.

Package

postmodern

Source

prepare.lisp (file)

Function: get-error SOCKET

Read an error message from the socket and raise the corresponding database-error condition.

Package

cl-postgres

Source

protocol.lisp (file)

Function: get-error-type CODE
Package

cl-postgres-error

Source

errors.lisp (file)

Function: get-from-pool TYPE

Get a database connection from the specified pool, returns nil if no connection was available.

Package

postmodern

Source

connect.lisp (file)

Function: get-host-address HOST

Returns valid IPv4 or IPv6 address for the host.

Package

cl-postgres

Source

public.lisp (file)

Function: get-notification SOCKET

Read an asynchronous notification message from the socket and signal a condition for it.

Package

cl-postgres

Source

protocol.lisp (file)

Function: get-type-interpreter OID

Returns a type-interpreter containing interpretation rules for this type.

Package

cl-postgres

Source

interpret.lisp (file)

Function: get-utf-8-character BYTES GROUP-SIZE &optional START

Given an array of bytes and the amount of bytes to use, extract the character starting at the given start position.

Package

cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)

Function: get-warning SOCKET

Read a warning from the socket and emit it.

Package

cl-postgres

Source

protocol.lisp (file)

Function: gss-auth-buffer-message G0 BUF
Package

cl-postgres

Source

messages.lisp (file)

Function: implode SEP LIST

Reduce a list of strings to a single string, inserting a separator between them.

Package

s-sql

Source

s-sql.lisp (file)

Function: inet-socket-connect HOST PORT
Package

cl-postgres

Source

public.lisp (file)

Function: initialize-copier SELF
Package

cl-postgres

Source

bulk-copy.lisp (file)

Function: initiate-connection CONN

Check whether a connection object is connected, try to connect it if it isn’t.

Package

cl-postgres

Source

public.lisp (file)

Function: initiate-ssl SOCKET REQUIRED

Initiate SSL handshake with the PostgreSQL server, and wrap the socket in an SSL stream. When require is true, an error will be raised when the server does not support SSL.

Package

cl-postgres

Source

protocol.lisp (file)

Function: integer-reader-name BYTES SIGNED
Package

cl-postgres

Source

communicate.lisp (file)

Function: integer-writer-name BYTES SIGNED
Package

cl-postgres

Source

communicate.lisp (file)

Function: interpret-as-text STREAM SIZE

This interpreter is used for types that we have no specific interpreter for – it just reads the value as a string. (Values of unknown types are passed in text form.)

Package

cl-postgres

Source

interpret.lisp (file)

Function: interpret-usec-bits BITS

Decode a 64 bit time-related value based on the timestamp format used. Correct for sign bit when using integer format.

Package

cl-postgres

Source

interpret.lisp (file)

Function: interpreter-binary-p INTERP

If the interpreter’s use-binary field is a function, call it and return the value, otherwise, return T or nil as appropriate.

Package

cl-postgres

Source

interpret.lisp (file)

Function: interpreter-reader INTERP

Determine if we went the text or binary reader for this type interpreter and return the appropriate reader.

Package

cl-postgres

Source

interpret.lisp (file)

Function: look-for-row SOCKET

Read server messages until either a new row can be read, or there are no more results. Return a boolean indicating whether any more results are available, and, if available, stores the amount of effected rows in *effected-rows*. Also handle getting out of copy-in/copy-out states (which are not supported).

Package

cl-postgres

Source

protocol.lisp (file)

Function: make-expander ARITY NAME

Generates an appropriate expander function for a given operator with a given arity.

Package

s-sql

Source

s-sql.lisp (file)

Function: md5-password PASSWORD USER SALT

Apply the hashing that PostgreSQL expects to a password.

Package

cl-postgres

Source

messages.lisp (file)

Function: md5-password-message G0 PASSWORD USER SALT
Package

cl-postgres

Source

messages.lisp (file)

Function: next-statement-id ()

Provide unique statement names.

Package

postmodern

Source

prepare.lisp (file)

Function: parse-message G0 NAME QUERY
Package

cl-postgres

Source

messages.lisp (file)

Function: plain-password-message G0 PASSWORD
Package

cl-postgres

Source

messages.lisp (file)

Function: query-dao% TYPE QUERY ROW-READER &rest ARGS
Package

postmodern

Source

table.lisp (file)

Function: query-message G0 QUERY
Package

cl-postgres

Source

messages.lisp (file)

Function: read-array-value TRANSFORM
Package

cl-postgres

Source

interpret.lisp (file)

Function: read-binary-array-value STREAM SIZE
Package

cl-postgres

Source

interpret.lisp (file)

Function: read-binary-bits STREAM SIZE
Package

cl-postgres

Source

interpret.lisp (file)

Function: read-byte-delimited SOCKET

Read the fields of a null-terminated list of byte + string values and put them in an alist.

Package

cl-postgres

Source

protocol.lisp (file)

Function: read-bytes SOCKET LENGTH

Read a byte array of the given length from a stream.

Package

cl-postgres

Source

communicate.lisp (file)

Function: read-field-descriptions SOCKET

Read the field descriptions for a query result and put them into an array of field-description objects.

Package

cl-postgres

Source

protocol.lisp (file)

Function: read-int1 SOCKET
Package

cl-postgres

Source

communicate.lisp (file)

Function: read-int2 SOCKET
Package

cl-postgres

Source

communicate.lisp (file)

Function: read-int4 SOCKET
Package

cl-postgres

Source

communicate.lisp (file)

Function: read-int8 SOCKET
Package

cl-postgres

Source

communicate.lisp (file)

Function: read-row-value STREAM SIZE
Package

cl-postgres

Source

interpret.lisp (file)

Function: read-simple-str SOCKET

Read a null-terminated string from a stream. Interprets it as ASCII.

Package

cl-postgres

Source

communicate.lisp (file)

Function: read-str SOCKET

Read a null-terminated string from a stream. Takes care of encoding when UTF-8 support is enabled.

Package

cl-postgres

Source

communicate.lisp (file)

Function: read-uint1 SOCKET
Package

cl-postgres

Source

communicate.lisp (file)

Function: read-uint2 SOCKET
Package

cl-postgres

Source

communicate.lisp (file)

Function: read-uint4 SOCKET
Package

cl-postgres

Source

communicate.lisp (file)

Function: read-uint8 SOCKET
Package

cl-postgres

Source

communicate.lisp (file)

Function: reader-for-format FORMAT
Package

postmodern

Source

query.lisp (file)

Function: real-query QUERY

Used for supporting both plain string queries and S-SQL constructs. Looks at the argument at compile-time and wraps it in (sql ...) if it looks like an S-SQL query.

Package

postmodern

Source

query.lisp (file)

Function: reduce-strings LIST

Join adjacent strings in a list, leave other values intact.

Package

s-sql

Source

s-sql.lisp (file)

Function: s-sql-reader STREAM CHAR MIN-ARGS
Package

s-sql

Source

s-sql.lisp (file)

Function: schema-exists-p NAME

Predicate for schema existence. More consistent with naming scheme for other functions.

Package

postmodern

Source

namespace.lisp (file)

Function: send-close SOCKET NAME

Send a close command to the server, giving it a name.

Package

cl-postgres

Source

protocol.lisp (file)

Function: send-copy-done SOCKET
Package

cl-postgres

Source

bulk-copy.lisp (file)

Function: send-copy-start SOCKET QUERY
Package

cl-postgres

Source

bulk-copy.lisp (file)

Function: send-execute SOCKET NAME PARAMETERS ROW-READER

Execute a previously parsed query, and apply the given row-reader to the result.

Package

cl-postgres

Source

protocol.lisp (file)

Function: send-parse SOCKET NAME QUERY

Send a parse command to the server, giving it a name.

Package

cl-postgres

Source

protocol.lisp (file)

Function: send-query SOCKET QUERY ROW-READER

Send a query to the server, and apply the given row-reader to the results.

Package

cl-postgres

Source

protocol.lisp (file)

Function: set-date-reader F TABLE
Package

cl-postgres

Source

interpret.lisp (file)

Function: set-interval-reader F TABLE
Package

cl-postgres

Source

interpret.lisp (file)

Function: set-usec-reader OID F TABLE
Package

cl-postgres

Source

interpret.lisp (file)

Function: simple-bind-message G0 FORMATS
Package

cl-postgres

Source

messages.lisp (file)

Function: simple-describe-message G0
Package

cl-postgres

Source

messages.lisp (file)

Function: simple-execute-message G0
Package

cl-postgres

Source

messages.lisp (file)

Function: simple-parse-message G0 QUERY
Package

cl-postgres

Source

messages.lisp (file)

Function: skip-bytes SOCKET LENGTH

Skip a given number of bytes in a binary stream.

Package

cl-postgres

Source

communicate.lisp (file)

Function: skip-str SOCKET

Skip a null-terminated string.

Package

cl-postgres

Source

communicate.lisp (file)

Function: split-on-keywords% SHAPE LIST

Helper function for split-on-keywords. Extracts the values associated with the keywords from an argument list, and checks for errors.

Package

s-sql

Source

s-sql.lisp (file)

Function: sql-expand ARG

Compile-time expansion of forms into lists of stuff that evaluates to strings (which will form an SQL query when concatenated).

Package

s-sql

Source

s-sql.lisp (file)

Function: sql-expand-list ELTS &optional SEP

Expand a list of elements, adding a separator in between them.

Package

s-sql

Source

s-sql.lisp (file)

Function: sql-expand-names NAMES &optional SEP

Takes a list of elements (symbols or strings) and returns a separated list of strings. If the element is a cons, then

Package

s-sql

Source

s-sql.lisp (file)

Function: ssl-request-message G0
Package

cl-postgres

Source

messages.lisp (file)

Function: startup-message G0 USER DATABASE
Package

cl-postgres

Source

messages.lisp (file)

Function: strcat ARGS

Concatenate a list of strings into a single one.

Package

s-sql

Source

s-sql.lisp (file)

Function: symbol-alist-row-reader G0 FIELDS
Package

postmodern

Source

query.lisp (file)

Function: symbol-plist-row-reader G0 FIELDS
Package

postmodern

Source

query.lisp (file)

Function: sync-message G0
Package

cl-postgres

Source

messages.lisp (file)

Function: terminate-connection SOCKET

Close a connection, notifying the server.

Package

cl-postgres

Source

protocol.lisp (file)

Function: terminate-message G0
Package

cl-postgres

Source

messages.lisp (file)

Function: to-identifier NAME

Used to allow both strings and symbols as identifier - converts symbols to string with the S-SQL rules.

Package

postmodern

Source

util.lisp (file)

Function: to-type-name TYPE

Turn a Lisp type expression into an SQL typename.

Package

s-sql

Source

s-sql.lisp (file)

Function: try-to-sync SOCKET SYNC-SENT

Try to re-synchronize a connection by sending a sync message if it hasn’t already been sent, and then looking for a ReadyForQuery message.

Package

cl-postgres

Source

protocol.lisp (file)

Function: unix-socket-connect PATH
Package

cl-postgres

Source

public.lisp (file)

Function: unix-socket-path BASE-DIR PORT
Package

cl-postgres

Source

public.lisp (file)

Function: update-parameter SOCKET
Package

cl-postgres

Source

protocol.lisp (file)

Function: utf-8-string-length BYTES &key START END

Calculate the length of the string encoded by the given bytes.

Package

cl-postgres-trivial-utf-8

Source

trivial-utf-8.lisp (file)

Function: wrap-socket-error ERR
Package

cl-postgres

Source

errors.lisp (file)

Function: write-bytes SOCKET BYTES

Write a byte-array to a stream.

Package

cl-postgres

Source

communicate.lisp (file)

Function: write-int1 SOCKET VALUE
Package

cl-postgres

Source

communicate.lisp (file)

Function: write-int2 SOCKET VALUE
Package

cl-postgres

Source

communicate.lisp (file)

Function: write-int4 SOCKET VALUE
Package

cl-postgres

Source

communicate.lisp (file)

Function: write-quoted STRING OUT
Package

cl-postgres

Source

sql-string.lisp (file)

Function: write-rational-as-floating-point NUMBER STREAM DIGIT-LENGTH-LIMIT
Package

cl-postgres

Source

sql-string.lisp (file)

Function: write-str SOCKET STRING

Write a null-terminated string to a stream (encoding it when UTF-8 support is enabled.).

Package

cl-postgres

Source

communicate.lisp (file)

Function: write-uint1 SOCKET VALUE
Package

cl-postgres

Source

communicate.lisp (file)

Function: write-uint2 SOCKET VALUE
Package

cl-postgres

Source

communicate.lisp (file)

Function: write-uint4 SOCKET VALUE
Package

cl-postgres

Source

communicate.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.5 Generic functions

Generic Function: abort-logical-transaction SAVEPOINT
Package

postmodern

Methods
Method: abort-logical-transaction (TRANSACTION transaction-handle)
Source

transaction.lisp (file)

Method: abort-logical-transaction (SAVEPOINT savepoint-handle)
Source

transaction.lisp (file)

Generic Function: bulk-copier-own-connection OBJECT
Package

cl-postgres

Methods
Method: bulk-copier-own-connection (BULK-COPIER bulk-copier)

automatically generated reader method

Source

bulk-copy.lisp (file)

Generic Function: column-default OBJECT
Package

postmodern

Methods
Method: column-default (DIRECT-COLUMN-SLOT direct-column-slot)

automatically generated reader method

Source

table.lisp (file)

Generic Function: column-type OBJECT
Package

postmodern

Methods
Method: column-type (DIRECT-COLUMN-SLOT direct-column-slot)

automatically generated reader method

Source

table.lisp (file)

Generic Function: commit-logical-transaction SAVEPOINT
Package

postmodern

Methods
Method: commit-logical-transaction (TRANSACTION transaction-handle)
Source

transaction.lisp (file)

Method: commit-logical-transaction (SAVEPOINT savepoint-handle)
Source

transaction.lisp (file)

Generic Function: connection-available OBJECT
Generic Function: (setf connection-available) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: connection-available (DATABASE-CONNECTION database-connection)

automatically generated reader method

Source

public.lisp (file)

Method: (setf connection-available) NEW-VALUE (DATABASE-CONNECTION database-connection)

automatically generated writer method

Source

public.lisp (file)

Generic Function: connection-db OBJECT
Package

cl-postgres

Methods
Method: connection-db (DATABASE-CONNECTION database-connection)

automatically generated reader method

Source

public.lisp (file)

Generic Function: connection-host OBJECT
Package

cl-postgres

Methods
Method: connection-host (DATABASE-CONNECTION database-connection)

automatically generated reader method

Source

public.lisp (file)

Generic Function: connection-password OBJECT
Package

cl-postgres

Methods
Method: connection-password (DATABASE-CONNECTION database-connection)

automatically generated reader method

Source

public.lisp (file)

Generic Function: connection-pool-type OBJECT
Generic Function: (setf connection-pool-type) NEW-VALUE OBJECT
Package

postmodern

Methods
Method: connection-pool-type (POOLED-DATABASE-CONNECTION pooled-database-connection)

automatically generated reader method

Source

connect.lisp (file)

Method: (setf connection-pool-type) NEW-VALUE (POOLED-DATABASE-CONNECTION pooled-database-connection)

automatically generated writer method

Source

connect.lisp (file)

Generic Function: connection-port OBJECT
Package

cl-postgres

Methods
Method: connection-port (DATABASE-CONNECTION database-connection)

automatically generated reader method

Source

public.lisp (file)

Generic Function: connection-service OBJECT
Generic Function: (setf connection-service) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: connection-service (DATABASE-CONNECTION database-connection)

automatically generated reader method

Source

public.lisp (file)

Method: (setf connection-service) NEW-VALUE (DATABASE-CONNECTION database-connection)

automatically generated writer method

Source

public.lisp (file)

Generic Function: connection-socket OBJECT
Generic Function: (setf connection-socket) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: connection-socket (DATABASE-CONNECTION database-connection)

automatically generated reader method

Source

public.lisp (file)

Method: (setf connection-socket) NEW-VALUE (DATABASE-CONNECTION database-connection)

automatically generated writer method

Source

public.lisp (file)

Generic Function: connection-timestamp-format OBJECT
Generic Function: (setf connection-timestamp-format) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: connection-timestamp-format (DATABASE-CONNECTION database-connection)

automatically generated reader method

Source

public.lisp (file)

Method: (setf connection-timestamp-format) NEW-VALUE (DATABASE-CONNECTION database-connection)

automatically generated writer method

Source

public.lisp (file)

Generic Function: connection-use-ssl OBJECT
Package

cl-postgres

Methods
Method: connection-use-ssl (DATABASE-CONNECTION database-connection)

automatically generated reader method

Source

public.lisp (file)

Generic Function: connection-user OBJECT
Package

cl-postgres

Methods
Method: connection-user (DATABASE-CONNECTION database-connection)

automatically generated reader method

Source

public.lisp (file)

Generic Function: copier-columns OBJECT
Package

cl-postgres

Methods
Method: copier-columns (BULK-COPIER bulk-copier)

automatically generated reader method

Source

bulk-copy.lisp (file)

Generic Function: copier-count OBJECT
Generic Function: (setf copier-count) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: copier-count (BULK-COPIER bulk-copier)

automatically generated reader method

Source

bulk-copy.lisp (file)

Method: (setf copier-count) NEW-VALUE (BULK-COPIER bulk-copier)

automatically generated writer method

Source

bulk-copy.lisp (file)

Generic Function: copier-database OBJECT
Package

cl-postgres

Methods
Method: copier-database (BULK-COPIER bulk-copier)

automatically generated reader method

Source

bulk-copy.lisp (file)

Generic Function: copier-table OBJECT
Package

cl-postgres

Methods
Method: copier-table (BULK-COPIER bulk-copier)

automatically generated reader method

Source

bulk-copy.lisp (file)

Generic Function: dao-column-map OBJECT
Package

postmodern

Methods
Method: dao-column-map (DAO-CLASS dao-class)

automatically generated reader method

Source

table.lisp (file)

Generic Function: database-error-context CONDITION
Package

cl-postgres

Methods
Method: database-error-context (CONDITION database-error)
Source

errors.lisp (file)

Generic Function: database-error-hint CONDITION
Package

cl-postgres

Methods
Method: database-error-hint (CONDITION database-error)
Source

errors.lisp (file)

Generic Function: database-error-position CONDITION
Package

cl-postgres

Methods
Method: database-error-position (CONDITION database-error)
Source

errors.lisp (file)

Generic Function: direct-keys OBJECT
Package

postmodern

Methods
Method: direct-keys (DAO-CLASS dao-class)

automatically generated reader method

Source

table.lisp (file)

Generic Function: expand-sql-op OP ARGS

For overriding expansion of operators. Default is
to just place operator name in front, arguments between parentheses behind it.

Package

s-sql

Source

s-sql.lisp (file)

Methods
Method: expand-sql-op (OP (eql drop-role)) G0
Method: expand-sql-op (OP (eql create-role)) G0
Method: expand-sql-op (OP (eql drop-database)) G0
Method: expand-sql-op (OP (eql create-database)) G0
Method: expand-sql-op (OP (eql create-rule)) G0
Method: expand-sql-op (OP (eql drop-domain)) G0
Method: expand-sql-op (OP (eql create-domain)) G0
Method: expand-sql-op (OP (eql create-enum)) G0
Method: expand-sql-op (OP (eql create-view)) G0
Method: expand-sql-op (OP (eql create-sequence)) G0
Method: expand-sql-op (OP (eql nextval)) G0
Method: expand-sql-op (OP (eql drop-rule)) G0
Method: expand-sql-op (OP (eql drop-type)) G0
Method: expand-sql-op (OP (eql drop-view)) G0
Method: expand-sql-op (OP (eql drop-sequence)) G0
Method: expand-sql-op (OP (eql drop-index)) G0
Method: expand-sql-op (OP (eql drop-table)) G0
Method: expand-sql-op (OP (eql cascade)) G0
Method: expand-sql-op (OP (eql create-unique-index)) G0
Method: expand-sql-op (OP (eql create-index)) G0
Method: expand-sql-op (OP (eql alter-table)) G0
Method: expand-sql-op (OP (eql create-table)) G0
Method: expand-sql-op (OP (eql window)) G0
Method: expand-sql-op (OP (eql with-recursive)) G0
Method: expand-sql-op (OP (eql with)) G0
Method: expand-sql-op (OP (eql parens)) G0
Method: expand-sql-op (OP (eql partition-by)) G0
Method: expand-sql-op (OP (eql over)) G0
Method: expand-sql-op (OP (eql delete-from)) G0
Method: expand-sql-op (OP (eql update)) G0
Method: expand-sql-op (OP (eql insert-rows-into)) G0
Method: expand-sql-op (OP (eql notify)) G0
Method: expand-sql-op (OP (eql unlisten)) G0
Method: expand-sql-op (OP (eql listen)) G0
Method: expand-sql-op (OP (eql insert-into)) G0
Method: expand-sql-op (OP (eql function)) G0
Method: expand-sql-op (OP (eql for-share)) G0
Method: expand-sql-op (OP (eql for-update)) G0
Method: expand-sql-op (OP (eql set-constraints)) G0
Method: expand-sql-op (OP (eql order-by)) G0
Method: expand-sql-op (OP (eql limit)) G0
Method: expand-sql-op (OP (eql select)) G0
Method: expand-sql-op (OP (eql raw)) G0
Method: expand-sql-op (OP (eql type)) G0
Method: expand-sql-op (OP (eql dot)) G0
Method: expand-sql-op (OP (eql set)) G0
Method: expand-sql-op (OP (eql [])) G0
Method: expand-sql-op (OP (eql case)) G0
Method: expand-sql-op (OP (eql between-symmetric)) G0
Method: expand-sql-op (OP (eql between)) G0
Method: expand-sql-op (OP (eql count)) G0
Method: expand-sql-op (OP (eql extract)) G0
Method: expand-sql-op (OP (eql not-in)) G0
Method: expand-sql-op (OP (eql in)) G0
Method: expand-sql-op (OP (eql not-null)) G0
Method: expand-sql-op (OP (eql is-null)) G0
Method: expand-sql-op (OP (eql exists)) G0
Method: expand-sql-op (OP (eql cast)) G0
Method: expand-sql-op (OP (eql all)) G0
Method: expand-sql-op (OP (eql any)) G0
Method: expand-sql-op (OP (eql any*)) G0
Method: expand-sql-op (OP (eql distinct)) G0
Method: expand-sql-op (OP (eql @@)) G0
Method: expand-sql-op (OP (eql as)) G0
Method: expand-sql-op (OP (eql nulls-last)) G0
Method: expand-sql-op (OP (eql nulls-first)) G0
Method: expand-sql-op (OP (eql desc)) G0
Method: expand-sql-op (OP (eql )) G0
Method: expand-sql-op (OP (eql %#)) ARGS
Method: expand-sql-op (OP (eql %%)) ARGS
Method: expand-sql-op (OP (eql unary)) ARGS
Method: expand-sql-op (OP (eql #=)) ARGS
Method: expand-sql-op (OP (eql <@)) ARGS
Method: expand-sql-op (OP (eql ?|)) ARGS
Method: expand-sql-op (OP (eql ?&)) ARGS
Method: expand-sql-op (OP (eql ?)) ARGS
Method: expand-sql-op (OP (eql =>)) ARGS
Method: expand-sql-op (OP (eql ->)) ARGS
Method: expand-sql-op (OP (eql @<)) ARGS
Method: expand-sql-op (OP (eql @>)) ARGS
Method: expand-sql-op (OP (eql ~=)) ARGS
Method: expand-sql-op (OP (eql |>>)) ARGS
Method: expand-sql-op (OP (eql |&>)) ARGS
Method: expand-sql-op (OP (eql @)) ARGS
Method: expand-sql-op (OP (eql >>)) ARGS
Method: expand-sql-op (OP (eql <<|)) ARGS
Method: expand-sql-op (OP (eql <<)) ARGS
Method: expand-sql-op (OP (eql &>)) ARGS
Method: expand-sql-op (OP (eql &<|)) ARGS
Method: expand-sql-op (OP (eql &<)) ARGS
Method: expand-sql-op (OP (eql &&)) ARGS
Method: expand-sql-op (OP (eql except-all)) ARGS
Method: expand-sql-op (OP (eql except)) ARGS
Method: expand-sql-op (OP (eql intersect-all)) ARGS
Method: expand-sql-op (OP (eql intersect)) ARGS
Method: expand-sql-op (OP (eql ilike)) ARGS
Method: expand-sql-op (OP (eql like)) ARGS
Method: expand-sql-op (OP (eql !~*)) ARGS
Method: expand-sql-op (OP (eql !~)) ARGS
Method: expand-sql-op (OP (eql ~*)) ARGS
Method: expand-sql-op (OP (eql ^)) ARGS
Method: expand-sql-op (OP (eql >=)) ARGS
Method: expand-sql-op (OP (eql <=)) ARGS
Method: expand-sql-op (OP (eql >)) ARGS
Method: expand-sql-op (OP (eql <)) ARGS
Method: expand-sql-op (OP (eql <>)) ARGS
Method: expand-sql-op (OP (eql !=)) ARGS
Method: expand-sql-op (OP (eql /)) ARGS
Method: expand-sql-op (OP (eql =)) ARGS
Method: expand-sql-op (OP (eql ~)) ARGS
Method: expand-sql-op (OP (eql -)) ARGS
Method: expand-sql-op (OP (eql union-all)) ARGS
Method: expand-sql-op (OP (eql union)) ARGS
Method: expand-sql-op (OP (eql or)) ARGS
Method: expand-sql-op (OP (eql and)) ARGS
Method: expand-sql-op (OP (eql ||)) ARGS
Method: expand-sql-op (OP (eql |)) ARGS
Method: expand-sql-op (OP (eql &)) ARGS
Method: expand-sql-op (OP (eql %)) ARGS
Method: expand-sql-op (OP (eql *)) ARGS
Method: expand-sql-op (OP (eql +)) ARGS
Method: expand-sql-op (OP (eql not)) ARGS
Method: expand-sql-op OP ARGS
Generic Function: fetch-defaults OBJECT

Used to fetch the default values of an object on creation.

Package

postmodern

Source

table.lisp (file)

Generic Function: field-binary-p OBJECT
Package

cl-postgres

Methods
Method: field-binary-p (FIELD-DESCRIPTION field-description)

automatically generated reader method

Source

protocol.lisp (file)

Generic Function: field-interpreter OBJECT
Generic Function: (setf field-interpreter) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: field-interpreter (FIELD-DESCRIPTION field-description)

automatically generated reader method

Source

protocol.lisp (file)

Method: (setf field-interpreter) NEW-VALUE (FIELD-DESCRIPTION field-description)

automatically generated writer method

Source

protocol.lisp (file)

Generic Function: ghost OBJECT
Package

postmodern

Methods
Method: ghost (DIRECT-COLUMN-SLOT direct-column-slot)

automatically generated reader method

Source

table.lisp (file)

Generic Function: prepare-row SELF ROW
Package

cl-postgres

Methods
Method: prepare-row SELF ROW
Source

bulk-copy.lisp (file)

Generic Function: savepoint-connection OBJECT
Package

postmodern

Methods
Method: savepoint-connection (SAVEPOINT-HANDLE savepoint-handle)

automatically generated reader method

Source

transaction.lisp (file)

Generic Function: savepoint-name OBJECT
Package

postmodern

Methods
Method: savepoint-name (SAVEPOINT-HANDLE savepoint-handle)

automatically generated reader method

Source

transaction.lisp (file)

Generic Function: savepoint-open-p OBJECT
Generic Function: (setf savepoint-open-p) NEW-VALUE OBJECT
Package

postmodern

Methods
Method: savepoint-open-p (SAVEPOINT-HANDLE savepoint-handle)

automatically generated reader method

Source

transaction.lisp (file)

Method: (setf savepoint-open-p) NEW-VALUE (SAVEPOINT-HANDLE savepoint-handle)

automatically generated writer method

Source

transaction.lisp (file)

Generic Function: slot-column OBJECT
Package

postmodern

Methods
Method: slot-column (EFFECTIVE-COLUMN-SLOT effective-column-slot)

automatically generated reader method

Source

table.lisp (file)

Generic Function: slot-sql-name OBJECT
Package

postmodern

Methods
Method: slot-sql-name (DIRECT-COLUMN-SLOT direct-column-slot)

automatically generated reader method

Source

table.lisp (file)

Generic Function: transaction-connection OBJECT
Package

postmodern

Methods
Method: transaction-connection (TRANSACTION-HANDLE transaction-handle)

automatically generated reader method

Source

transaction.lisp (file)

Generic Function: transaction-open-p OBJECT
Generic Function: (setf transaction-open-p) NEW-VALUE OBJECT
Package

postmodern

Methods
Method: transaction-open-p (TRANSACTION-HANDLE transaction-handle)

automatically generated reader method

Source

transaction.lisp (file)

Method: (setf transaction-open-p) NEW-VALUE (TRANSACTION-HANDLE transaction-handle)

automatically generated writer method

Source

transaction.lisp (file)

Generic Function: type-interpreter-binary-reader OBJECT
Generic Function: (setf type-interpreter-binary-reader) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: type-interpreter-binary-reader (TYPE-INTERPRETER type-interpreter)

automatically generated reader method

Source

interpret.lisp (file)

Method: (setf type-interpreter-binary-reader) NEW-VALUE (TYPE-INTERPRETER type-interpreter)

automatically generated writer method

Source

interpret.lisp (file)

Generic Function: type-interpreter-oid OBJECT
Generic Function: (setf type-interpreter-oid) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: type-interpreter-oid (TYPE-INTERPRETER type-interpreter)

automatically generated reader method

Source

interpret.lisp (file)

Method: (setf type-interpreter-oid) NEW-VALUE (TYPE-INTERPRETER type-interpreter)

automatically generated writer method

Source

interpret.lisp (file)

Generic Function: type-interpreter-text-reader OBJECT
Generic Function: (setf type-interpreter-text-reader) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: type-interpreter-text-reader (TYPE-INTERPRETER type-interpreter)

automatically generated reader method

Source

interpret.lisp (file)

Method: (setf type-interpreter-text-reader) NEW-VALUE (TYPE-INTERPRETER type-interpreter)

automatically generated writer method

Source

interpret.lisp (file)

Generic Function: type-interpreter-use-binary OBJECT
Generic Function: (setf type-interpreter-use-binary) NEW-VALUE OBJECT
Package

cl-postgres

Methods
Method: type-interpreter-use-binary (TYPE-INTERPRETER type-interpreter)

automatically generated reader method

Source

interpret.lisp (file)

Method: (setf type-interpreter-use-binary) NEW-VALUE (TYPE-INTERPRETER type-interpreter)

automatically generated writer method

Source

interpret.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.6 Conditions

Condition: protocol-error ()

This is raised if something really unexpected
happens in the communcation with the server. Should only happen in case of a bug or a connection to something that is not a (supported) PostgreSQL server at all.

Package

cl-postgres

Source

protocol.lisp (file)

Direct superclasses

error (condition)

Direct slots
Slot: message
Initargs

:message


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.7 Classes

Class: bulk-copier ()
Package

cl-postgres

Source

bulk-copy.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: own-connection
Initargs

:own-connection

Readers

bulk-copier-own-connection (generic function)

Slot: database
Initargs

:database

Readers

copier-database (generic function)

Slot: table
Initargs

:table

Readers

copier-table (generic function)

Slot: columns
Initargs

:columns

Readers

copier-columns (generic function)

Slot: count
Initform

0

Readers

copier-count (generic function)

Writers

(setf copier-count) (generic function)

Class: direct-column-slot ()

Type of slots that refer to database columns.

Package

postmodern

Source

table.lisp (file)

Direct superclasses

standard-direct-slot-definition (class)

Direct methods
Direct slots
Slot: col-type
Initargs

:col-type

Readers

column-type (generic function)

Slot: col-default
Initargs

:col-default

Readers

column-default (generic function)

Slot: ghost
Initargs

:ghost

Readers

ghost (generic function)

Slot: sql-name
Readers

slot-sql-name (generic function)

Class: effective-column-slot ()
Package

postmodern

Source

table.lisp (file)

Direct superclasses

standard-effective-slot-definition (class)

Direct methods

slot-column (method)

Direct slots
Slot: direct-slot
Initform

postmodern::*direct-column-slot*

Readers

slot-column (generic function)

Class: field-description ()

Description of a field in a query result.

Package

cl-postgres

Source

protocol.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: name
Initargs

:name

Readers

field-name (generic function)

Writers

(setf field-name) (generic function)

Slot: type-id
Initargs

:type-id

Readers

field-type (generic function)

Writers

(setf field-type) (generic function)

Slot: interpreter
Initargs

:interpreter

Readers

field-interpreter (generic function)

Writers

(setf field-interpreter) (generic function)

Slot: receive-binary-p
Initargs

:receive-binary-p

Readers

field-binary-p (generic function)

Class: pooled-database-connection ()

Type for database connections that are pooled.
Stores the arguments used to create it, so different pools can be distinguished.

Package

postmodern

Source

connect.lisp (file)

Direct superclasses

database-connection (class)

Direct methods
Direct slots
Slot: pool-type
Initargs

:pool-type

Readers

connection-pool-type (generic function)

Writers

(setf connection-pool-type) (generic function)

Class: savepoint-handle ()

Simple box type for storing the state and the associated database connection of a savepoint.

Package

postmodern

Source

transaction.lisp (file)

Direct superclasses

transaction-handle (class)

Direct methods
Direct slots
Slot: name
Initargs

:name

Initform

(error "savepoint name is not provided.")

Readers

savepoint-name (generic function)

Slot: open-p
Initform

t

Readers

savepoint-open-p (generic function)

Writers

(setf savepoint-open-p) (generic function)

Slot: connection
Initform

postmodern:*database*

Readers

savepoint-connection (generic function)

Class: transaction-handle ()

Simple box type for storing the status and the
associated database connection of a transaction. When open-p is nil, the transaction has been aborted or committed. commit-hooks and abort-hooks hold lists of functions (which should require no arguments) to be executed at commit and abort time, respectively.

Package

postmodern

Source

transaction.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

savepoint-handle (class)

Direct methods
Direct slots
Slot: open-p
Initform

t

Readers

transaction-open-p (generic function)

Writers

(setf transaction-open-p) (generic function)

Slot: connection
Initform

postmodern:*database*

Readers

transaction-connection (generic function)

Slot: commit-hooks
Readers

commit-hooks (generic function)

Writers

(setf commit-hooks) (generic function)

Slot: abort-hooks
Readers

abort-hooks (generic function)

Writers

(setf abort-hooks) (generic function)

Class: type-interpreter ()

Information about type interpreter for types coming
back from the database. use-binary is either T for binary, nil for text, or a function of no arguments to be called to determine if binary or text should be used. The idea is that there will always be a text reader, there may be a binary reader, and there may be times when one wants to use the text reader.

Package

cl-postgres

Source

interpret.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: oid
Initargs

:oid

Readers

type-interpreter-oid (generic function)

Writers

(setf type-interpreter-oid) (generic function)

Slot: use-binary
Initargs

:use-binary

Readers

type-interpreter-use-binary (generic function)

Writers

(setf type-interpreter-use-binary) (generic function)

Slot: binary-reader
Initargs

:binary-reader

Readers

type-interpreter-binary-reader (generic function)

Writers

(setf type-interpreter-binary-reader) (generic function)

Slot: text-reader
Initargs

:text-reader

Readers

type-interpreter-text-reader (generic function)

Writers

(setf type-interpreter-text-reader) (generic function)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.8 Types

Type: serial ()
Package

s-sql

Source

s-sql.lisp (file)

Type: serial8 ()
Package

s-sql

Source

s-sql.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M   P   S  
Index Entry  Section

C
cl-postgres.asd: The cl-postgres<dot>asd file
cl-postgres/cl-postgres: The cl-postgres/cl-postgres module
cl-postgres/cl-postgres/bulk-copy.lisp: The cl-postgres/cl-postgres/bulk-copy<dot>lisp file
cl-postgres/cl-postgres/communicate.lisp: The cl-postgres/cl-postgres/communicate<dot>lisp file
cl-postgres/cl-postgres/errors.lisp: The cl-postgres/cl-postgres/errors<dot>lisp file
cl-postgres/cl-postgres/features.lisp: The cl-postgres/cl-postgres/features<dot>lisp file
cl-postgres/cl-postgres/ieee-floats.lisp: The cl-postgres/cl-postgres/ieee-floats<dot>lisp file
cl-postgres/cl-postgres/interpret.lisp: The cl-postgres/cl-postgres/interpret<dot>lisp file
cl-postgres/cl-postgres/messages.lisp: The cl-postgres/cl-postgres/messages<dot>lisp file
cl-postgres/cl-postgres/oid.lisp: The cl-postgres/cl-postgres/oid<dot>lisp file
cl-postgres/cl-postgres/package.lisp: The cl-postgres/cl-postgres/package<dot>lisp file
cl-postgres/cl-postgres/protocol.lisp: The cl-postgres/cl-postgres/protocol<dot>lisp file
cl-postgres/cl-postgres/public.lisp: The cl-postgres/cl-postgres/public<dot>lisp file
cl-postgres/cl-postgres/sql-string.lisp: The cl-postgres/cl-postgres/sql-string<dot>lisp file
cl-postgres/cl-postgres/strings-utf-8.lisp: The cl-postgres/cl-postgres/strings-utf-8<dot>lisp file
cl-postgres/cl-postgres/trivial-utf-8.lisp: The cl-postgres/cl-postgres/trivial-utf-8<dot>lisp file

F
File, Lisp, cl-postgres.asd: The cl-postgres<dot>asd file
File, Lisp, cl-postgres/cl-postgres/bulk-copy.lisp: The cl-postgres/cl-postgres/bulk-copy<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/communicate.lisp: The cl-postgres/cl-postgres/communicate<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/errors.lisp: The cl-postgres/cl-postgres/errors<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/features.lisp: The cl-postgres/cl-postgres/features<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/ieee-floats.lisp: The cl-postgres/cl-postgres/ieee-floats<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/interpret.lisp: The cl-postgres/cl-postgres/interpret<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/messages.lisp: The cl-postgres/cl-postgres/messages<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/oid.lisp: The cl-postgres/cl-postgres/oid<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/package.lisp: The cl-postgres/cl-postgres/package<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/protocol.lisp: The cl-postgres/cl-postgres/protocol<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/public.lisp: The cl-postgres/cl-postgres/public<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/sql-string.lisp: The cl-postgres/cl-postgres/sql-string<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/strings-utf-8.lisp: The cl-postgres/cl-postgres/strings-utf-8<dot>lisp file
File, Lisp, cl-postgres/cl-postgres/trivial-utf-8.lisp: The cl-postgres/cl-postgres/trivial-utf-8<dot>lisp file
File, Lisp, postmodern.asd: The postmodern<dot>asd file
File, Lisp, postmodern/postmodern/connect.lisp: The postmodern/postmodern/connect<dot>lisp file
File, Lisp, postmodern/postmodern/deftable.lisp: The postmodern/postmodern/deftable<dot>lisp file
File, Lisp, postmodern/postmodern/namespace.lisp: The postmodern/postmodern/namespace<dot>lisp file
File, Lisp, postmodern/postmodern/package.lisp: The postmodern/postmodern/package<dot>lisp file
File, Lisp, postmodern/postmodern/prepare.lisp: The postmodern/postmodern/prepare<dot>lisp file
File, Lisp, postmodern/postmodern/query.lisp: The postmodern/postmodern/query<dot>lisp file
File, Lisp, postmodern/postmodern/table.lisp: The postmodern/postmodern/table<dot>lisp file
File, Lisp, postmodern/postmodern/transaction.lisp: The postmodern/postmodern/transaction<dot>lisp file
File, Lisp, postmodern/postmodern/util.lisp: The postmodern/postmodern/util<dot>lisp file
File, Lisp, s-sql.asd: The s-sql<dot>asd file
File, Lisp, s-sql/s-sql/s-sql.lisp: The s-sql/s-sql/s-sql<dot>lisp file

L
Lisp File, cl-postgres.asd: The cl-postgres<dot>asd file
Lisp File, cl-postgres/cl-postgres/bulk-copy.lisp: The cl-postgres/cl-postgres/bulk-copy<dot>lisp file
Lisp File, cl-postgres/cl-postgres/communicate.lisp: The cl-postgres/cl-postgres/communicate<dot>lisp file
Lisp File, cl-postgres/cl-postgres/errors.lisp: The cl-postgres/cl-postgres/errors<dot>lisp file
Lisp File, cl-postgres/cl-postgres/features.lisp: The cl-postgres/cl-postgres/features<dot>lisp file
Lisp File, cl-postgres/cl-postgres/ieee-floats.lisp: The cl-postgres/cl-postgres/ieee-floats<dot>lisp file
Lisp File, cl-postgres/cl-postgres/interpret.lisp: The cl-postgres/cl-postgres/interpret<dot>lisp file
Lisp File, cl-postgres/cl-postgres/messages.lisp: The cl-postgres/cl-postgres/messages<dot>lisp file
Lisp File, cl-postgres/cl-postgres/oid.lisp: The cl-postgres/cl-postgres/oid<dot>lisp file
Lisp File, cl-postgres/cl-postgres/package.lisp: The cl-postgres/cl-postgres/package<dot>lisp file
Lisp File, cl-postgres/cl-postgres/protocol.lisp: The cl-postgres/cl-postgres/protocol<dot>lisp file
Lisp File, cl-postgres/cl-postgres/public.lisp: The cl-postgres/cl-postgres/public<dot>lisp file
Lisp File, cl-postgres/cl-postgres/sql-string.lisp: The cl-postgres/cl-postgres/sql-string<dot>lisp file
Lisp File, cl-postgres/cl-postgres/strings-utf-8.lisp: The cl-postgres/cl-postgres/strings-utf-8<dot>lisp file
Lisp File, cl-postgres/cl-postgres/trivial-utf-8.lisp: The cl-postgres/cl-postgres/trivial-utf-8<dot>lisp file
Lisp File, postmodern.asd: The postmodern<dot>asd file
Lisp File, postmodern/postmodern/connect.lisp: The postmodern/postmodern/connect<dot>lisp file
Lisp File, postmodern/postmodern/deftable.lisp: The postmodern/postmodern/deftable<dot>lisp file
Lisp File, postmodern/postmodern/namespace.lisp: The postmodern/postmodern/namespace<dot>lisp file
Lisp File, postmodern/postmodern/package.lisp: The postmodern/postmodern/package<dot>lisp file
Lisp File, postmodern/postmodern/prepare.lisp: The postmodern/postmodern/prepare<dot>lisp file
Lisp File, postmodern/postmodern/query.lisp: The postmodern/postmodern/query<dot>lisp file
Lisp File, postmodern/postmodern/table.lisp: The postmodern/postmodern/table<dot>lisp file
Lisp File, postmodern/postmodern/transaction.lisp: The postmodern/postmodern/transaction<dot>lisp file
Lisp File, postmodern/postmodern/util.lisp: The postmodern/postmodern/util<dot>lisp file
Lisp File, s-sql.asd: The s-sql<dot>asd file
Lisp File, s-sql/s-sql/s-sql.lisp: The s-sql/s-sql/s-sql<dot>lisp file

M
Module, cl-postgres/cl-postgres: The cl-postgres/cl-postgres module
Module, postmodern/postmodern: The postmodern/postmodern module
Module, s-sql/s-sql: The s-sql/s-sql module

P
postmodern.asd: The postmodern<dot>asd file
postmodern/postmodern: The postmodern/postmodern module
postmodern/postmodern/connect.lisp: The postmodern/postmodern/connect<dot>lisp file
postmodern/postmodern/deftable.lisp: The postmodern/postmodern/deftable<dot>lisp file
postmodern/postmodern/namespace.lisp: The postmodern/postmodern/namespace<dot>lisp file
postmodern/postmodern/package.lisp: The postmodern/postmodern/package<dot>lisp file
postmodern/postmodern/prepare.lisp: The postmodern/postmodern/prepare<dot>lisp file
postmodern/postmodern/query.lisp: The postmodern/postmodern/query<dot>lisp file
postmodern/postmodern/table.lisp: The postmodern/postmodern/table<dot>lisp file
postmodern/postmodern/transaction.lisp: The postmodern/postmodern/transaction<dot>lisp file
postmodern/postmodern/util.lisp: The postmodern/postmodern/util<dot>lisp file

S
s-sql.asd: The s-sql<dot>asd file
s-sql/s-sql: The s-sql/s-sql module
s-sql/s-sql/s-sql.lisp: The s-sql/s-sql/s-sql<dot>lisp file

Jump to:   C   F   L   M   P   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   !   %   (  
A   B   C   D   E   F   G   I   L   M   N   O   P   Q   R   S   T   U   V   W  
Index Entry  Section

!
!dao-def: Exported functions
!foreign: Exported functions
!index: Exported functions
!unique: Exported functions
!unique-index: Exported functions

%
%build-foreign-reference: Internal functions
%eval: Internal functions

(
(setf abort-hooks): Exported generic functions
(setf abort-hooks): Exported generic functions
(setf commit-hooks): Exported generic functions
(setf commit-hooks): Exported generic functions
(setf connection-available): Internal generic functions
(setf connection-available): Internal generic functions
(setf connection-parameters): Exported generic functions
(setf connection-parameters): Exported generic functions
(setf connection-pool-type): Internal generic functions
(setf connection-pool-type): Internal generic functions
(setf connection-service): Internal generic functions
(setf connection-service): Internal generic functions
(setf connection-socket): Internal generic functions
(setf connection-socket): Internal generic functions
(setf connection-timestamp-format): Internal generic functions
(setf connection-timestamp-format): Internal generic functions
(setf copier-count): Internal generic functions
(setf copier-count): Internal generic functions
(setf database-error-message): Exported generic functions
(setf database-error-message): Exported generic functions
(setf field-interpreter): Internal generic functions
(setf field-interpreter): Internal generic functions
(setf field-name): Exported generic functions
(setf field-name): Exported generic functions
(setf field-type): Exported generic functions
(setf field-type): Exported generic functions
(setf postgresql-notification-channel): Exported generic functions
(setf postgresql-notification-channel): Exported generic functions
(setf postgresql-notification-payload): Exported generic functions
(setf postgresql-notification-payload): Exported generic functions
(setf postgresql-notification-pid): Exported generic functions
(setf postgresql-notification-pid): Exported generic functions
(setf savepoint-open-p): Internal generic functions
(setf savepoint-open-p): Internal generic functions
(setf transaction-open-p): Internal generic functions
(setf transaction-open-p): Internal generic functions
(setf type-interpreter-binary-reader): Internal generic functions
(setf type-interpreter-binary-reader): Internal generic functions
(setf type-interpreter-oid): Internal generic functions
(setf type-interpreter-oid): Internal generic functions
(setf type-interpreter-text-reader): Internal generic functions
(setf type-interpreter-text-reader): Internal generic functions
(setf type-interpreter-use-binary): Internal generic functions
(setf type-interpreter-use-binary): Internal generic functions

A
abort-hooks: Exported generic functions
abort-hooks: Exported generic functions
abort-logical-transaction: Internal generic functions
abort-logical-transaction: Internal generic functions
abort-logical-transaction: Internal generic functions
abort-transaction: Exported functions
add-table-definition: Internal functions
alist-row-reader: Exported functions
all-rows: Internal macros
as-utf-8-bytes: Internal macros
authenticate: Internal functions

B
binary-reader: Internal macros
bind-message: Internal functions
build-dao-methods: Internal functions
build-row-reader: Internal functions
bulk-copier-own-connection: Internal generic functions
bulk-copier-own-connection: Internal generic functions
bytes-to-hex-string: Internal functions

C
call-with-connection: Exported functions
call-with-ensured-transaction: Internal functions
call-with-logical-transaction: Internal functions
call-with-savepoint: Internal functions
call-with-transaction: Internal functions
clear-connection-pool: Exported functions
close-database: Exported functions
close-db-writer: Exported functions
close-prepared-message: Internal functions
coalesce: Exported functions
column-default: Internal generic functions
column-default: Internal generic functions
column-row-reader: Internal functions
column-type: Internal generic functions
column-type: Internal generic functions
commit-hooks: Exported generic functions
commit-hooks: Exported generic functions
commit-logical-transaction: Internal generic functions
commit-logical-transaction: Internal generic functions
commit-logical-transaction: Internal generic functions
commit-transaction: Exported functions
connect: Exported functions
connect-toplevel: Exported functions
connected-p: Exported functions
connection-available: Internal generic functions
connection-available: Internal generic functions
connection-db: Internal generic functions
connection-db: Internal generic functions
connection-host: Internal generic functions
connection-host: Internal generic functions
connection-meta: Exported functions
connection-parameters: Exported generic functions
connection-parameters: Exported generic functions
connection-password: Internal generic functions
connection-password: Internal generic functions
connection-pool-type: Internal generic functions
connection-pool-type: Internal generic functions
connection-port: Internal generic functions
connection-port: Internal generic functions
connection-service: Internal generic functions
connection-service: Internal generic functions
connection-socket: Internal generic functions
connection-socket: Internal generic functions
connection-timestamp-format: Internal generic functions
connection-timestamp-format: Internal generic functions
connection-use-ssl: Internal generic functions
connection-use-ssl: Internal generic functions
connection-user: Internal generic functions
connection-user: Internal generic functions
copier-columns: Internal generic functions
copier-columns: Internal generic functions
copier-count: Internal generic functions
copier-count: Internal generic functions
copier-database: Internal generic functions
copier-database: Internal generic functions
copier-table: Internal generic functions
copier-table: Internal generic functions
copier-write-sequence: Internal functions
copier-write-value: Internal functions
copy-data-message: Internal functions
copy-done-message: Internal functions
copy-fail-message: Internal functions
copy-query: Internal functions
copy-sql-readtable: Exported functions
create-all-tables: Exported functions
create-package-tables: Exported functions
create-schema: Exported functions
create-table: Exported functions

D
dao-column-fields: Internal functions
dao-column-map: Internal generic functions
dao-column-map: Internal generic functions
dao-column-slots: Internal functions
dao-exists-p: Exported generic functions
dao-from-fields: Internal functions
dao-keys: Exported generic functions
dao-keys: Exported generic functions
dao-keys: Exported generic functions
dao-keys: Exported generic functions
dao-keys: Exported generic functions
dao-row-reader: Internal functions
dao-row-reader-with-body: Internal macros
dao-spec-for-format: Internal functions
dao-superclasses: Internal functions
dao-table-definition: Exported functions
dao-table-name: Exported functions
database-error-cause: Exported generic functions
database-error-cause: Exported generic functions
database-error-code: Exported generic functions
database-error-code: Exported generic functions
database-error-constraint-name: Exported functions
database-error-context: Internal generic functions
database-error-context: Internal generic functions
database-error-detail: Exported generic functions
database-error-detail: Exported generic functions
database-error-hint: Internal generic functions
database-error-hint: Internal generic functions
database-error-message: Exported generic functions
database-error-message: Exported generic functions
database-error-position: Internal generic functions
database-error-position: Internal generic functions
database-error-query: Exported generic functions
database-error-query: Exported generic functions
database-open-p: Exported functions
db-write-row: Exported functions
decode-float32: Exported functions
decode-float64: Exported functions
def-drop-op: Internal macros
def-row-reader: Exported macros
def-sql-op: Internal macros
default-sql-readtable: Exported functions
deferror: Internal macros
define-dao-finalization: Exported macros
define-interpreter: Internal macros
define-message: Internal macros
defprepared: Exported macros
defprepared-with-names: Exported macros
deftable: Exported macros
delete-dao: Exported generic functions
dequote: Internal functions
describe-prepared-message: Internal functions
direct-keys: Internal generic functions
direct-keys: Internal generic functions
disconnect: Exported generic functions
disconnect: Exported generic functions
disconnect: Exported generic functions
disconnect-toplevel: Exported functions
dissect-type: Internal functions
do-query-dao: Exported macros
do-select-dao: Exported macros
do-with-schema: Internal functions
doquery: Exported macros
drop-schema: Exported functions

E
enable-s-sql-syntax: Exported functions
enc-byte-length: Internal functions
enc-read-string: Internal functions
enc-string-bytes: Internal functions
enc-write-string: Internal functions
encode-float32: Exported functions
encode-float64: Exported functions
ensure-connection: Internal functions
ensure-prepared: Internal functions
ensure-socket-is-closed: Internal functions
ensure-transaction: Exported macros
escape-bytes: Internal functions
escape-sql-expression: Internal functions
exec-prepared: Exported functions
exec-query: Exported functions
execute: Exported macros
expand-create-index: Internal functions
expand-foreign-on*: Internal functions
expand-joins: Internal functions
expand-rows: Internal functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sql-op: Internal generic functions
expand-sq