This is the integral Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Tue Jul 15 05:24:04 2025 GMT+0.
integral/integral.asdintegral/src/integral.lispintegral/src/table.lispintegral/src/column.lispintegral/src/connection.lispintegral/src/connection-drivers/mysql.lispintegral/src/connection-drivers/postgres.lispintegral/src/connection-drivers/sqlite3.lispintegral/src/database.lispintegral/src/migration.lispintegral/src/fixture.lispintegral/src/type.lispintegral/src/error.lispintegral/src/variable.lispintegral/src/util.lispintegral.errorintegral.tableintegral.connection.mysqlintegral.databaseintegral.connection.sqlite3integralintegral.columnintegral.typeintegral.variableintegral.migrationintegral.utilintegral.connectionintegral.connection.postgresintegral-asdintegral.fixtureThe main system appears first, followed by any subsystem dependency.
integralObject Relational Mapper for Common Lisp
Eitaro Fukamachi
BSD 3-Clause
# IMPORTANT NOTICE
**Integral is not recommended for a new project.** Consider using [Mito](https://github.com/fukamachi/mito) instead.
# Integral
[](https://travis-ci.org/fukamachi/integral)
Integral is an object relational mapper for Common Lisp based on [CL-DBI](https://github.com/fukamachi/cl-dbi) and [SxQL](https://github.com/fukamachi/sxql).
## Warning
This software is still ALPHA quality. The APIs will be likely to change.
Should work well with MySQL/SQLite3 on SBCL/Clozure CL.
## Usage
“‘common-lisp
(defclass tweet ()
((id :type integer
:primary-key t
:auto-increment t
:reader tweet-id)
(status :type text
:initarg :status
:accessor tweet-status)
(user :type (varchar 32)
:initarg :user
:accessor tweet-user))
(:metaclass <dao-table-class>))
(connect-toplevel :mysql
:database-name "myapp"
:username "nitro_idiot"
:password "xxxxxxxx")
(let ((tw (make-instance ’tweet
:status "Good morning, world."
:user "nitro_idiot")))
(save-dao tw))
;; Same as the above
(create-dao ’tweet
:status "Good morning, world."
:user "nitro_idiot")
(let ((tw (find-dao ’tweet 3)))
(with-slot (status user) tw
(format t "~A said ~A" user status))
(setf (tweet-status tw) "Good evening, world.")
(save-dao tw))
(let ((tw (find-dao ’tweet 3)))
(delete-dao tw))
“‘
## Quickstart
### Installation
“‘common-lisp
(ql:quickload :integral)
“‘
### Connecting to database
‘connect-toplevel‘ is a function to establish a connection to a database.
“‘common-lisp
(import ’integral:connect-toplevel)
(connect-toplevel :mysql
:database-name "testdb"
:username "nitro_idiot"
:password "password")
“‘
Integral is intended to work with MySQL, PostgreSQL and SQLite3. Replace ‘:mysql‘ the above by your favorite RDBMS engine name.
### Defining a database table
In Integral, database tables are defined as CLOS classes. A table definition looks like this.
“‘common-lisp
(import ’integral:<dao-table-class>)
(defclass user ()
((name :col-type text
:initarg :name))
(:metaclass <dao-table-class>))
“‘
This ‘user‘ class means a "user" table in a database with a single "TEXT" column, "name".
‘table-definition‘ is a function to generate a ‘CREATE TABLE‘ SQL for it.
“‘common-lisp
(import ’(integral:table-definition integral:execute-sql))
(table-definition ’user)
;=> "CREATE TABLE ‘user‘ (‘%oid‘ SERIAL NOT NULL AUTO_INCREMENT PRIMARY KEY, ‘name‘ TEXT)"
; NIL
(execute-sql (table-definition ’user))
;; Same as the above except ignoring CREATE TABLE if it already exists.
(ensure-table-exists ’user)
“‘
### Adding records
Table classes can be called with ‘make-instance‘ like Common Lisp standard-class.
“‘common-lisp
(make-instance ’user :name "Eitaro Fukamachi")
;=> #<USER %oid: <unbound>>
“‘
The instance won’t be recorded in a database. Call ‘save-dao‘ it to add the record to a database.
“‘common-lisp
(import ’integral:save-dao)
(save-dao (make-instance ’user :name "Eitaro Fukamachi"))
;=> #<USER %oid: 1>
(save-dao (make-instance ’user :name "Tomohiro Matsuyama"))
;=> #<USER %oid: 2>
“‘
### Retrieving records
“‘common-lisp
(import ’integral:select-dao)
(select-dao ’user)
;=> (#<USER %oid: 1> #<USER %oid: 2>)
(mapcar (lambda (row)
(slot-value row ’name))
(select-dao ’user))
;=> ("Eitaro Fukamachi" "Tomohiro Matsuyama")
“‘
‘select-dao‘ takes SxQL clauses. You can specify WHERE, ORDER BY or LIMIT with it.
“‘common-lisp
(import ’(sxql:where sxql:limit))
(select-dao ’user
(where (:= :name "Eitaro Fukamachi"))
(limit 1))
;=> (#<USER %oid: 1>)
“‘
You can also use ‘find-dao‘ for retrieving a single row.
“‘common-lisp
(import ’integral:find-dao)
(find-dao ’user 1)
;=> #<USER %oid: 1>
“‘
### Updating records
“‘common-lisp
(let ((user (find-dao ’user 1)))
(setf (slot-value user ’name) "深町英太郎")
(save-dao user))
“‘
### Deleting records
“‘common-lisp
(import ’integral:delete-dao)
(let ((user (find-dao ’user 1)))
(setf (slot-value user ’name) "深町英太郎")
(delete-dao user))
“‘
### Migration
I introduced Integral generates a table schema from a CLOS class definition. But how can we do when we want to change the table schema after creating it.
Integral has a function to apply the change of the class definition to a table schema. It is generally known as "Migration".
For example, if you want to record a "profile" of users to "user" table, add a slot for it.
“‘common-lisp
(defclass user ()
((name :col-type text
:initarg :name)
(profile :col-type text
:initarg :profile))
(:metaclass <dao-table-class>))
“‘
Then call ‘migrate-table‘.
“‘common-lisp
(import ’integral:migrate-table)
(migrate-table ’user)
;-> ALTER TABLE ‘user‘ ADD COLUMN ‘profile‘ TEXT AFTER ‘name‘;
;=> NIL
“‘
All changes of indexes and column types are also followed.
“‘common-lisp
(defclass user ()
((id :col-type serial
:primary-key t)
(name :col-type (varchar 64)
:initarg :name)
(profile :col-type text
:initarg :profile))
(:metaclass <dao-table-class>))
;-> ALTER TABLE ‘user‘ DROP COLUMN ‘%oid‘;
; ALTER TABLE ‘user‘ MODIFY COLUMN ‘name‘ VARCHAR(64);
; ALTER TABLE ‘user‘ ADD COLUMN ‘id‘ SERIAL NOT NULL PRIMARY KEY FIRST;
;=> NIL
“‘
### Mystique: Auto-migration
In development, class redefinitions are done many times. It’s boring to execute ‘migrate-table‘ for each single time, isn’t it?
Integral has **auto-migration** feature for executing ‘migrate-table‘ after redefinitions automatically.
Set ‘*auto-migration-mode*‘ T to use the mode.
“‘common-lisp
(setf integral:*auto-migration-mode* t)
“‘
### Another Way: define a class from an existing table
If you’d like to administrate a database directly by writing raw SQLs, or wanna use Integral for an existing database, you can generate slot definitions from it.
“‘common-lisp
(defclass tweet () ()
(:metaclass <dao-table-class>)
(:generate-slots t))
“‘
‘:generate-slots‘ option means slot definitions follow database schema. Note you must establish a database connection before the first ‘make-instance‘.
### inflate/deflate
‘inflate‘ and ‘deflate‘ is a feature to convert data between a database and Common Lisp.
“‘common-lisp
(defclass user ()
((name :type string
:initarg :name)
(created-at :type timestamp
:col-type integer
:initarg :created-at))
(:metaclass integral:<dao-table-class>))
;=> #<INTEGRAL.TABLE:<DAO-TABLE-CLASS> USER>
(find-dao ’user 1)
;=> #<USER #x302001D9452D>
(slot-value * ’created-at)
;=> 3599088727
;; Define inflate/deflate methods
(defmethod integral:inflate ((object user) (slot-name (eql ’created-at)) value)
(local-time:universal-to-timestamp value))
(defmethod integral:deflate ((object user) (slot-name (eql ’created-at)) value)
(local-time:timestamp-to-universal value))
(slot-value (find-dao ’user 1) ’created-at)
;=> @2014-01-19T11:52:07.000000+09:00
“‘
You can also set ‘inflate‘ and ‘deflate‘ functions via ‘:inflate‘ or ‘:deflate‘ keywords in ‘defclass‘.
“‘common-lisp
(defclass user ()
((name :type string
:initarg :name)
(created-at :type timestamp
:col-type integer
:initarg :created-at
:inflate #’local-time:universal-to-timestamp
:deflate #’local-time:timestamp-to-universal))
(:metaclass integral:<dao-table-class>))
“‘
### Relations
Although Integral doesn’t have a specific feature for relations like ‘:has-a‘ and ‘:has-many‘, it can be done with normal methods.
“‘common-lisp
(defmethod user-config ((user user))
(find-dao ’user-config (user-id user)))
(defmethod user-entries ((user user))
(select-dao ’entry (where (:= :user_id (user-id user)))))
“‘
### Wanna write a raw SQL?
“‘common-lisp
(import ’integral:retrieve-by-sql)
(retrieve-by-sql "SELECT * FROM user")
;=> ((:%oid 1 :name "深町英太郎"
; :profile "I love Common Lisp and beer")
; (:%oid 2 :name "Tomohiro Matsuyama"
; :profile NIL))
“‘
‘retrieve-by-sql‘ takes ‘:as‘ keyword argument to specify a class of the result record.
“‘common-lisp
(retrieve-sql "SELECT * FROM user" :as ’user)
;=> (#<USER %oid: 1> #<USER %oid: 2>)
“‘
## Symbols
### Connections
* connect-toplevel (driver-name &rest args &key database-name &allow-other-keys)
* disconnect-toplevel ()
### Classes
* <dao-class>
* <dao-table-class>
* table-name (class)
* table-definition (class &key (yield t) if-not-exists)
* inflate (object slot-name value)
* deflate (object slot-name value)
* migrate-table (class)
* ensure-table-exists (class)
* recreate-table (class)
* \*auto-migration-mode\*
### SQL
* select-dao ((class <dao-table-class>) &rest expressions)
* insert-dao ((obj <dao-class>))
* create-dao ((class <dao-table-class>) &rest initargs)
* update-dao ((obj <dao-class>))
* delete-dao ((obj <dao-class>))
* execute-sql ((sql string) &optional binds)
* retrieve-by-sql ((sql string) &key binds as)
* save-dao ((obj <dao-class>))
* where
* order-by
* group-by
* limit
### Data types
* serial
* tinyint
* smallint
* mediumint
* bigint
* text
* varchar
* enum
* datetime
* date
* timestamp
### Errors
* <integral-error>
* <connection-not-established-error>
* <unknown-primary-key-error>
* <type-missing-error>
* <migration-error>
## See Also
* [CL-DBI](http://8arrow.org/cl-dbi/) - Database independent interface library.
* [SxQL](http://8arrow.org/sxql/) - SQL builder library.
## Author
* Eitaro Fukamachi (e.arrows@gmail.com)
## Copyright
Copyright (c) 2014 Eitaro Fukamachi (e.arrows@gmail.com)
# License
Licensed under the BSD 3-Clause License.
0.0.1
cl-syntax-annot (system).
sxql (system).
dbi (system).
cl-ppcre (system).
closer-mop (system).
clos-fixtures (system).
split-sequence (system).
group-by (system).
iterate (system).
alexandria (system).
trivial-types (system).
src (module).
Modules are listed depth-first from the system components tree.
integral/srcintegral (system).
integral.lisp (file).
table.lisp (file).
column.lisp (file).
connection.lisp (file).
connection-drivers (module).
database.lisp (file).
migration.lisp (file).
fixture.lisp (file).
type.lisp (file).
error.lisp (file).
variable.lisp (file).
util.lisp (file).
integral/src/connection-driverssrc (module).
mysql.lisp (file).
postgres.lisp (file).
sqlite3.lisp (file).
Files are sorted by type and then listed depth-first from the systems components trees.
integral/integral.asdintegral/src/integral.lispintegral/src/table.lispintegral/src/column.lispintegral/src/connection.lispintegral/src/connection-drivers/mysql.lispintegral/src/connection-drivers/postgres.lispintegral/src/connection-drivers/sqlite3.lispintegral/src/database.lispintegral/src/migration.lispintegral/src/fixture.lispintegral/src/type.lispintegral/src/error.lispintegral/src/variable.lispintegral/src/util.lispintegral/src/integral.lispconnection.lisp (file).
table.lisp (file).
database.lisp (file).
migration.lisp (file).
type.lisp (file).
error.lisp (file).
variable.lisp (file).
src (module).
create-dao (method).
create-dao (method).
delete-dao (method).
find-dao (method).
find-dao (method).
insert-dao (method).
retrieve-by-sql (method).
retrieve-by-sql (method).
save-dao (method).
select-dao (method).
select-dao (method).
update-dao (method).
make-delete-sql (method).
make-find-sql (method).
make-insert-sql (method).
make-set-clause (function).
make-update-sql (method).
integral/src/table.lispconnection.lisp (file).
column.lisp (file).
database.lisp (file).
variable.lisp (file).
util.lisp (file).
src (module).
<dao-class> (class).
<dao-table-class> (class).
database-column-slot-names (generic function).
database-column-slots (generic function).
deflate (generic function).
direct-slot-definition-class (method).
ensure-class-using-class (method).
ensure-table-exists (generic function).
generate-defclass (generic function).
inflate (generic function).
initialize-dao-table-class (generic function).
initialize-instance (method).
initialize-instance (method).
make-dao-instance (generic function).
make-instance (method).
print-object (method).
recreate-table (generic function).
reinitialize-instance (method).
table-class-indices (function).
table-definition (generic function).
table-name (generic function).
table-primary-key (generic function).
table-serial-key (generic function).
type-deflate (generic function).
type-inflate (generic function).
valid-p (generic function).
validate-superclass (method).
*oid-slot-definition* (special variable).
*synced-slot-definition* (special variable).
contains-class-or-subclasses (function).
find-type-deflate (function).
find-type-inflate (function).
initargs-contains-primary-key (function).
initializedp (reader method).
(setf initializedp) (writer method).
integral/src/column.lispconnection.lisp (file).
type.lisp (file).
src (module).
auto-increment-p (reader method).
(setf auto-increment-p) (writer method).
column-info-for-create-table (generic function).
ghost-slot-p (reader method).
(setf ghost-slot-p) (writer method).
initialize-instance (method).
initialize-instance (method).
primary-key-p (reader method).
(setf primary-key-p) (writer method).
slot-definition-to-plist (generic function).
table-column-definition (class).
table-column-deflate (generic function).
table-column-inflate (generic function).
table-column-satisfies (generic function).
*table-column-definition-slots* (special variable).
table-column-name (generic function).
table-column-type (generic function).
integral/src/connection.lispconnection-drivers (module).
error.lisp (file).
src (module).
*db* (special variable).
connect-toplevel (function).
connected-p (function).
connection-quote-character (function).
database-type (function).
disconnect-toplevel (function).
get-connection (function).
last-insert-id (function).
make-connection (function).
retrieve-table-column-definitions-by-name (function).
retrieve-table-indices (function).
with-quote-char (macro).
%make-connection (function).
connection (structure).
connection-connect-args (reader).
(setf connection-connect-args) (writer).
connection-driver-name (reader).
(setf connection-driver-name) (writer).
connection-handle (reader).
(setf connection-handle) (writer).
connection-p (function).
copy-connection (function).
make-connection-handle (function).
integral/src/connection-drivers/mysql.lispconnection-drivers (module).
column-definitions (function).
last-insert-id (function).
table-indices (function).
integral/src/connection-drivers/postgres.lispconnection-drivers (module).
column-definitions (function).
last-insert-id (function).
table-indices (function).
get-serial-keys (function).
integral/src/connection-drivers/sqlite3.lispconnection-drivers (module).
column-definitions (function).
last-insert-id (function).
table-indices (function).
table-info (function).
table-primary-keys (function).
integral/src/database.lispconnection.lisp (file).
src (module).
*sql-log-stream* (special variable).
execute-sql (method).
execute-sql (method).
retrieve-by-raw-sql (method).
retrieve-by-raw-sql (method).
integral/src/migration.lispconnection.lisp (file).
table.lisp (file).
column.lisp (file).
util.lisp (file).
src (module).
make-migration-sql (generic function).
migrate-table (generic function).
%generate-migration-sql-for-sqlite3 (function).
%generate-migration-sql-for-table-columns-others (function).
arranged-migration-sql (function).
compute-migrate-table-columns (function).
generate-migration-sql-for-table-indices (function).
integral/src/fixture.lispintegral.lisp (file).
table.lisp (file).
src (module).
register-fixture (method).
integral/src/type.lisputil.lisp (file).
src (module).
bigint (type).
bigserial (type).
cltype-to-dbtype (generic function).
date (type).
datetime (type).
define-column-type (macro).
enum (type).
is-type-equal (function).
mediumint (type).
serial (type).
smallint (type).
string-to-dbtype (function).
text (type).
timestamp (type).
tinyint (type).
type-alias (function).
(setf type-alias) (function).
varchar (type).
*type-alias-map* (special variable).
parse-type-vars (function).
integral/src/error.lispsrc (module).
<connection-not-established-error> (condition).
<integral-error> (condition).
<migration-error> (condition).
<type-missing-error> (condition).
<unknown-primary-key-error> (condition).
integral/src/variable.lispsrc (module).
*auto-migration-mode* (special variable).
integral/src/util.lispsrc (module).
class-inherit-p (function).
class-slot-names (function).
escaped-symbol-p (function).
finalize-class-if-necessary (function).
get-slot-by-slot-name (function).
group-by-plist-key (function).
lispify (function).
list-diff (function).
symbol-name-literally (function).
unlispify (function).
%list-diff (function).
Packages are listed by definition order.
integral.errorintegral.tableintegral.connection.mysqlintegral.databaseintegral.connection.sqlite3integralintegral.columnintegral.typeintegral.variableintegral.migrationintegral.utilintegral.connectionintegral.connection.postgresintegral-asdintegral.fixtureintegral.errorcommon-lisp.
<connection-not-established-error> (condition).
<integral-error> (condition).
<migration-error> (condition).
<type-missing-error> (condition).
<unknown-primary-key-error> (condition).
integral.tablecommon-lisp.
iterate.
<dao-class> (class).
<dao-table-class> (class).
database-column-slot-names (generic function).
database-column-slots (generic function).
deflate (generic function).
ensure-table-exists (generic function).
generate-defclass (generic function).
inflate (generic function).
initialize-dao-table-class (generic function).
make-dao-instance (generic function).
recreate-table (generic function).
table-class-indices (function).
table-definition (generic function).
table-name (generic function).
table-primary-key (generic function).
table-serial-key (generic function).
type-deflate (generic function).
type-inflate (generic function).
valid-p (generic function).
*oid-slot-definition* (special variable).
*synced-slot-definition* (special variable).
contains-class-or-subclasses (function).
find-type-deflate (function).
find-type-inflate (function).
initargs-contains-primary-key (function).
initializedp (generic reader).
(setf initializedp) (generic writer).
integral.connection.mysqlcommon-lisp.
sxql.
column-definitions (function).
last-insert-id (function).
table-indices (function).
integral.databasecommon-lisp.
*sql-log-stream* (special variable).
execute-sql (generic function).
retrieve-by-raw-sql (generic function).
integral.connection.sqlite3common-lisp.
column-definitions (function).
last-insert-id (function).
table-indices (function).
table-info (function).
table-primary-keys (function).
integralcommon-lisp.
iterate.
sxql.
create-dao (generic function).
delete-dao (generic function).
find-dao (generic function).
insert-dao (generic function).
retrieve-by-sql (generic function).
save-dao (generic function).
select-dao (generic function).
update-dao (generic function).
make-delete-sql (generic function).
make-find-sql (generic function).
make-insert-sql (generic function).
make-set-clause (function).
make-update-sql (generic function).
integral.columncl-annot.class.
common-lisp.
auto-increment-p (generic reader).
(setf auto-increment-p) (generic writer).
column-info-for-create-table (generic function).
ghost-slot-p (generic reader).
(setf ghost-slot-p) (generic writer).
primary-key-p (generic reader).
(setf primary-key-p) (generic writer).
slot-definition-to-plist (generic function).
table-column-definition (class).
table-column-deflate (generic function).
table-column-inflate (generic function).
table-column-satisfies (generic function).
*table-column-definition-slots* (special variable).
table-column-name (generic function).
table-column-type (generic function).
integral.typecommon-lisp.
bigint (type).
bigserial (type).
cltype-to-dbtype (generic function).
date (type).
datetime (type).
define-column-type (macro).
enum (type).
is-type-equal (function).
mediumint (type).
serial (type).
smallint (type).
string-to-dbtype (function).
text (type).
timestamp (type).
tinyint (type).
type-alias (function).
(setf type-alias) (function).
varchar (type).
*type-alias-map* (special variable).
parse-type-vars (function).
integral.variablecommon-lisp.
*auto-migration-mode* (special variable).
integral.migrationcommon-lisp.
make-migration-sql (generic function).
migrate-table (generic function).
%generate-migration-sql-for-sqlite3 (function).
%generate-migration-sql-for-table-columns-others (function).
arranged-migration-sql (function).
compute-migrate-table-columns (function).
generate-migration-sql-for-table-indices (function).
integral.utilcommon-lisp.
class-inherit-p (function).
class-slot-names (function).
escaped-symbol-p (function).
finalize-class-if-necessary (function).
get-slot-by-slot-name (function).
group-by-plist-key (function).
lispify (function).
list-diff (function).
symbol-name-literally (function).
unlispify (function).
%list-diff (function).
integral.connectioncommon-lisp.
*db* (special variable).
connect-toplevel (function).
connected-p (function).
connection-quote-character (function).
database-type (function).
disconnect-toplevel (function).
get-connection (function).
last-insert-id (function).
make-connection (function).
retrieve-table-column-definitions-by-name (function).
retrieve-table-indices (function).
with-quote-char (macro).
%make-connection (function).
connection (structure).
connection-connect-args (reader).
(setf connection-connect-args) (writer).
connection-driver-name (reader).
(setf connection-driver-name) (writer).
connection-handle (reader).
(setf connection-handle) (writer).
connection-p (function).
copy-connection (function).
make-connection-handle (function).
integral.connection.postgrescommon-lisp.
sxql.
column-definitions (function).
last-insert-id (function).
table-indices (function).
get-serial-keys (function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Whether use auto-migration mode or not.
Current connection object.
Connect to the database with given ‘ARGS’.
Same as DBI:CONNECT except this has a simple cache mechanizm.
Return whether already connected to a database.
Return the database type of the current connection. It is one of :mysql, :postgres and :sqlite3. If no connections are established, NIL will be returned.
Disconnect the current connection.
If no connections established, this do nothing.
Return the current established connection handle.
Return the last value of a serial column.
Compute differences two lists.
Note this can be applied for a list of string-designators.
Retrieve column definitions of ‘TABLE-NAME’ from ‘CONN’.
table-column-definition)) ¶automatically generated reader method
table-column-definition)) ¶automatically generated writer method
(eql integral.type:enum)) &rest args1) ¶(eql integral.type:bigserial)) &rest args1) ¶(eql integral.type:serial)) &rest args1) ¶(eql string)) &rest args1) ¶list) &rest args) ¶table-column-definition)) ¶symbol) &rest initargs) ¶<dao-table-class>) &rest initargs) ¶<dao-table-class>)) ¶Same as C2MOP:CLASS-DIRECT-SLOTS except to remove ghost columns.
<dao-table-class>)) ¶<dao-class>) slot-name value) ¶<dao-class>)) ¶symbol)) ¶<dao-table-class>)) ¶symbol) &rest pk-values) ¶<dao-table-class>) &rest pk-values) ¶<dao-table-class>) &key table-name) ¶symbol) &key table-name) ¶table-column-definition)) ¶table-column-definition)) ¶Option to specify slots as ghost slots. Ghost slots do not depend on a database.
<dao-class>) slot-name value) ¶<dao-table-class>)) ¶<dao-class>)) ¶symbol) &rest initargs) ¶<dao-table-class>) &rest initargs) ¶symbol) &key yield) ¶<dao-table-class>) &key yield) ¶symbol)) ¶<dao-table-class>)) ¶table-column-definition)) ¶automatically generated reader method
table-column-definition)) ¶automatically generated writer method
symbol)) ¶<dao-table-class>)) ¶<dao-class>)) ¶symbol) &rest expressions) ¶<dao-table-class>) &rest expressions) ¶standard-slot-definition)) ¶table-column-definition)) ¶table-column-definition)) ¶table-column-definition)) ¶symbol) &key yield if-not-exists) ¶<dao-table-class>) &key yield if-not-exists) ¶Return the table name of ‘CLASS’ as a string.
<dao-table-class>)) ¶<dao-class>)) ¶symbol)) ¶Return the primary key as a list.
<dao-table-class>)) ¶Return the serial key as a symbol or NIL if there’s no serial keys.
<dao-table-class>)) ¶(eql boolean)) value) ¶(eql boolean)) value) ¶<dao-class>)) ¶<dao-class>)) ¶<dao-table-class>) &key) ¶sb-mop.
<dao-table-class>) name &rest keys &key direct-superclasses &allow-other-keys) ¶sb-mop.
<dao-table-class>) &key) ¶<dao-table-class>) &rest initargs &key direct-superclasses &allow-other-keys) ¶table-column-definition) &key) ¶table-column-definition) &rest initargs) ¶<dao-table-class>) &key &allow-other-keys) ¶<dao-class>) stream) ¶<dao-class>)) ¶clos-fixtures.
<dao-table-class>) &rest initargs) ¶<dao-table-class>) (super standard-class)) ¶sb-mop.
simple-error.
:slot-name
:table-name
Base class of classes whose metaclass is <DAO-TABLE-CLASS>. The inheritance will be done implicitly. If you want to use another class, specify it as a superclass in the usual way.
Metaclass to define classes for your database-access objects as regular CLOS classes.
standard-class.
create-dao.
database-column-slot-names.
database-column-slots.
direct-slot-definition-class.
ensure-class-using-class.
ensure-table-exists.
find-dao.
generate-defclass.
initialize-dao-table-class.
initialize-instance.
initialize-instance.
(setf initializedp).
initializedp.
make-dao-instance.
make-find-sql.
make-instance.
make-migration-sql.
migrate-table.
recreate-table.
reinitialize-instance.
select-dao.
table-definition.
table-name.
table-primary-key.
table-serial-key.
validate-superclass.
sxql.
:primary-key
:unique-keys
list
:keys
(trivial-types:proper-list (quote string))
:table-name
(trivial-types:proper-list (quote boolean))
:generate-slots
(trivial-types:proper-list (quote boolean))
(quote (t))
:auto-pk
boolean
standard-direct-slot-definition.
(or symbol cons)
:col-type
boolean
:primary-key
boolean
:auto-increment
boolean
:not-null
(or function null)
:inflate
(or function null)
:deflate
common-lisp.
(or function null)
:satisfies
Option to specify slots as ghost slots. Ghost slots do not depend on a database.
boolean
:ghost
<dao-table-class>)) ¶automatically generated reader method
<dao-table-class>)) ¶automatically generated writer method
<dao-class>)) ¶<dao-table-class>) &rest pk-values) ¶<dao-class>)) ¶<dao-class>)) ¶table-column-definition)) ¶table-column-definition)) ¶Class of database connection
| Jump to: | %
(
A C D E F G I L M P R S T U V W |
|---|
| Jump to: | %
(
A C D E F G I L M P R S T U V W |
|---|
| Jump to: | %
*
A C D G H I K N P S T U |
|---|
| Jump to: | %
*
A C D G H I K N P S T U |
|---|
| Jump to: | <
B C D E F I M P S T U V |
|---|
| Jump to: | <
B C D E F I M P S T U V |
|---|