The crane Reference Manual

Table of Contents

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

The crane Reference Manual

This is the crane Reference Manual, version 0.4, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:46:37 2018 GMT+0.


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

1 Introduction

Crane

Build Status Quicklisp

Crane is an ORM for Common Lisp, providing a simple bridge between CLOS and relational databases, and out of the box migrations.

Usage

Defining Tables

(deftable user ()
  (name :type text :uniquep t)
  (age :type integer :nullp nil :initform 18)
  (friend :type integer :foreign user)))

The foreign argument accepts a symbol that represents another table or a sexp of the form (table &key on-delete on-update)), where acceptable values are :no-action :restrict :cascade :set-null :set-default.

Migrating

(deftable user ()
  (name :type text :uniquep t :nullp nil)
  (age :type integer :nullp t :initform 18)
  (description :type text))

Just make the changes, and Crane will compute the diffs and perform all the ALTER TABLEs for you.

Connecting

(setup
 :migrations-directory
 (asdf:system-relative-pathname :myapp #p"migrations/")
 :databases
 '(:main
   (:type :postgres
    :name "myapp_db"
    :user "user"
    :pass "user")))

(connect)

For configuration management and switching databases in development/production environments, you might want to use Envy.

Creating, Saving, and Deleting Objects

(let ((instance (create 'ship :name "Dalliance"
                              :tonnage 77)))
  ;; FIXME: It's back luck to rename a ship
  (setf (name instance) "Serenity")
  ;; Expand the cargo hold
  (incf (tonnage instance) 25)
  ;; Save these changes!
  (save instance)
  ;; Time to retire
  (del instance))

Filtering

(filter 'user) ;; Returns everything

(filter 'user :name "Eudoxia")

(filter 'user (:> :age 21))

;; Returns a single object
(single 'user :name "Eudoxia")

;; Throws an error if this returns more
;; than one object
(single! 'user (:< age 35))

;; t if a match exists, nil otherwise
(exists 'user :name "Eudoxia")

;; If this record doesn't exist create it
(get-or-create 'user :name "Eudoxia" :age 19)

Transactions

;;;; Automatic
(with-transaction ()
  (let ((restaurants (filter 'restaurant ...)))
    (loop for restaurant in restaurants do
          ...
          (save restaurant))))

;;;; Manual
(progn
  (begin-transaction)
  (let ((restaurants (filter 'restaurant ...)))
    (loop for restaurant in restaurants do
          ...
          (save restaurant)))
  (commit))

Fixtures

;;;; initial-data.lisp
(app:user
  (:name "eudoxia"
   :groups (:admin :staff))
  (:name "joe"
   :groups (:admin)))
(app:company
  (:name "Initech"
   :city "Denver"))

;;;; myapp.asd
(asdf:defsystem myapp
  :defsystem-depends-on (:clos-fixtures)
  :components ((:module "src"
                :components
                ((:fixture "initial-data")))))

Inflate/Deflate

(definflate (stamp 'timestamp)
  ;; Inflate a timestamp value
  ;; into a timestamp object
  (local-time:universal-to-timestamp stamp))

(defdeflate (stamp local-time:timestamp)
  ;; Deflate a timestamp object
  ;; into a string
  (local-time:format-timestring nil stamp))

Documentation

I'm in the process of moving the documentation to Codex, so for now you can check it out in the website.

License

Copyright (c) 2013 Fernando Borretti (eudoxiahp@gmail.com)

Released under the MIT license.


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

2 Systems

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


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

2.1 crane

Author

Fernando Borretti <eudoxiahp@gmail.com>

Home Page

http://eudoxia.me/crane/

License

MIT

Description

An ORM for Common Lisp.

Long Description

# Crane

[![Build Status](https://travis-ci.org/eudoxia0/crane.svg?branch=master)](https://travis-ci.org/eudoxia0/crane)
[![Quicklisp](http://quickdocs.org/badge/crane.svg)](http://quickdocs.org/crane/)

Crane is an ORM for Common Lisp, providing a simple bridge between CLOS and
relational databases, and out of the box migrations.

# Usage

## Defining Tables

“‘lisp
(deftable user ()
(name :type text :uniquep t)
(age :type integer :nullp nil :initform 18)
(friend :type integer :foreign user)))
“‘
The foreign argument accepts a symbol that represents another table or a sexp of the form ‘(table &key on-delete on-update))‘, where acceptable values are ‘:no-action :restrict :cascade :set-null :set-default‘.

## Migrating

“‘lisp
(deftable user ()
(name :type text :uniquep t :nullp nil)
(age :type integer :nullp t :initform 18)
(description :type text))
“‘

Just make the changes, and Crane will compute the diffs and perform all the
‘ALTER TABLE‘s for you.

## Connecting

“‘lisp
(setup
:migrations-directory
(asdf:system-relative-pathname :myapp #p"migrations/")
:databases
’(:main
(:type :postgres
:name "myapp_db"
:user "user"
:pass "user")))

(connect)
“‘

For configuration management and switching databases in development/production
environments, you might want to use [Envy](https://github.com/fukamachi/envy).

## Creating, Saving, and Deleting Objects

“‘lisp
(let ((instance (create ’ship :name "Dalliance"
:tonnage 77)))
;; FIXME: It’s back luck to rename a ship
(setf (name instance) "Serenity")
;; Expand the cargo hold
(incf (tonnage instance) 25)
;; Save these changes!
(save instance)
;; Time to retire
(del instance))
“‘

## Filtering

“‘lisp
(filter ’user) ;; Returns everything

(filter ’user :name "Eudoxia")

(filter ’user (:> :age 21))

;; Returns a single object
(single ’user :name "Eudoxia")

;; Throws an error if this returns more
;; than one object
(single! ’user (:< age 35))

;; t if a match exists, nil otherwise
(exists ’user :name "Eudoxia")

;; If this record doesn’t exist create it
(get-or-create ’user :name "Eudoxia" :age 19)
“‘

## Transactions

“‘lisp
;;;; Automatic
(with-transaction ()
(let ((restaurants (filter ’restaurant ...)))
(loop for restaurant in restaurants do
...
(save restaurant))))

;;;; Manual
(progn
(begin-transaction)
(let ((restaurants (filter ’restaurant ...)))
(loop for restaurant in restaurants do
...
(save restaurant)))
(commit))
“‘

## Fixtures

“‘lisp
;;;; initial-data.lisp
(app:user
(:name "eudoxia"
:groups (:admin :staff))
(:name "joe"
:groups (:admin)))
(app:company
(:name "Initech"
:city "Denver"))

;;;; myapp.asd
(asdf:defsystem myapp
:defsystem-depends-on (:clos-fixtures)
:components ((:module "src"
:components
((:fixture "initial-data")))))
“‘

## Inflate/Deflate

“‘lisp
(definflate (stamp ’timestamp)
;; Inflate a timestamp value
;; into a timestamp object
(local-time:universal-to-timestamp stamp))

(defdeflate (stamp local-time:timestamp)
;; Deflate a timestamp object
;; into a string
(local-time:format-timestring nil stamp))
“‘

# Documentation

I’m in the process of moving the documentation to [Codex][codex], so for now you
can check it out in the [website][docs-pdf].

[codex]: https://github.com/CommonDoc/codex
[docs-pdf]: http://eudoxia.me/crane/docs/manual.pdf

# License

Copyright (c) 2013 Fernando Borretti (eudoxiahp@gmail.com)

Released under the MIT license.

Version

0.4

Dependencies
Source

crane.asd (file)

Component

src (module)


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

3 Modules

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


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

3.1 crane/src

Parent

crane (system)

Location

src/

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 crane.asd

Location

crane.asd

Systems

crane (system)


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

4.1.2 crane/src/errors.lisp

Parent

src (module)

Location

src/errors.lisp

Packages

crane.errors

Exported Definitions
Internal Definitions

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

4.1.3 crane/src/config.lisp

Dependency

errors.lisp (file)

Parent

src (module)

Location

src/config.lisp

Packages

crane.config

Exported Definitions
Internal Definitions

*config* (special variable)


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

4.1.4 crane/src/util.lisp

Dependency

config.lisp (file)

Parent

src (module)

Location

src/util.lisp

Packages

crane.util

Exported Definitions

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

4.1.5 crane/src/connect.lisp

Dependency

util.lisp (file)

Parent

src (module)

Location

src/connect.lisp

Packages

crane.connect

Exported Definitions
Internal Definitions

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

4.1.6 crane/src/sql.lisp

Dependency

connect.lisp (file)

Parent

src (module)

Location

src/sql.lisp

Packages

crane.sql

Exported Definitions
Internal Definitions

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

4.1.7 crane/src/meta.lisp

Dependency

sql.lisp (file)

Parent

src (module)

Location

src/meta.lisp

Packages

crane.meta

Exported Definitions
Internal Definitions

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

4.1.8 crane/src/query.lisp

Dependency

meta.lisp (file)

Parent

src (module)

Location

src/query.lisp

Packages

crane.query

Exported Definitions

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

4.1.9 crane/src/migration.lisp

Dependency

query.lisp (file)

Parent

src (module)

Location

src/migration.lisp

Packages

crane.migration

Exported Definitions
Internal Definitions

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

4.1.10 crane/src/table.lisp

Dependency

migration.lisp (file)

Parent

src (module)

Location

src/table.lisp

Packages

crane.table

Exported Definitions
Internal Definitions

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

4.1.11 crane/src/types.lisp

Dependency

table.lisp (file)

Parent

src (module)

Location

src/types.lisp

Packages

crane.types

Exported Definitions

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

4.1.12 crane/src/inflate-deflate.lisp

Dependency

types.lisp (file)

Parent

src (module)

Location

src/inflate-deflate.lisp

Packages

crane.inflate-deflate

Exported Definitions

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

4.1.13 crane/src/interface.lisp

Dependency

inflate-deflate.lisp (file)

Parent

src (module)

Location

src/interface.lisp

Packages

crane.interface

Exported Definitions
Internal Definitions

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

4.1.14 crane/src/fixture.lisp

Dependency

interface.lisp (file)

Parent

src (module)

Location

src/fixture.lisp

Packages

crane.fixture


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

4.1.15 crane/src/transaction.lisp

Dependency

fixture.lisp (file)

Parent

src (module)

Location

src/transaction.lisp

Packages

crane.transaction

Exported Definitions

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

4.1.16 crane/src/crane.lisp

Dependency

transaction.lisp (file)

Parent

src (module)

Location

src/crane.lisp

Packages

crane


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

5 Packages

Packages are listed by definition order.


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

5.1 crane.errors

Definition of Crane errors.

Source

errors.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

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

5.2 crane.config

Functions for reading and writing from and to the global configuration.

Source

config.lisp (file)

Use List
Exported Definitions
Internal Definitions

*config* (special variable)


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

5.3 crane.util

Various utilities for use in other parts of Crane.

Source

util.lisp (file)

Use List
Used By List

crane.sql

Exported Definitions

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

5.4 crane.connect

Handles database connections, connection parameter validation, and various low-level DB-specific modes.

Source

connect.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5.5 crane.sql

This module handles the generation of SQL for table definition and migration.

Source

sql.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5.6 crane.meta

This file defines the metaclasses that map CLOS objects to SQL tables, and some basic operations on them.

Source

meta.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5.7 crane.query

Executing cl-dbi queries in the context of Crane.

Source

query.lisp (file)

Use List
Exported Definitions

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

5.8 crane.migration

The first part of this package contains various simple
utilities for manipulating the migration history of a table. The second part contains code that actually creates tables and migrates them. The actual generation of table-creating SQL is handled by crane.sql.

Source

migration.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5.9 crane.table

Implements the deftable macro.

Source

table.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5.10 crane.types

Implements the database types.

Source

types.lisp (file)

Used By List
Exported Definitions

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

5.11 crane.inflate-deflate

Inflation/deflation map SQL string to CLOS objects. This is
unrelated to the ORM, and meant to allow complex column datatypes to be mapped to CLOS objects. For example, mapping SQL timestamps to structures that represent time, or mapping other more complex SQL types to CLOS objects.

Source

inflate-deflate.lisp (file)

Use List
Exported Definitions

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

5.12 crane.interface

This package contains the methods used to access and alter database records in an object-oriented way.

Source

interface.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5.13 crane.fixture

Customizes clos-fixtures for use in Crane.

Source

fixture.lisp (file)

Use List

common-lisp


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

5.14 crane.transaction

Implements transactions.

Source

transaction.lisp (file)

Use List
Exported Definitions

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

5.15 crane

The global Crane package re-exports symbols from internal modules.

Source

crane.lisp (file)

Use List

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 Special variables

Special Variable: *after-config-hook*

A function that gets executed after setup is called. Takes no arguments, does nothing by default.

Package

crane.config

Source

config.lisp (file)

Special Variable: *default-db*

The name of the default database

Package

crane.connect

Source

connect.lisp (file)


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

6.1.2 Macros

Macro: create CLASS-NAME &rest ARGS

Create an object.

Package

crane.interface

Source

interface.lisp (file)

Macro: create% OBJ
Package

crane.interface

Source

interface.lisp (file)

Macro: create-from-plist CLASS PLIST
Package

crane.interface

Source

interface.lisp (file)

Macro: defdeflate (OBJ-NAME OBJ-TYPE) &rest BODY
Package

crane.inflate-deflate

Source

inflate-deflate.lisp (file)

Macro: definflate (OBJ-NAME OBJ-TYPE-NAME) &rest BODY
Package

crane.inflate-deflate

Source

inflate-deflate.lisp (file)

Macro: deftable NAME (&rest SUPERCLASSES) &body SLOTS-AND-OPTIONS

Define a table.

Package

crane.table

Source

table.lisp (file)

Macro: deref OBJ FIELD
Package

crane.interface

Source

interface.lisp (file)

Macro: do-filter (RESULT-NAME CLASS &rest PARAMS) &rest BODY
Package

crane.interface

Source

interface.lisp (file)

Macro: do-query (RESULT-NAME QUERY &optional DATABASE-NAME) &rest BODY

Execute code for each result in the query, without aggregating them all into a list.

Package

crane.query

Source

query.lisp (file)

Macro: exists CLASS &rest PARAMS
Package

crane.interface

Source

interface.lisp (file)

Macro: filter CLASS &rest PARAMS
Package

crane.interface

Source

interface.lisp (file)

Macro: meta-query QUERY DATABASE-NAME BODY
Package

crane.query

Source

query.lisp (file)

Macro: query QUERY &optional DATABASE-NAME

Execute an SxQL query on the database ‘database-name‘.

Package

crane.query

Source

query.lisp (file)

Macro: single CLASS &rest PARAMS
Package

crane.interface

Source

interface.lisp (file)

Macro: single! CLASS &rest PARAMS
Package

crane.interface

Source

interface.lisp (file)

Macro: single-or-create CLASS &rest PARAMS
Package

crane.interface

Source

interface.lisp (file)

Macro: with-transaction (&optional DB) &rest BODY
Package

crane.transaction

Source

transaction.lisp (file)


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

6.1.3 Functions

Function: add-constraint TABLE-NAME BODY

SQL to add a constraint to a table.

Package

crane.sql

Source

sql.lisp (file)

Function: alter-constraint TABLE-NAME COLUMN-NAME TYPE VALUE

SQL to alter a constraint in a table.

Package

crane.sql

Source

sql.lisp (file)

Function: begin-transaction &optional DB
Package

crane.transaction

Source

transaction.lisp (file)

Function: build TABLE-NAME
Package

crane.migration

Source

migration.lisp (file)

Function: commit &optional DB
Package

crane.transaction

Source

transaction.lisp (file)

Function: connect ()

Connect to all the databases specified in the configuration.

Package

crane.connect

Source

connect.lisp (file)

Function: create-and-sort-constraints TABLE-NAME DIGEST DATABASE-NAME

A plist of different types of constraints from a table digest.

Package

crane.sql

Source

sql.lisp (file)

Function: create-table TABLE-NAME DIGEST
Package

crane.migration

Source

migration.lisp (file)

Function: debugp ()

Determine if Crane is in debug mode.

Package

crane.config

Source

config.lisp (file)

Function: define-column TABLE-NAME COLUMN DATABASE-NAME

A column definition from the digest of its slot, name and name of the database it’s table belongs to

Package

crane.sql

Source

sql.lisp (file)

Function: delete-migrations &optional FORCE
Package

crane.migration

Source

migration.lisp (file)

Function: diff-digest DIGEST-A DIGEST-B

Compute the difference between two digests. See DIGEST.

Package

crane.meta

Source

meta.lisp (file)

Function: diff-plist PLIST-A PLIST-B &key TEST

Calculates the difference between two plists, returning the result as a list of ([property] [old value] [new value])

Package

crane.util

Source

util.lisp (file)

Function: disconnect ()

Cut all connections.

Package

crane.connect

Source

connect.lisp (file)

Function: drop-column TABLE-NAME COLUMN-NAME

SQL to drop a column, given the table and column names.

Package

crane.sql

Source

sql.lisp (file)

Function: drop-constraint TABLE-NAME COLUMN-NAME TYPE

SQL to drop a constraint from a table.

Package

crane.sql

Source

sql.lisp (file)

Function: find-class-slot CLASS NAME

Find a slot by name

Package

crane.util

Source

util.lisp (file)

Function: find-slot OBJ NAME

Find a slot by name

Package

crane.util

Source

util.lisp (file)

Function: get-class-slot CLASS NAME

Find a slot in a class by keyword name

Package

crane.util

Source

util.lisp (file)

Function: get-config-value KEY

Get the value of ‘key‘ in the configuration.

Package

crane.config

Source

config.lisp (file)

Function: get-configuration ()

Return the configuration object, or signal a no-configuration error.

Package

crane.config

Source

config.lisp (file)

Function: get-connection &optional DATABASE-NAME

Return the connection handler for a given database.

Package

crane.connect

Source

connect.lisp (file)

Function: get-db &optional DATABASE-NAME

Return the database matching a specific name

Package

crane.connect

Source

connect.lisp (file)

Function: get-last-migration TABLE-NAME
Package

crane.migration

Source

migration.lisp (file)

Function: get-slot OBJ NAME

Find slot by keyword name

Package

crane.util

Source

util.lisp (file)

Function: insert-migration TABLE-NAME DIGEST

Insert a new diff to the migration history

Package

crane.migration

Source

migration.lisp (file)

Function: make-constraint TABLE-NAME COLUMN-NAME TYPE VALUE

A constraint from its type and values, if it can be created (eg :nullp t doesn’t create a constraint, but :nullp nil creates a NOT NULL constraint).

Package

crane.sql

Source

sql.lisp (file)

Function: make-keyword SYMBOL

Reintern a symbol into the keyword package.

Package

crane.util

Source

util.lisp (file)

Function: migrate TABLE-CLASS DIFF
Package

crane.migration

Source

migration.lisp (file)

Function: migration-history-p TABLE-NAME

T if the table has a migration history, NIL otherwise.

Package

crane.migration

Source

migration.lisp (file)

Function: plist-keys PLIST

Return the keys of a plist.

Package

crane.util

Source

util.lisp (file)

Function: rename-migration-history TABLE-NAME NEW-NAME
Package

crane.migration

Source

migration.lisp (file)

Function: rollback &optional DB
Package

crane.transaction

Source

transaction.lisp (file)

Function: setup &key MIGRATIONS-DIRECTORY DATABASES DEBUG

Set the configuration.

Package

crane.config

Source

config.lisp (file)

Function: sqlize OBJ

Turn a symbol or a string into its SQL representation. Identical to the behaviour of SxQL.

Package

crane.sql

Source

sql.lisp (file)


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

6.1.4 Generic functions

Generic Function: abstractp OBJECT
Package

crane.meta

Methods
Method: abstractp (<TABLE-CLASS> <table-class>)

Whether the class corresponds to an SQL table or not.

Source

meta.lisp (file)

Generic Function: col-autoincrement-p OBJECT
Package

crane.meta

Methods
Method: col-autoincrement-p (TABLE-CLASS-SLOT-DEFINITION-MIXIN table-class-slot-definition-mixin)

automatically generated reader method

Source

meta.lisp (file)

Generic Function: col-check OBJECT
Package

crane.meta

Methods
Method: col-check (TABLE-CLASS-SLOT-DEFINITION-MIXIN table-class-slot-definition-mixin)

automatically generated reader method

Source

meta.lisp (file)

Generic Function: col-foreign OBJECT
Package

crane.meta

Methods
Method: col-foreign (TABLE-CLASS-SLOT-DEFINITION-MIXIN table-class-slot-definition-mixin)

automatically generated reader method

Source

meta.lisp (file)

Generic Function: col-index-p OBJECT
Package

crane.meta

Methods
Method: col-index-p (TABLE-CLASS-SLOT-DEFINITION-MIXIN table-class-slot-definition-mixin)

automatically generated reader method

Source

meta.lisp (file)

Generic Function: col-null-p OBJECT
Package

crane.meta

Methods
Method: col-null-p (TABLE-CLASS-SLOT-DEFINITION-MIXIN table-class-slot-definition-mixin)

automatically generated reader method

Source

meta.lisp (file)

Generic Function: col-primary-p OBJECT
Package

crane.meta

Methods
Method: col-primary-p (TABLE-CLASS-SLOT-DEFINITION-MIXIN table-class-slot-definition-mixin)

automatically generated reader method

Source

meta.lisp (file)

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

crane.meta

Methods
Method: col-type (TABLE-CLASS-SLOT-DEFINITION-MIXIN table-class-slot-definition-mixin)

automatically generated reader method

Source

meta.lisp (file)

Method: (setf col-type) NEW-VALUE (TABLE-CLASS-SLOT-DEFINITION-MIXIN table-class-slot-definition-mixin)

automatically generated writer method

Source

meta.lisp (file)

Generic Function: col-unique-p OBJECT
Package

crane.meta

Methods
Method: col-unique-p (TABLE-CLASS-SLOT-DEFINITION-MIXIN table-class-slot-definition-mixin)

automatically generated reader method

Source

meta.lisp (file)

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

crane.connect

Methods
Method: database-connection (<DATABASE> <database>)
Method: (setf database-connection) NEW-VALUE (<DATABASE> <database>)

The underlying connection object.

Source

connect.lisp (file)

Generic Function: database-name OBJECT
Package

crane.connect

Methods
Method: database-name (<DATABASE> <database>)

The database name. If it’s an SQLite3 database, must be the pathname’s namestring.

Source

connect.lisp (file)

Generic Function: database-type OBJECT
Package

crane.connect

Methods
Method: database-type (<DATABASE> <database>)

A keyword representing the database type, e.g :sqlite3, :postgres.

Source

connect.lisp (file)

Generic Function: deferredp OBJECT
Package

crane.meta

Methods
Method: deferredp (<TABLE-CLASS> <table-class>)

Whether the class should be built only when explicitly calling build.

Source

meta.lisp (file)

Generic Function: deflate OBJ

Turn a Lisp object into a string for insertion in the database.

Package

crane.inflate-deflate

Source

inflate-deflate.lisp (file)

Methods
Method: deflate (STAMP timestamp)
Method: deflate OBJ
Method: deflate (NUM number)
Method: deflate (STR string)
Generic Function: del OBJ
Package

crane.interface

Methods
Method: del (OBJ <table>)

Delete an object from the database.

Source

interface.lisp (file)

Generic Function: digest CLASS
Package

crane.meta

Methods
Method: digest (CLASS <table-class>)

Serialize a class’s options and slots’ options into a plist

Source

meta.lisp (file)

Generic Function: drop-table TABLE
Package

crane.interface

Methods
Method: drop-table (TABLE-NAME symbol)
Source

interface.lisp (file)

Method: drop-table (TABLE <table-class>)
Source

interface.lisp (file)

Generic Function: inflate OBJ TYPE-NAME

Turn a string into a CLOS object.

Package

crane.inflate-deflate

Source

inflate-deflate.lisp (file)

Methods
Method: inflate STAMP (TYPE (eql timestamp))
Method: inflate OBJ (TYPE (eql datetime))
Method: inflate OBJ (TYPE (eql varchar))
Method: inflate OBJ (TYPE (eql text))
Method: inflate OBJ (TYPE (eql double))
Method: inflate OBJ (TYPE (eql numeric))
Method: inflate OBJ (TYPE (eql smallint))
Method: inflate OBJ (TYPE (eql bigint))
Method: inflate OBJ (TYPE (eql integer))
Generic Function: plist->object TABLE TUPLE
Package

crane.interface

Methods
Method: plist->object (TABLE-NAME symbol) TUPLE
Source

interface.lisp (file)

Method: plist->object (TABLE <table-class>) TUPLE

Convert a tuple produced by CL-DBI to a CLOS instance.

Source

interface.lisp (file)

Generic Function: save OBJ
Package

crane.interface

Methods
Method: save (OBJ <table>)

Write an instance object to the database.

Source

interface.lisp (file)

Generic Function: table-database CLASS
Package

crane.meta

Methods
Method: table-database (CLASS <table-class>)

The database this class belongs to.

Source

meta.lisp (file)

Generic Function: table-name CLASS
Package

crane.meta

Methods
Method: table-name (CLASS <table-class>)

Return the name of a the class, a symbol.

Source

meta.lisp (file)


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

6.1.5 Conditions

Condition: configuration-error ()

An error in the configuration.

Package

crane.errors

Source

errors.lisp (file)

Direct superclasses

crane-error (condition)

Direct methods

key (method)

Direct slots
Slot: key

The configuration key afflicted by the error.

Initargs

:key

Readers

key (generic function)

Condition: empty-table ()

Table has no slots.

Package

crane.errors

Source

errors.lisp (file)

Direct superclasses

crane-error (condition)

Condition: no-configuration-error ()

Crane was not configured.

Package

crane.errors

Source

errors.lisp (file)

Direct superclasses

crane-error (condition)

Condition: query-error ()

Error in a query.

Package

crane.errors

Source

errors.lisp (file)

Direct superclasses

crane-error (condition)


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

6.1.6 Classes

Class: <database> ()

A database.

Package

crane.connect

Source

connect.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: type

A keyword representing the database type, e.g :sqlite3, :postgres.

Type

keyword

Initargs

:type

Readers

database-type (generic function)

Slot: name

The database name. If it’s an SQLite3 database, must be the pathname’s namestring.

Type

string

Initargs

:name

Readers

database-name (generic function)

Slot: conn-spec

The connection specification.

Initargs

:conn-spec

Readers

database-connection-spec (generic function)

Slot: conn

The underlying connection object.

Initargs

:connection

Readers

database-connection (generic function)

Writers

(setf database-connection) (generic function)

Class: <table-class> ()

A table metaclass.

Package

crane.meta

Source

meta.lisp (file)

Direct superclasses

standard-class (class)

Direct methods
Direct slots
Slot: abstractp

Whether the class corresponds to an SQL table or not.

Initargs

:abstractp

Readers

abstractp (generic function)

Slot: deferredp

Whether the class should be built only when explicitly calling build.

Initargs

:deferredp

Readers

deferredp (generic function)

Slot: database

The database this class belongs to.

Initargs

:database

Readers

%table-database (generic function)

Class: <table> ()

The base class of all table classes.

Package

crane.table

Source

table.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
  • register-fixture (method)
  • del (method)
  • save (method)

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

6.1.7 Types

Type: bigint ()
Package

crane.types

Source

types.lisp (file)

Type: datetime ()
Package

crane.types

Source

types.lisp (file)

Type: double ()
Package

crane.types

Source

types.lisp (file)

Type: int ()
Package

crane.types

Source

types.lisp (file)

Type: numeric ()
Package

crane.types

Source

types.lisp (file)

Type: smallint ()
Package

crane.types

Source

types.lisp (file)

Type: text ()
Package

crane.types

Source

types.lisp (file)

Type: timestamp ()
Package

crane.types

Source

types.lisp (file)

Type: varchar ()
Package

crane.types

Source

types.lisp (file)


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

6.2 Internal definitions


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

6.2.1 Special variables

Special Variable: *config*

This variable holds Crane’s global configuration.

Package

crane.config

Source

config.lisp (file)

Special Variable: *db*

A map from database names to <database> objects.

Package

crane.connect

Source

connect.lisp (file)

Special Variable: +create-table-format-string+
Package

crane.migration

Source

migration.lisp (file)

Special Variable: +db-params+
Package

crane.connect

Source

connect.lisp (file)

Special Variable: +referential-actions+
Package

crane.sql

Source

sql.lisp (file)

Special Variable: +slot-mapping+
Package

crane.table

Source

table.lisp (file)

Special Variable: +standard-class-options+
Package

crane.table

Source

table.lisp (file)

Special Variable: +system-mapping+
Package

crane.connect

Source

connect.lisp (file)


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

6.2.2 Functions

Function: add-default-slots SLOT-NAME PLIST

If the slot doesn’t have :initarg or :accessor slots, add them.

Package

crane.table

Source

table.lisp (file)

Function: any-concrete-superclasses SUPERCLASSES
Package

crane.table

Source

table.lisp (file)

Function: autoincrement-sql DATABASE-TYPE
Package

crane.sql

Source

sql.lisp (file)

Function: constraint-name TABLE-NAME COLUMN-NAME TYPE

Give constraints Crane-specific names

Package

crane.sql

Source

sql.lisp (file)

Function: create-column-constraints TABLE-NAME COLUMN
Package

crane.sql

Source

sql.lisp (file)

Function: diff-slot SLOT-A SLOT-B

Compute the difference between two slot digests. See DIGEST.

Package

crane.meta

Source

meta.lisp (file)

Function: digest-slot SLOT
Package

crane.meta

Source

meta.lisp (file)

Function: enforce-foreign-keys CONNECTION DATABASE-TYPE
Package

crane.connect

Source

connect.lisp (file)

Function: foreign LOCAL FOREIGN-TABLE &key ON-DELETE ON-UPDATE
Package

crane.sql

Source

sql.lisp (file)

Function: get-migration-dir ()
Package

crane.migration

Source

migration.lisp (file)

Function: load-driver DRIVER

Load the ASDF system for the specified database module.

Package

crane.connect

Source

connect.lisp (file)

Function: make-set OBJ

Transform an object into a call to the set= function used by SxQL. Deflation happens here.

Package

crane.interface

Source

interface.lisp (file)

Function: map-ref-action ACTION
Package

crane.sql

Source

sql.lisp (file)

Function: migration-history-pathname TABLE-NAME

Return the pathname to the file containing the migration history for the table ‘table-name‘.

Package

crane.migration

Source

migration.lisp (file)

Function: process-slot SLOT

Take a plist like (:col-type ’string :col-null-p t) and remove the prefixes on the keys. Turn ’deftable slot properties’ (:type, :nullp, etc.) into ’table-class slot properties’ (:col-type, :col-null-p, etc.)

Package

crane.table

Source

table.lisp (file)

Function: read-migration-history TABLE-NAME
Package

crane.migration

Source

migration.lisp (file)

Function: separate-slots-and-options SLOTS-AND-OPTIONS

To minimize the number of parentheses, both slots and table options come in the same list. This function separates them: Normal slot names are plain old symbols, table options are keywords.

Package

crane.table

Source

table.lisp (file)

Function: serialize STREAM LIST

Serialize a list of digests.

Package

crane.migration

Source

migration.lisp (file)

Function: serialize-plist PLIST
Package

crane.migration

Source

migration.lisp (file)

Function: set-index TABLE-NAME COLUMN-NAME VALUE

Toggle INDEX pseudo-constraint.

Package

crane.sql

Source

sql.lisp (file)

Function: set-null COLUMN-NAME VALUE

Toggle NULL constraint.

Package

crane.sql

Source

sql.lisp (file)

Function: set-primary COLUMN-NAME VALUE

Toggle PRIMARY KEY constraint.

Package

crane.sql

Source

sql.lisp (file)

Function: set-proper-quote-character CONNECTION DATABASE-TYPE
Package

crane.connect

Source

connect.lisp (file)

Function: set-unique COLUMN-NAME VALUE

Toggle UNIQUE constraint.

Package

crane.sql

Source

sql.lisp (file)

Function: sort-slot-list LIST
Package

crane.meta

Source

meta.lisp (file)

Function: validate-all-databases ()

Immediately after configuration, iterate over the list of defined databases, validating configuration parameters, creating their corresponding <database> instances, and setting the value of *default-db*.

Package

crane.connect

Source

connect.lisp (file)

Function: validate-connection-spec DB DATABASE-TYPE SPEC
Package

crane.connect

Source

connect.lisp (file)


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

6.2.3 Generic functions

Generic Function: %table-database OBJECT
Package

crane.meta

Methods
Method: %table-database (<TABLE-CLASS> <table-class>)

The database this class belongs to.

Source

meta.lisp (file)

Generic Function: clean-tuple TABLE TUPLE
Package

crane.interface

Methods
Method: clean-tuple (TABLE <table-class>) TUPLE

Process a plist returned by CL-DBI into a format that can be accepted by make-instance. Inflation happens here.

Source

interface.lisp (file)

Generic Function: database-connection-spec OBJECT
Package

crane.connect

Methods
Method: database-connection-spec (<DATABASE> <database>)

The connection specification.

Source

connect.lisp (file)

Generic Function: key CONDITION
Package

crane.errors

Methods
Method: key (CONDITION configuration-error)
Source

errors.lisp (file)

Generic Function: make-connection DATABASE
Package

crane.connect

Methods
Method: make-connection (DATABASE <database>)
Source

connect.lisp (file)

Generic Function: slot-tuple OBJ
Package

crane.interface

Methods
Method: slot-tuple OBJ
Source

interface.lisp (file)

Generic Function: text CONDITION
Package

crane.errors

Methods
Method: text (CONDITION crane-error)
Source

errors.lisp (file)


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

6.2.4 Conditions

Condition: crane-error ()
Package

crane.errors

Source

errors.lisp (file)

Direct superclasses

condition (condition)

Direct subclasses
Direct methods

text (method)

Direct slots
Slot: text
Initargs

:text

Readers

text (generic function)


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

6.2.5 Classes

Class: table-class-direct-slot-definition ()
Package

crane.meta

Source

meta.lisp (file)

Direct superclasses
Direct slots
Slot: col-null-p
Initform

t

Slot: col-unique-p
Slot: col-primary-p
Slot: col-index-p
Slot: col-foreign
Slot: col-autoincrement-p
Slot: col-check
Initargs

nil

Class: table-class-effective-slot-definition ()
Package

crane.meta

Source

meta.lisp (file)

Direct superclasses
Class: table-class-slot-definition-mixin ()
Package

crane.meta

Source

meta.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: col-type
Initargs

:col-type

Readers

col-type (generic function)

Writers

(setf col-type) (generic function)

Slot: col-null-p
Initargs

:col-null-p

Readers

col-null-p (generic function)

Slot: col-unique-p
Initargs

:col-unique-p

Readers

col-unique-p (generic function)

Slot: col-primary-p
Initargs

:col-primary-p

Readers

col-primary-p (generic function)

Slot: col-index-p
Initargs

:col-index-p

Readers

col-index-p (generic function)

Slot: col-foreign
Initargs

:col-foreign

Readers

col-foreign (generic function)

Slot: col-autoincrement-p
Initargs

:col-autoincrement-p

Readers

col-autoincrement-p (generic function)

Slot: col-check
Initargs

:col-check

Readers

col-check (generic function)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
crane.asd: The crane<dot>asd file
crane/src: The crane/src module
crane/src/config.lisp: The crane/src/config<dot>lisp file
crane/src/connect.lisp: The crane/src/connect<dot>lisp file
crane/src/crane.lisp: The crane/src/crane<dot>lisp file
crane/src/errors.lisp: The crane/src/errors<dot>lisp file
crane/src/fixture.lisp: The crane/src/fixture<dot>lisp file
crane/src/inflate-deflate.lisp: The crane/src/inflate-deflate<dot>lisp file
crane/src/interface.lisp: The crane/src/interface<dot>lisp file
crane/src/meta.lisp: The crane/src/meta<dot>lisp file
crane/src/migration.lisp: The crane/src/migration<dot>lisp file
crane/src/query.lisp: The crane/src/query<dot>lisp file
crane/src/sql.lisp: The crane/src/sql<dot>lisp file
crane/src/table.lisp: The crane/src/table<dot>lisp file
crane/src/transaction.lisp: The crane/src/transaction<dot>lisp file
crane/src/types.lisp: The crane/src/types<dot>lisp file
crane/src/util.lisp: The crane/src/util<dot>lisp file

F
File, Lisp, crane.asd: The crane<dot>asd file
File, Lisp, crane/src/config.lisp: The crane/src/config<dot>lisp file
File, Lisp, crane/src/connect.lisp: The crane/src/connect<dot>lisp file
File, Lisp, crane/src/crane.lisp: The crane/src/crane<dot>lisp file
File, Lisp, crane/src/errors.lisp: The crane/src/errors<dot>lisp file
File, Lisp, crane/src/fixture.lisp: The crane/src/fixture<dot>lisp file
File, Lisp, crane/src/inflate-deflate.lisp: The crane/src/inflate-deflate<dot>lisp file
File, Lisp, crane/src/interface.lisp: The crane/src/interface<dot>lisp file
File, Lisp, crane/src/meta.lisp: The crane/src/meta<dot>lisp file
File, Lisp, crane/src/migration.lisp: The crane/src/migration<dot>lisp file
File, Lisp, crane/src/query.lisp: The crane/src/query<dot>lisp file
File, Lisp, crane/src/sql.lisp: The crane/src/sql<dot>lisp file
File, Lisp, crane/src/table.lisp: The crane/src/table<dot>lisp file
File, Lisp, crane/src/transaction.lisp: The crane/src/transaction<dot>lisp file
File, Lisp, crane/src/types.lisp: The crane/src/types<dot>lisp file
File, Lisp, crane/src/util.lisp: The crane/src/util<dot>lisp file

L
Lisp File, crane.asd: The crane<dot>asd file
Lisp File, crane/src/config.lisp: The crane/src/config<dot>lisp file
Lisp File, crane/src/connect.lisp: The crane/src/connect<dot>lisp file
Lisp File, crane/src/crane.lisp: The crane/src/crane<dot>lisp file
Lisp File, crane/src/errors.lisp: The crane/src/errors<dot>lisp file
Lisp File, crane/src/fixture.lisp: The crane/src/fixture<dot>lisp file
Lisp File, crane/src/inflate-deflate.lisp: The crane/src/inflate-deflate<dot>lisp file
Lisp File, crane/src/interface.lisp: The crane/src/interface<dot>lisp file
Lisp File, crane/src/meta.lisp: The crane/src/meta<dot>lisp file
Lisp File, crane/src/migration.lisp: The crane/src/migration<dot>lisp file
Lisp File, crane/src/query.lisp: The crane/src/query<dot>lisp file
Lisp File, crane/src/sql.lisp: The crane/src/sql<dot>lisp file
Lisp File, crane/src/table.lisp: The crane/src/table<dot>lisp file
Lisp File, crane/src/transaction.lisp: The crane/src/transaction<dot>lisp file
Lisp File, crane/src/types.lisp: The crane/src/types<dot>lisp file
Lisp File, crane/src/util.lisp: The crane/src/util<dot>lisp file

M
Module, crane/src: The crane/src module

Jump to:   C   F   L   M  

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

A.2 Functions

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

%
%table-database: Internal generic functions
%table-database: Internal generic functions

(
(setf col-type): Exported generic functions
(setf col-type): Exported generic functions
(setf database-connection): Exported generic functions
(setf database-connection): Exported generic functions

A
abstractp: Exported generic functions
abstractp: Exported generic functions
add-constraint: Exported functions
add-default-slots: Internal functions
alter-constraint: Exported functions
any-concrete-superclasses: Internal functions
autoincrement-sql: Internal functions

B
begin-transaction: Exported functions
build: Exported functions

C
clean-tuple: Internal generic functions
clean-tuple: Internal generic functions
col-autoincrement-p: Exported generic functions
col-autoincrement-p: Exported generic functions
col-check: Exported generic functions
col-check: Exported generic functions
col-foreign: Exported generic functions
col-foreign: Exported generic functions
col-index-p: Exported generic functions
col-index-p: Exported generic functions
col-null-p: Exported generic functions
col-null-p: Exported generic functions
col-primary-p: Exported generic functions
col-primary-p: Exported generic functions
col-type: Exported generic functions
col-type: Exported generic functions
col-unique-p: Exported generic functions
col-unique-p: Exported generic functions
commit: Exported functions
connect: Exported functions
constraint-name: Internal functions
create: Exported macros
create%: Exported macros
create-and-sort-constraints: Exported functions
create-column-constraints: Internal functions
create-from-plist: Exported macros
create-table: Exported functions

D
database-connection: Exported generic functions
database-connection: Exported generic functions
database-connection-spec: Internal generic functions
database-connection-spec: Internal generic functions
database-name: Exported generic functions
database-name: Exported generic functions
database-type: Exported generic functions
database-type: Exported generic functions
debugp: Exported functions
defdeflate: Exported macros
deferredp: Exported generic functions
deferredp: Exported generic functions
define-column: Exported functions
definflate: Exported macros
deflate: Exported generic functions
deflate: Exported generic functions
deflate: Exported generic functions
deflate: Exported generic functions
deflate: Exported generic functions
deftable: Exported macros
del: Exported generic functions
del: Exported generic functions
delete-migrations: Exported functions
deref: Exported macros
diff-digest: Exported functions
diff-plist: Exported functions
diff-slot: Internal functions
digest: Exported generic functions
digest: Exported generic functions
digest-slot: Internal functions
disconnect: Exported functions
do-filter: Exported macros
do-query: Exported macros
drop-column: Exported functions
drop-constraint: Exported functions
drop-table: Exported generic functions
drop-table: Exported generic functions
drop-table: Exported generic functions

E
enforce-foreign-keys: Internal functions
exists: Exported macros

F
filter: Exported macros
find-class-slot: Exported functions
find-slot: Exported functions
foreign: Internal functions
Function, add-constraint: Exported functions
Function, add-default-slots: Internal functions
Function, alter-constraint: Exported functions
Function, any-concrete-superclasses: Internal functions
Function, autoincrement-sql: Internal functions
Function, begin-transaction: Exported functions
Function, build: Exported functions
Function, commit: Exported functions
Function, connect: Exported functions
Function, constraint-name: Internal functions
Function, create-and-sort-constraints: Exported functions
Function, create-column-constraints: Internal functions
Function, create-table: Exported functions
Function, debugp: Exported functions
Function, define-column: Exported functions
Function, delete-migrations: Exported functions
Function, diff-digest: Exported functions
Function, diff-plist: Exported functions
Function, diff-slot: Internal functions
Function, digest-slot: Internal functions
Function, disconnect: Exported functions
Function, drop-column: Exported functions
Function, drop-constraint: Exported functions
Function, enforce-foreign-keys: Internal functions
Function, find-class-slot: Exported functions
Function, find-slot: Exported functions
Function, foreign: Internal functions
Function, get-class-slot: Exported functions
Function, get-config-value: Exported functions
Function, get-configuration: Exported functions
Function, get-connection: Exported functions
Function, get-db: Exported functions
Function, get-last-migration: Exported functions
Function, get-migration-dir: Internal functions
Function, get-slot: Exported functions
Function, insert-migration: Exported functions
Function, load-driver: Internal functions
Function, make-constraint: Exported functions
Function, make-keyword: Exported functions
Function, make-set: Internal functions
Function, map-ref-action: Internal functions
Function, migrate: Exported functions
Function, migration-history-p: Exported functions
Function, migration-history-pathname: Internal functions
Function, plist-keys: Exported functions
Function, process-slot: Internal functions
Function, read-migration-history: Internal functions
Function, rename-migration-history: Exported functions
Function, rollback: Exported functions
Function, separate-slots-and-options: Internal functions
Function, serialize: Internal functions
Function, serialize-plist: Internal functions
Function, set-index: Internal functions
Function, set-null: Internal functions
Function, set-primary: Internal functions
Function, set-proper-quote-character: Internal functions
Function, set-unique: Internal functions
Function, setup: Exported functions
Function, sort-slot-list: Internal functions
Function, sqlize: Exported functions
Function, validate-all-databases: Internal functions
Function, validate-connection-spec: Internal functions

G
Generic Function, %table-database: Internal generic functions
Generic Function, (setf col-type): Exported generic functions
Generic Function, (setf database-connection): Exported generic functions
Generic Function, abstractp: Exported generic functions
Generic Function, clean-tuple: Internal generic functions
Generic Function, col-autoincrement-p: Exported generic functions
Generic Function, col-check: Exported generic functions
Generic Function, col-foreign: Exported generic functions
Generic Function, col-index-p: Exported generic functions
Generic Function, col-null-p: Exported generic functions
Generic Function, col-primary-p: Exported generic functions
Generic Function, col-type: Exported generic functions
Generic Function, col-unique-p: Exported generic functions
Generic Function, database-connection: Exported generic functions
Generic Function, database-connection-spec: Internal generic functions
Generic Function, database-name: Exported generic functions
Generic Function, database-type: Exported generic functions
Generic Function, deferredp: Exported generic functions
Generic Function, deflate: Exported generic functions
Generic Function, del: Exported generic functions
Generic Function, digest: Exported generic functions
Generic Function, drop-table: Exported generic functions
Generic Function, inflate: Exported generic functions
Generic Function, key: Internal generic functions
Generic Function, make-connection: Internal generic functions
Generic Function, plist->object: Exported generic functions
Generic Function, save: Exported generic functions
Generic Function, slot-tuple: Internal generic functions
Generic Function, table-database: Exported generic functions
Generic Function, table-name: Exported generic functions
Generic Function, text: Internal generic functions
get-class-slot: Exported functions
get-config-value: Exported functions
get-configuration: Exported functions
get-connection: Exported functions
get-db: Exported functions
get-last-migration: Exported functions
get-migration-dir: Internal functions
get-slot: Exported functions

I
inflate: Exported generic functions
inflate: Exported generic functions
inflate: Exported generic functions
inflate: Exported generic functions
inflate: Exported generic functions
inflate: Exported generic functions
inflate: Exported generic functions
inflate: Exported generic functions
inflate: Exported generic functions
inflate: Exported generic functions
insert-migration: Exported functions

K
key: Internal generic functions
key: Internal generic functions

L
load-driver: Internal functions

M
Macro, create: Exported macros
Macro, create%: Exported macros
Macro, create-from-plist: Exported macros
Macro, defdeflate: Exported macros
Macro, definflate: Exported macros
Macro, deftable: Exported macros
Macro, deref: Exported macros
Macro, do-filter: Exported macros
Macro, do-query: Exported macros
Macro, exists: Exported macros
Macro, filter: Exported macros
Macro, meta-query: Exported macros
Macro, query: Exported macros
Macro, single: Exported macros
Macro, single!: Exported macros
Macro, single-or-create: Exported macros
Macro, with-transaction: Exported macros
make-connection: Internal generic functions
make-connection: Internal generic functions
make-constraint: Exported functions
make-keyword: Exported functions
make-set: Internal functions
map-ref-action: Internal functions
meta-query: Exported macros
Method, %table-database: Internal generic functions
Method, (setf col-type): Exported generic functions
Method, (setf database-connection): Exported generic functions
Method, abstractp: Exported generic functions
Method, clean-tuple: Internal generic functions
Method, col-autoincrement-p: Exported generic functions
Method, col-check: Exported generic functions
Method, col-foreign: Exported generic functions
Method, col-index-p: Exported generic functions
Method, col-null-p: Exported generic functions
Method, col-primary-p: Exported generic functions
Method, col-type: Exported generic functions
Method, col-unique-p: Exported generic functions
Method, database-connection: Exported generic functions
Method, database-connection-spec: Internal generic functions
Method, database-name: Exported generic functions
Method, database-type: Exported generic functions
Method, deferredp: Exported generic functions
Method, deflate: Exported generic functions
Method, deflate: Exported generic functions
Method, deflate: Exported generic functions
Method, deflate: Exported generic functions
Method, del: Exported generic functions
Method, digest: Exported generic functions
Method, drop-table: Exported generic functions
Method, drop-table: Exported generic functions
Method, inflate: Exported generic functions
Method, inflate: Exported generic functions
Method, inflate: Exported generic functions
Method, inflate: Exported generic functions
Method, inflate: Exported generic functions
Method, inflate: Exported generic functions
Method, inflate: Exported generic functions
Method, inflate: Exported generic functions
Method, inflate: Exported generic functions
Method, key: Internal generic functions
Method, make-connection: Internal generic functions
Method, plist->object: Exported generic functions
Method, plist->object: Exported generic functions
Method, save: Exported generic functions
Method, slot-tuple: Internal generic functions
Method, table-database: Exported generic functions
Method, table-name: Exported generic functions
Method, text: Internal generic functions
migrate: Exported functions
migration-history-p: Exported functions
migration-history-pathname: Internal functions

P
plist->object: Exported generic functions
plist->object: Exported generic functions
plist->object: Exported generic functions
plist-keys: Exported functions
process-slot: Internal functions

Q
query: Exported macros

R
read-migration-history: Internal functions
rename-migration-history: Exported functions
rollback: Exported functions

S
save: Exported generic functions
save: Exported generic functions
separate-slots-and-options: Internal functions
serialize: Internal functions
serialize-plist: Internal functions
set-index: Internal functions
set-null: Internal functions
set-primary: Internal functions
set-proper-quote-character: Internal functions
set-unique: Internal functions
setup: Exported functions
single: Exported macros
single!: Exported macros
single-or-create: Exported macros
slot-tuple: Internal generic functions
slot-tuple: Internal generic functions
sort-slot-list: Internal functions
sqlize: Exported functions

T
table-database: Exported generic functions
table-database: Exported generic functions
table-name: Exported generic functions
table-name: Exported generic functions
text: Internal generic functions
text: Internal generic functions

V
validate-all-databases: Internal functions
validate-connection-spec: Internal functions

W
with-transaction: Exported macros

Jump to:   %   (  
A   B   C   D   E   F   G   I   K   L   M   P   Q   R   S   T   V   W  

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

A.3 Variables

Jump to:   *   +  
A   C   D   K   N   S   T  
Index Entry  Section

*
*after-config-hook*: Exported special variables
*config*: Internal special variables
*db*: Internal special variables
*default-db*: Exported special variables

+
+create-table-format-string+: Internal special variables
+db-params+: Internal special variables
+referential-actions+: Internal special variables
+slot-mapping+: Internal special variables
+standard-class-options+: Internal special variables
+system-mapping+: Internal special variables

A
abstractp: Exported classes

C
col-autoincrement-p: Internal classes
col-autoincrement-p: Internal classes
col-check: Internal classes
col-check: Internal classes
col-foreign: Internal classes
col-foreign: Internal classes
col-index-p: Internal classes
col-index-p: Internal classes
col-null-p: Internal classes
col-null-p: Internal classes
col-primary-p: Internal classes
col-primary-p: Internal classes
col-type: Internal classes
col-unique-p: Internal classes
col-unique-p: Internal classes
conn: Exported classes
conn-spec: Exported classes

D
database: Exported classes
deferredp: Exported classes

K
key: Exported conditions

N
name: Exported classes

S
Slot, abstractp: Exported classes
Slot, col-autoincrement-p: Internal classes
Slot, col-autoincrement-p: Internal classes
Slot, col-check: Internal classes
Slot, col-check: Internal classes
Slot, col-foreign: Internal classes
Slot, col-foreign: Internal classes
Slot, col-index-p: Internal classes
Slot, col-index-p: Internal classes
Slot, col-null-p: Internal classes
Slot, col-null-p: Internal classes
Slot, col-primary-p: Internal classes
Slot, col-primary-p: Internal classes
Slot, col-type: Internal classes
Slot, col-unique-p: Internal classes
Slot, col-unique-p: Internal classes
Slot, conn: Exported classes
Slot, conn-spec: Exported classes
Slot, database: Exported classes
Slot, deferredp: Exported classes
Slot, key: Exported conditions
Slot, name: Exported classes
Slot, text: Internal conditions
Slot, type: Exported classes
Special Variable, *after-config-hook*: Exported special variables
Special Variable, *config*: Internal special variables
Special Variable, *db*: Internal special variables
Special Variable, *default-db*: Exported special variables
Special Variable, +create-table-format-string+: Internal special variables
Special Variable, +db-params+: Internal special variables
Special Variable, +referential-actions+: Internal special variables
Special Variable, +slot-mapping+: Internal special variables
Special Variable, +standard-class-options+: Internal special variables
Special Variable, +system-mapping+: Internal special variables

T
text: Internal conditions
type: Exported classes

Jump to:   *   +  
A   C   D   K   N   S   T  

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

A.4 Data types

Jump to:   <  
B   C   D   E   I   N   P   Q   S   T   V  
Index Entry  Section

<
<database>: Exported classes
<table-class>: Exported classes
<table>: Exported classes

B
bigint: Exported types

C
Class, <database>: Exported classes
Class, <table-class>: Exported classes
Class, <table>: Exported classes
Class, table-class-direct-slot-definition: Internal classes
Class, table-class-effective-slot-definition: Internal classes
Class, table-class-slot-definition-mixin: Internal classes
Condition, configuration-error: Exported conditions
Condition, crane-error: Internal conditions
Condition, empty-table: Exported conditions
Condition, no-configuration-error: Exported conditions
Condition, query-error: Exported conditions
configuration-error: Exported conditions
crane: The crane system
crane: The crane package
crane-error: Internal conditions
crane.config: The crane<dot>config package
crane.connect: The crane<dot>connect package
crane.errors: The crane<dot>errors package
crane.fixture: The crane<dot>fixture package
crane.inflate-deflate: The crane<dot>inflate-deflate package
crane.interface: The crane<dot>interface package
crane.meta: The crane<dot>meta package
crane.migration: The crane<dot>migration package
crane.query: The crane<dot>query package
crane.sql: The crane<dot>sql package
crane.table: The crane<dot>table package
crane.transaction: The crane<dot>transaction package
crane.types: The crane<dot>types package
crane.util: The crane<dot>util package

D
datetime: Exported types
double: Exported types

E
empty-table: Exported conditions

I
int: Exported types

N
no-configuration-error: Exported conditions
numeric: Exported types

P
Package, crane: The crane package
Package, crane.config: The crane<dot>config package
Package, crane.connect: The crane<dot>connect package
Package, crane.errors: The crane<dot>errors package
Package, crane.fixture: The crane<dot>fixture package
Package, crane.inflate-deflate: The crane<dot>inflate-deflate package
Package, crane.interface: The crane<dot>interface package
Package, crane.meta: The crane<dot>meta package
Package, crane.migration: The crane<dot>migration package
Package, crane.query: The crane<dot>query package
Package, crane.sql: The crane<dot>sql package
Package, crane.table: The crane<dot>table package
Package, crane.transaction: The crane<dot>transaction package
Package, crane.types: The crane<dot>types package
Package, crane.util: The crane<dot>util package

Q
query-error: Exported conditions

S
smallint: Exported types
System, crane: The crane system

T
table-class-direct-slot-definition: Internal classes
table-class-effective-slot-definition: Internal classes
table-class-slot-definition-mixin: Internal classes
text: Exported types
timestamp: Exported types
Type, bigint: Exported types
Type, datetime: Exported types
Type, double: Exported types
Type, int: Exported types
Type, numeric: Exported types
Type, smallint: Exported types
Type, text: Exported types
Type, timestamp: Exported types
Type, varchar: Exported types

V
varchar: Exported types

Jump to:   <  
B   C   D   E   I   N   P   Q   S   T   V