This is the mito Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:08:30 2024 GMT+0.
mito/mito.asd
mito-core/mito-core.asd
mito-migration/mito-migration.asd
lack-middleware-mito/lack-middleware-mito.asd
mito/src/mito.lisp
mito-core/src/core.lisp
mito-core/core-components/dao.lisp
mito-core/core-components/dao-components/table.lisp
mito-core/core-components/dao-components/view.lisp
mito-core/core-components/dao-components/mixin.lisp
mito-core/core-components/dao-components/column.lisp
mito-core/core-components/class.lisp
mito-core/core-components/class-components/table.lisp
mito-core/core-components/class-components/column.lisp
mito-core/core-components/connection.lisp
mito-core/core-components/type.lisp
mito-core/core-components/db.lisp
mito-core/core-components/db-drivers/mysql.lisp
mito-core/core-components/db-drivers/postgres.lisp
mito-core/core-components/db-drivers/sqlite3.lisp
mito-core/core-components/logger.lisp
mito-core/core-components/error.lisp
mito-core/core-components/util.lisp
mito-migration/src/migration.lisp
mito-migration/migration-components/table.lisp
mito-migration/migration-components/versions.lisp
mito-migration/migration-components/sxql.lisp
mito-migration/migration-components/sql-parse.lisp
mito-migration/migration-components/util.lisp
lack-middleware-mito/src/middleware.lisp
mito.db.sqlite3
mito.migration.sql-parse
mito.connection
mito.migration
mito.core
mito.type
mito.class
mito.migration.sxql
mito.dao.mixin
mito.logger
mito.db.mysql
mito.dao
mito.middleware
mito.dao.column
mito.class.table
mito-asd
mito.class.column
mito
mito.dao.view
mito.dao.table
mito.error
mito.util
mito.db.postgres
mito-migration-asd
mito.db
mito.migration.table
mito.migration.util
mito.migration.versions
The main system appears first, followed by any subsystem dependency.
mito
Abstraction layer for DB schema
Eitaro Fukamachi
LLGPL
# Mito
[![Build Status](https://github.com/fukamachi/mito/workflows/CI/badge.svg)](https://github.com/fukamachi/mito/actions?query=workflow%3ACI)
[![Quicklisp dist](http://quickdocs.org/badge/mito.svg)](http://quickdocs.org/mito/)
Mito is yet another object relational mapper, and it aims to be a successor of [Integral](https://github.com/fukamachi/integral).
* Supports MySQL, PostgreSQL and SQLite3
* Adds ‘id‘ (serial/uuid primary key), ‘created_at‘ and ‘updated_at‘ by default like Ruby’s ActiveRecord
* Migrations
* DB schema versioning
## Warning
This software is still ALPHA quality. The APIs likely change.
This software should work fine with MySQL, PostgreSQL and SQLite3 on SBCL/Clozure CL.
## Usage
“‘common-lisp
(mito:connect-toplevel :mysql :database-name "myapp" :username "fukamachi" :password "c0mon-1isp")
;=> #<DBD.MYSQL:<DBD-MYSQL-CONNECTION> {100691BFF3}>
(mito:deftable user ()
((name :col-type (:varchar 64))
(email :col-type (or (:varchar 128) :null))))
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::USER>
(mito:table-definition ’user)
;=> (#<SXQL-STATEMENT: CREATE TABLE user (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(64) NOT NULL, email VARCHAR(128))>)
(mito:deftable tweet ()
((status :col-type :text)
(user :col-type user)))
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::TWEET>
(mito:table-definition ’tweet)
;=> (#<SXQL-STATEMENT: CREATE TABLE tweet (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, status TEXT NOT NULL, user_id BIGINT UNSIGNED NOT NULL, created_at TIMESTAMP, updated_at TIMESTAMP)>)
“‘
### Connecting to DB
Mito provides the functions ‘connect-toplevel‘ and ‘disconnect-toplevel‘ to establish and sever a connection to RDBMS.
‘connect-toplevel‘ takes the same arguments as ‘dbi:connect‘: typically the driver-type, the database name to connect, user name and password.
“‘common-lisp
(mito:connect-toplevel :mysql :database-name "myapp" :username "fukamachi" :password "c0mon-1isp")
“‘
‘connect-toplevel‘ sets ‘*connection*‘ to a new connection and returns it.
To use a connection lexically, just bind it:
“‘common-lisp
(let ((mito:*connection* (dbi:connect :sqlite3 :database-name #P"/tmp/myapp.db")))
(unwind-protect (progn ...)
;; Ensure that the connection is closed.
(dbi:disconnect mito:*connection*)))
“‘
In most cases ‘dbi:connect-cached‘ is a better option, since it reuses a connection for multiple threads.
“‘common-lisp
(let ((mito:*connection* (dbi:connect-cached :sqlite3 :database-name #P"/tmp/myapp.db")))
(unwind-protect (progn ...)
;; Ensure that the connection is closed.
))
“‘
Use ‘connection-database-name‘ to get the name of the current connection, or of one named via parameter.
### deftable macro
As Mito’s dao table class is defined as a CLOS metaclass, a table class can be defined like this:
“‘common-lisp
(defclass user ()
((name :col-type (:varchar 64)
:accessor user-name)
(email :col-type (or (:varchar 128) :null)
:accessor user-email))
(:metaclass mito:dao-table-class))
“‘
‘deftable‘’s syntax is the same as that of ‘cl:defclass‘. However, the definition is a little bit redundant.
‘mito:deftable‘ is a thin macro, to allow definion of a table class with less typing.
For example, the above example can be rewritten, using ‘deftable‘ as follows.
“‘common-lisp
(mito:deftable user ()
((name :col-type (:varchar 64))
(email :col-type (or (:varchar 128) :null))))
“‘
It adds ‘:metaclass mito:dao-table-class‘, and adds default accessors that start with ‘<class-name>-‘ by default, like ‘defstruct‘ does.
The prefix for accessors can be changed with the ‘:conc-name‘ class option:
“‘common-lisp
(mito:deftable user ()
((name :col-type (:varchar 64))
(email :col-type (or (:varchar 128) :null)))
(:conc-name my-))
(my-name (make-instance ’user :name "fukamachi"))
;=> "fukamachi"
“‘
If ‘:conc-name‘ is NIL, default accessors will NOT be defined.
### Class Definitions
In Mito, a class corresponding to a database table is defined by specifying ‘(:metaclass mito:dao-table-class)‘.
“‘common-lisp
(defclass user ()
((name :col-type (:varchar 64)
:accessor user-name)
(email :col-type (or (:varchar 128) :null)
:accessor user-email))
(:metaclass mito:dao-table-class))
“‘
The above defines a Common Lisp normal class, except that it allows additional options.
“‘
(defclass {class-name} ()
({column-definition}*)
(:metaclass mito:dao-table-class)
[[class-option]])
column-definition ::= (slot-name [[column-option]])
column-option ::= {:col-type col-type} |
{:primary-key boolean} |
{:inflate inflation-function} |
{:deflate deflation-function} |
{:references {class-name | (class-name slot-name)}} |
{:ghost boolean}
col-type ::= { keyword |
(keyword . args) |
(or keyword :null) |
(or :null keyword) }
class-option ::= {:primary-key symbol*} |
{:unique-keys {symbol | (symbol*)}*} |
{:keys {symbol | (symbol*)}*} |
{:table-name table-name} |
{:auto-pk auto-pk-mixin-class-name} |
{:record-timestamps boolean} |
{:conc-name conc-name}
auto-pk-mixin-class-name ::= {:serial | :uuid}
conc-name ::= {null | string-designator}
“‘
Note: the class automatically adds some slots – a primary key named ‘id‘ if there is no primary key, ‘created_at‘ and ‘updated_at‘ for recording timestamps. To disable these behaviors, specify ‘:auto-pk nil‘ or ‘:record-timestamps nil‘ to defclass forms.
“‘common-lisp
(mito.class:table-column-slots (find-class ’user))
;=> (#<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS MITO.DAO.MIXIN::ID>
; #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS COMMON-LISP-USER::NAME>
; #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS COMMON-LISP-USER::EMAIL>
; #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS MITO.DAO.MIXIN::CREATED-AT>
; #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS MITO.DAO.MIXIN::UPDATED-AT>)
“‘
This class inherits ‘mito:dao-class‘ implicitly.
“‘common-lisp
(find-class ’user)
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::USER>
(c2mop:class-direct-superclasses *)
;=> (#<STANDARD-CLASS MITO.DAO.TABLE:DAO-CLASS>)
“‘
This may be useful to define methods that can be applied for many or all table classes.
#### :col-type Options
The following are valid keywords for :col-type in the ‘deftable‘ definition above.
“‘common-lisp
:serial
:bigserial
:timestamptz
:integer
:bytea
:timestamp
:bigint
:unsigned
:int
:binary
:datetime
“‘
Besides the above keywords, there are other keywords that are valid, however they are dependent on the RDS and its version.
An example of this is that ‘:json‘ and ‘:jsonb‘ work for PostgreSQL but don’t work on an old version of MySQL which doesn’t support those types.
A complete list of valid ‘:col-type‘ options is dependent on the database system. Here’s a link for the current Data Types for:
- [PostgreSQL Data Types](https://www.postgresql.org/docs/current/datatype.html#DATATYPE-TABLE)
- [MySQL Data Types](https://dev.mysql.com/doc/refman/8.0/en/data-types.html)
- [SQLite3 Data Types](https://www.sqlite.org/datatype3.html)
The symbols are not defined directly in the system, rather they are the symbol equivalent of the string which is the name for the data type. Therefore, for any data type name, just preprend a colon to the name ‘:data-type‘ in order to use it as a ‘col-type‘.
### Generating Table Definitions
“‘common-lisp
(mito:table-definition ’user)
;=> (#<SXQL-STATEMENT: CREATE TABLE user (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(64) NOT NULL, email VARCHAR(128), created_at TIMESTAMP, updated_at TIMESTAMP)>)
(sxql:yield *)
;=> "CREATE TABLE user (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(64) NOT NULL, email VARCHAR(128), created_at TIMESTAMP, updated_at TIMESTAMP)"
; NIL
“‘
### Creating DB tables
“‘common-lisp
(mapc #’mito:execute-sql (mito:table-definition ’user))
(mito:ensure-table-exists ’user)
“‘
### CRUD
“‘common-lisp
(defvar me
(make-instance ’user :name "Eitaro Fukamachi" :email "e.arrows@gmail.com"))
;=> USER
(mito:insert-dao me)
;-> ;; INSERT INTO ‘user‘ (‘name‘, ‘email‘, ‘created_at‘, ‘updated_at‘) VALUES (?, ?, ?, ?) ("Eitaro Fukamachi", "e.arrows@gmail.com", "2016-02-04T19:55:16.365543Z", "2016-02-04T19:55:16.365543Z") [0 rows] | MITO.DAO:INSERT-DAO
;=> #<USER {10053C4453}>
;; Same as above
(mito:create-dao ’user :name "Eitaro Fukamachi" :email "e.arrows@gmail.com")
;; Getting the primary key value
(mito:object-id me)
;=> 1
;; Retrieving from the DB
(mito:find-dao ’user :id 1)
;-> ;; SELECT * FROM ‘user‘ WHERE (‘id‘ = ?) LIMIT 1 (1) [1 row] | MITO.DB:RETRIEVE-BY-SQL
;=> #<USER {10077C6073}>
(mito:retrieve-dao ’user)
;=> (#<USER {10077C6073}>)
;; Updating
(setf (slot-value me ’name) "nitro_idiot")
;=> "nitro_idiot"
(mito:save-dao me)
;-> ;; UPDATE ‘user‘ SET ‘id‘ = ?, ‘name‘ = ?, ‘email‘ = ?, ‘created_at‘ = ?, ‘updated_at‘ = ? WHERE (‘id‘ = ?) (2, "nitro_idiot", "e.arrows@gmail.com", "2016-02-04T19:56:11.408927Z", "2016-02-04T19:56:19.006020Z", 2) [0 rows] | MITO.DAO:UPDATE-DAO
;; Deleting
(mito:delete-dao me)
;-> ;; DELETE FROM ‘user‘ WHERE (‘id‘ = ?) (1) [0 rows] | MITO.DAO:DELETE-DAO
(mito:delete-by-values ’user :id 1)
;-> ;; DELETE FROM ‘user‘ WHERE (‘id‘ = ?) (1) [0 rows] | MITO.DAO:DELETE-DAO
;; Counting
(mito:count-dao ’user)
;-> 1
“‘
Use ‘select-dao‘ to build custom queries with sxql (examples below), or ‘select-by-sql‘ in order to run raw SQL.
### Relationship
To define a relationship, use ‘:references‘ on the slot:
“‘common-lisp
(mito:deftable user ()
((id :col-type (:varchar 36)
:primary-key t)
(name :col-type (:varchar 64))
(email :col-type (or (:varchar 128) :null))))
(mito:deftable tweet ()
((status :col-type :text)
;; This slot refers to USER class
(user-id :references (user id))))
;; The :col-type of USER-ID column is retrieved from the foreign class.
(mito:table-definition (find-class ’tweet))
;=> (#<SXQL-STATEMENT: CREATE TABLE tweet (
; id BIGSERIAL NOT NULL PRIMARY KEY,
; status TEXT NOT NULL,
; user_id VARCHAR(36) NOT NULL,
; created_at TIMESTAMPTZ,
; updated_at TIMESTAMPTZ
; )>)
“‘
You can also specify another foreign class at ‘:col-type‘ to define a relationship:
“‘common-lisp
(mito:deftable tweet ()
((status :col-type :text)
;; This slot refers to USER class
(user :col-type user)))
(mito:table-definition (find-class ’tweet))
;=> (#<SXQL-STATEMENT: CREATE TABLE tweet (
; id BIGSERIAL NOT NULL PRIMARY KEY,
; status TEXT NOT NULL,
; user_id VARCHAR(36) NOT NULL,
; created_at TIMESTAMP,
; updated_at TIMESTAMP
; )>)
;; You can specify :USER arg, instead of :USER-ID.
(defvar *user* (mito:create-dao ’user :name "Eitaro Fukamachi"))
(mito:create-dao ’tweet :user *user*)
(mito:find-dao ’tweet :user *user*)
“‘
The latter example allows you to create/retrieve ‘TWEET‘ by a ‘USER‘ object, not a ‘USER-ID‘.
Mito doesn’t add foreign key constraints for referring tables, since I’m not sure it’s still handful while using with ORMs.
### Inflation/Deflation
Inflation/Deflation is a function to convert values between Mito and RDBMS.
“‘common-lisp
(mito:deftable user-report ()
((title :col-type (:varchar 100))
(body :col-type :text
:initform "")
(reported-at :col-type :timestamp
:initform (local-time:now)
:inflate #’local-time:universal-to-timestamp
:deflate #’local-time:timestamp-to-universal))
(:conc-name report-))
“‘
### Eager loading
One of the pains in the neck to use ORMs is the "N+1 query" problem.
“‘common-lisp
;; BAD EXAMPLE
(use-package ’(:mito :sxql))
(defvar *tweets-contain-japan*
(select-dao ’tweet
(where (:like :status "%Japan%"))))
;; Getting names of tweeted users.
(mapcar (lambda (tweet)
(user-name (tweet-user tweet)))
*tweets-contain-japan*)
“‘
This example sends a query to retrieve a user, like "SELECT * FROM user WHERE id = ?" for each iteration.
To prevent this performance issue, add ‘includes‘ to the above query, which sends only a single WHERE IN query instead of N queries:
“‘common-lisp
;; GOOD EXAMPLE with eager loading
(use-package ’(:mito :sxql))
(defvar *tweets-contain-japan*
(select-dao ’tweet
(includes ’user)
(where (:like :status "%Japan%"))))
;-> ;; SELECT * FROM ‘tweet‘ WHERE (‘status‘ LIKE ?) ("%Japan%") [3 row] | MITO.DB:RETRIEVE-BY-SQL
;-> ;; SELECT * FROM ‘user‘ WHERE (‘id‘ IN (?, ?, ?)) (1, 3, 12) [3 row] | MITO.DB:RETRIEVE-BY-SQL
;=> (#<TWEET {1003513EC3}> #<TWEET {1007BABEF3}> #<TWEET {1007BB9D63}>)
;; No additional SQLs will be executed.
(tweet-user (first *))
;=> #<USER {100361E813}>
“‘
### Migrations
“‘common-lisp
(ensure-table-exists ’user)
;-> ;; CREATE TABLE IF NOT EXISTS "user" (
; "id" BIGSERIAL NOT NULL PRIMARY KEY,
; "name" VARCHAR(64) NOT NULL,
; "email" VARCHAR(128),
; "created_at" TIMESTAMP,
; "updated_at" TIMESTAMP
; ) () [0 rows] | MITO.DAO:ENSURE-TABLE-EXISTS
;; No changes
(mito:migration-expressions ’user)
;=> NIL
(mito:deftable user ()
((name :col-type (:varchar 64))
(email :col-type (:varchar 128)))
(:unique-keys email))
(mito:migration-expressions ’user)
;=> (#<SXQL-STATEMENT: ALTER TABLE user ALTER COLUMN email TYPE character varying(128), ALTER COLUMN email SET NOT NULL>
; #<SXQL-STATEMENT: CREATE UNIQUE INDEX unique_user_email ON user (email)>)
(mito:migrate-table ’user)
;-> ;; ALTER TABLE "user" ALTER COLUMN "email" TYPE character varying(128), ALTER COLUMN "email" SET NOT NULL () [0 rows] | MITO.MIGRATION.TABLE:MIGRATE-TABLE
; ;; CREATE UNIQUE INDEX "unique_user_email" ON "user" ("email") () [0 rows] | MITO.MIGRATION.TABLE:MIGRATE-TABLE
;-> (#<SXQL-STATEMENT: ALTER TABLE user ALTER COLUMN email TYPE character varying(128), ALTER COLUMN email SET NOT NULL>
; #<SXQL-STATEMENT: CREATE UNIQUE INDEX unique_user_email ON user (email)>)
“‘
SQLite3 migration creates temporary tables with pre-migration data. To delete them after migration is complete set
‘mito:*migration-keep-temp-tables*‘ to ‘nil‘. It has no effect on other drivers.
#### Auto migrations
If ‘mito:*auto-migration-mode*‘ is set to ‘t‘, and you are connected to a database, Mito will run migrations after
each change to model definitions.
### Schema versioning
“‘
$ ros install mito
$ mito
Usage: mito command [option...]
Commands:
generate-migrations
migrate
migration-status
Options:
-t, –type DRIVER-TYPE DBI driver type (one of "mysql", "postgres" or "sqlite3")
-d, –database DATABASE-NAME Database name to use
-u, –username USERNAME Username for RDBMS
-p, –password PASSWORD Password for RDBMS
-s, –system SYSTEM ASDF system to load (several -s’s allowed)
-D, –directory DIRECTORY Directory path to keep migration SQL files (default: "/Users/nitro_idiot/Programs/lib/mito/db/")
–dry-run List SQL expressions to migrate
-f, –force Create a new empty migration file even when it’s unnecessary.
“‘
#### Example
“‘
mito –database postgres –username fukamachi –pasword c0mmon-l1sp
“‘
### Inheritance and Mixin
A subclass of DAO-CLASS is allowed to be inherited. This may be useful when you need classes that have similar columns:
“‘common-lisp
(mito:deftable user ()
((name :col-type (:varchar 64))
(email :col-type (:varchar 128)))
(:unique-keys email))
(mito:deftable temporary-user (user)
((registered-at :col-type :timestamp)))
(mito:table-definition ’temporary-user)
;=> (#<SXQL-STATEMENT: CREATE TABLE temporary_user (
; id BIGSERIAL NOT NULL PRIMARY KEY,
; name VARCHAR(64) NOT NULL,
; email VARCHAR(128) NOT NULL,
; registered_at TIMESTAMP NOT NULL,
; created_at TIMESTAMP,
; updated_at TIMESTAMP,
; UNIQUE (email)
; )>)
“‘
If you need a ’template’ for tables, not related to any specific database table, you can use ‘DAO-TABLE-MIXIN‘:
“‘common-lisp
(defclass has-email ()
((email :col-type (:varchar 128)
:accessor object-email))
(:metaclass mito:dao-table-mixin)
(:unique-keys email))
;=> #<MITO.DAO.MIXIN:DAO-TABLE-MIXIN COMMON-LISP-USER::HAS-EMAIL>
(mito:deftable user (has-email)
((name :col-type (:varchar 64))))
;=> #<MITO.DAO.TABLE:DAO-TABLE-CLASS COMMON-LISP-USER::USER>
(mito:table-definition ’user)
;=> (#<SXQL-STATEMENT: CREATE TABLE user (
; id BIGSERIAL NOT NULL PRIMARY KEY,
; name VARCHAR(64) NOT NULL,
; email VARCHAR(128) NOT NULL,
; created_at TIMESTAMP,
; updated_at TIMESTAMP,
; UNIQUE (email)
; )>)
“‘
* [mito-attachment](https://github.com/fukamachi/mito-attachment)
* [mito-auth](https://github.com/fukamachi/mito-auth)
### Triggers
Since ‘insert-dao‘, ‘update-dao‘ and ‘delete-dao‘ are defined as generic functions, you can define ‘:before‘, ‘:after‘ or ‘:around‘ methods on those.
“‘common-lisp
(defmethod mito:insert-dao :before ((object user))
(format t "~&Adding ~S...~%" (user-name object)))
(mito:create-dao ’user :name "Eitaro Fukamachi" :email "e.arrows@gmail.com")
;-> Adding "Eitaro Fukamachi"...
; ;; INSERT INTO "user" ("name", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?) ("Eitaro Fukamachi", "e.arrows@gmail.com", "2016-02-16 21:13:47", "2016-02-16 21:13:47") [0 rows] | MITO.DAO:INSERT-DAO
;=> #<USER {100835FB33}>
“‘
## Installation
“‘common-lisp
(ql:quickload :mito)
“‘
Or, with Roswell:
“‘
ros install mito
“‘
## See Also
* [CL-DBI](https://github.com/fukamachi/cl-dbi)
* [SxQL](https://github.com/fukamachi/sxql)
## Author
* Eitaro Fukamachi (e.arrows@gmail.com)
## Copyright
Copyright (c) 2015 Eitaro Fukamachi (e.arrows@gmail.com)
## License
Licensed under the LLGPL License.
0.1
mito-core
(system).
mito-migration
(system).
lack-middleware-mito
(system).
cl-reexport
(system).
src/mito.lisp
(file).
mito-core
Eitaro Fukamachi
LLGPL
0.1
dbi
(system)., at least version "0.9.5"
sxql
(system).
cl-ppcre
(system).
closer-mop
(system).
dissect
(system).
trivia
(system).
cl-reexport
(system).
local-time
(system).
uuid
(system).
alexandria
(system).
src/core.lisp
(file).
core-components
(module).
mito-migration
Eitaro Fukamachi
LLGPL
0.1
mito-core
(system).
sxql
(system).
dbi
(system).
closer-mop
(system).
cl-reexport
(system).
esrap
(system).
alexandria
(system).
uiop
(system).
chipz
(system).
src/migration.lisp
(file).
migration-components
(module).
Modules are listed depth-first from the system components tree.
mito-core/core-components
mito-core/core-components/dao-components
mito-core/core-components/class-components
mito-core/core-components/db-drivers
mito-migration/migration-components
lack-middleware-mito/src
mito-core/core-components
mito-core
(system).
dao.lisp
(file).
dao-components
(module).
class.lisp
(file).
class-components
(module).
connection.lisp
(file).
type.lisp
(file).
db.lisp
(file).
db-drivers
(module).
logger.lisp
(file).
error.lisp
(file).
util.lisp
(file).
mito-core/core-components/dao-components
connection.lisp
(file).
class.lisp
(file).
db.lisp
(file).
logger.lisp
(file).
util.lisp
(file).
core-components
(module).
table.lisp
(file).
view.lisp
(file).
mixin.lisp
(file).
column.lisp
(file).
mito-core/core-components/class-components
error.lisp
(file).
util.lisp
(file).
core-components
(module).
table.lisp
(file).
column.lisp
(file).
mito-core/core-components/db-drivers
logger.lisp
(file).
util.lisp
(file).
core-components
(module).
mysql.lisp
(file).
postgres.lisp
(file).
sqlite3.lisp
(file).
mito-migration/migration-components
mito-migration
(system).
table.lisp
(file).
versions.lisp
(file).
sxql.lisp
(file).
sql-parse.lisp
(file).
util.lisp
(file).
lack-middleware-mito/src
lack-middleware-mito
(system).
middleware.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
mito/mito.asd
mito-core/mito-core.asd
mito-migration/mito-migration.asd
lack-middleware-mito/lack-middleware-mito.asd
mito/src/mito.lisp
mito-core/src/core.lisp
mito-core/core-components/dao.lisp
mito-core/core-components/dao-components/table.lisp
mito-core/core-components/dao-components/view.lisp
mito-core/core-components/dao-components/mixin.lisp
mito-core/core-components/dao-components/column.lisp
mito-core/core-components/class.lisp
mito-core/core-components/class-components/table.lisp
mito-core/core-components/class-components/column.lisp
mito-core/core-components/connection.lisp
mito-core/core-components/type.lisp
mito-core/core-components/db.lisp
mito-core/core-components/db-drivers/mysql.lisp
mito-core/core-components/db-drivers/postgres.lisp
mito-core/core-components/db-drivers/sqlite3.lisp
mito-core/core-components/logger.lisp
mito-core/core-components/error.lisp
mito-core/core-components/util.lisp
mito-migration/src/migration.lisp
mito-migration/migration-components/table.lisp
mito-migration/migration-components/versions.lisp
mito-migration/migration-components/sxql.lisp
mito-migration/migration-components/sql-parse.lisp
mito-migration/migration-components/util.lisp
lack-middleware-mito/src/middleware.lisp
mito-migration/mito-migration.asd
mito-migration
(system).
lack-middleware-mito/lack-middleware-mito.asd
lack-middleware-mito
(system).
mito-core/src/core.lisp
core-components
(module).
mito-core
(system).
mito-core/core-components/dao.lisp
dao-components
(module).
core-components
(module).
convert-for-driver-type
(generic function).
count-dao
(function).
create-dao
(generic function).
deftable
(macro).
delete-by-values
(generic function).
delete-dao
(generic function).
ensure-table-exists
(function).
find-dao
(function).
include-foreign-objects
(function).
insert-dao
(generic function).
recreate-table
(function).
retrieve-dao
(function).
save-dao
(generic function).
select-by-sql
(function).
select-dao
(macro).
update-dao
(generic function).
*db-date-format*
(special variable).
*db-datetime-format*
(special variable).
*db-datetime-format-without-timezone*
(special variable).
child-columns
(function).
expand-op
(function).
foreign-value
(function).
make-set-clause
(function).
slot-foreign-value
(function).
where-and
(function).
mito-core/core-components/dao-components/table.lisp
column.lisp
(file).
mixin.lisp
(file).
view.lisp
(file).
dao-components
(module).
dao-table-class
(class).
depending-table-classes
(function).
direct-slot-definition-class
(method).
ensure-class-using-class
(method).
initialize-instance
(method).
reinitialize-instance
(method).
table-definition
(method).
append-auto-pk-class-to-direct-superclasses-if-needed
(function).
append-record-timestamp-mixin-to-direct-superclasses-if-needed
(function).
initargs-contains-primary-key
(function).
initargs-enables-auto-pk
(function).
initargs-enables-record-timestamps
(function).
mito-core/core-components/dao-components/view.lisp
column.lisp
(file).
dao-components
(module).
dao-table-view
(class).
dao-table-view-as-query
(reader method).
direct-slot-definition-class
(method).
table-definition
(generic function).
yield
(method).
copy-create-view
(function).
create-view
(structure).
create-view-as
(reader).
(setf create-view-as)
(writer).
create-view-name
(reader).
(setf create-view-name)
(writer).
create-view-or-replace
(reader).
(setf create-view-or-replace)
(writer).
create-view-p
(function).
create-view-view-name
(reader).
(setf create-view-view-name)
(writer).
make-create-view
(function).
mito-core/core-components/dao-components/mixin.lisp
column.lisp
(file).
dao-components
(module).
dao-class
(class).
dao-synced
(reader method).
(setf dao-synced)
(writer method).
dao-table-mixin
(class).
direct-slot-definition-class
(method).
initialize-instance
(method).
make-dao-instance
(generic function).
object-created-at
(reader method).
(setf object-created-at)
(writer method).
object-id
(generic function).
(setf object-id)
(generic function).
object-updated-at
(reader method).
(setf object-updated-at)
(writer method).
object=
(generic function).
record-timestamps-mixin
(class).
reinitialize-instance
(method).
serial-pk-mixin
(class).
uuid-pk-mixin
(class).
%object-id
(reader method).
(setf %object-id)
(writer method).
%object-uuid
(reader method).
(setf %object-uuid)
(writer method).
add-relational-readers
(function).
generate-uuid
(function).
make-relational-reader-method
(function).
mito-core/core-components/dao-components/column.lisp
dao-components
(module).
dao-table-column-class
(class).
dao-table-column-deflate
(generic function).
dao-table-column-inflate
(generic function).
deflate-for-col-type
(generic function).
inflate-for-col-type
(generic function).
initialize-instance
(method).
*conc-name*
(special variable).
*db-date-format*
(special variable).
*db-datetime-format*
(special variable).
*db-datetime-format-with-out-timezone*
(special variable).
mito-core/core-components/class.lisp
class-components
(module).
core-components
(module).
create-table-sxql
(generic function).
table-column-references-column
(method).
mito-core/core-components/class-components/table.lisp
column.lisp
(file).
class-components
(module).
database-column-slots
(generic function).
direct-slot-definition-class
(method).
find-child-columns
(function).
find-parent-column
(function).
find-slot-by-name
(function).
initialize-instance
(method).
reinitialize-instance
(method).
table-class
(class).
table-column-slots
(function).
table-direct-column-slots
(function).
table-indices-info
(generic function).
table-name
(generic function).
table-primary-key
(generic function).
table-serial-key
(generic function).
validate-superclass
(method).
add-referencing-slots
(function).
expand-relational-keys
(function).
map-all-superclasses
(function).
rel-column-name
(function).
mito-core/core-components/class-components/column.lisp
class-components
(module).
ghost-slot-p
(reader method).
(setf ghost-slot-p)
(writer method).
initialize-instance
(method).
primary-key-p
(reader method).
(setf primary-key-p)
(writer method).
table-column-class
(class).
table-column-info
(generic function).
table-column-info-for-create-table
(generic function).
table-column-name
(generic function).
table-column-not-null-p
(generic function).
table-column-references
(reader method).
table-column-references-column
(generic function).
table-column-type
(generic function).
%table-column-type
(reader method).
(setf %table-column-type)
(writer method).
parse-col-type
(function).
references
(type).
mito-core/core-components/connection.lisp
error.lisp
(file).
core-components
(module).
*connection*
(special variable).
check-connected
(function).
connect-toplevel
(function).
connected-p
(function).
connection-database-name
(function).
connection-quote-character
(function).
disconnect-toplevel
(function).
driver-type
(function).
with-quote-char
(macro).
mito-core/core-components/type.lisp
db.lisp
(file).
core-components
(module).
get-column-real-type
(function).
parse-dbtype
(function).
*real-type-cache*
(special variable).
parse-type-vars
(function).
mito-core/core-components/db.lisp
db-drivers
(module).
connection.lisp
(file).
class.lisp
(file).
util.lisp
(file).
core-components
(module).
*use-prepare-cached*
(special variable).
acquire-advisory-lock
(function).
column-definitions
(function).
execute-sql
(generic function).
last-insert-id
(function).
release-advisory-lock
(function).
retrieve-by-sql
(generic function).
table-exists-p
(function).
table-indices
(function).
table-view-query
(function).
array-convert-nulls-to-nils
(function).
list-convert-nulls-to-nils
(function).
mito-core/core-components/db-drivers/mysql.lisp
db-drivers
(module).
acquire-advisory-lock
(function).
column-definitions
(function).
last-insert-id
(function).
release-advisory-lock
(function).
table-indices
(function).
table-view-query
(function).
ensure-string
(function).
mito-core/core-components/db-drivers/postgres.lisp
db-drivers
(module).
acquire-advisory-lock
(function).
column-definitions
(function).
last-insert-id
(function).
release-advisory-lock
(function).
table-indices
(function).
table-view-query
(function).
get-serial-keys
(function).
mito-core/core-components/db-drivers/sqlite3.lisp
db-drivers
(module).
column-definitions
(function).
last-insert-id
(function).
table-indices
(function).
table-info
(function).
table-primary-keys
(function).
mito-core/core-components/logger.lisp
core-components
(module).
*mito-logger-stream*
(special variable).
*mito-migration-logger-stream*
(special variable).
*trace-sql-hooks*
(special variable).
mito-sql-logger
(function).
with-sql-logging
(macro).
with-trace-sql
(macro).
get-prev-stack
(function).
trace-sql
(function).
mito-core/core-components/error.lisp
core-components
(module).
col-type-required
(condition).
connection-not-established
(condition).
invalid-definition
(condition).
mito-error
(condition).
no-primary-keys
(condition).
mito-core/core-components/util.lisp
core-components
(module).
contains-class-or-subclasses
(function).
ensure-class
(function).
execute-with-retry
(function).
group-by-plist
(function).
lispify
(function).
list-diff
(function).
symbol-name-literally
(function).
unlispify
(function).
with-prepared-query
(macro).
%list-diff
(function).
call-with-prepared-query
(function).
escaped-symbol-p
(function).
obsolete-prepared-statement-p
(function).
mito-migration/src/migration.lisp
migration-components
(module).
mito-migration
(system).
mito-migration/migration-components/table.lisp
sxql.lisp
(file).
migration-components
(module).
*auto-migration-mode*
(special variable).
*migration-keep-temp-tables*
(special variable).
initialize-instance
(method).
migrate-table
(generic function).
migration-expressions
(function).
reinitialize-instance
(method).
migration-expressions-for-others
(function).
migration-expressions-for-sqlite3
(function).
slot-defaults
(function).
mito-migration/migration-components/versions.lisp
table.lisp
(file).
sql-parse.lisp
(file).
util.lisp
(file).
migration-components
(module).
all-migration-expressions
(function).
current-migration-version
(function).
generate-migrations
(function).
migrate
(function).
migration-status
(function).
update-migration-version
(function).
%migration-status
(function).
*advisory-lock-drivers*
(special variable).
all-dao-classes
(function).
generate-version
(function).
initialize-migrations-table
(function).
migration-file-version
(function).
migration-files
(function).
schema-migrations-table-definition
(function).
with-advisory-lock
(macro).
mito-migration/migration-components/sxql.lisp
migration-components
(module).
copy-create-sequence
(function).
copy-drop-sequence
(function).
copy-set-default
(function).
create-sequence
(structure).
create-sequence-name
(reader).
(setf create-sequence-name)
(writer).
create-sequence-p
(function).
create-sequence-sequence-name
(reader).
(setf create-sequence-sequence-name)
(writer).
drop-sequence
(structure).
drop-sequence-if-exists
(reader).
(setf drop-sequence-if-exists)
(writer).
drop-sequence-name
(reader).
(setf drop-sequence-name)
(writer).
drop-sequence-p
(function).
drop-sequence-sequence-name
(reader).
(setf drop-sequence-sequence-name)
(writer).
make-create-sequence
(function).
make-drop-sequence
(function).
make-set-default
(function).
set-default
(structure).
set-default-expression
(function).
(setf set-default-expression)
(function).
set-default-name
(reader).
(setf set-default-name)
(writer).
set-default-p
(function).
mito-migration/migration-components/sql-parse.lisp
migration-components
(module).
parse-statements
(function).
mito-migration/migration-components/util.lisp
migration-components
(module).
generate-advisory-lock-id
(function).
+migrator-salt+
(special variable).
ascii-string-to-octets
(function).
crc32
(function).
lack-middleware-mito/src/middleware.lisp
src
(module).
*lack-middleware-mito*
(special variable).
Packages are listed by definition order.
mito.db.sqlite3
mito.migration.sql-parse
mito.connection
mito.migration
mito.core
mito.type
mito.class
mito.migration.sxql
mito.dao.mixin
mito.logger
mito.db.mysql
mito.dao
mito.middleware
mito.dao.column
mito.class.table
mito-asd
mito.class.column
mito
mito.dao.view
mito.dao.table
mito.error
mito.util
mito.db.postgres
mito-migration-asd
mito.db
mito.migration.table
mito.migration.util
mito.migration.versions
mito.db.sqlite3
common-lisp
.
mito.util
.
sxql
.
column-definitions
(function).
last-insert-id
(function).
table-indices
(function).
table-info
(function).
table-primary-keys
(function).
mito.migration.sql-parse
common-lisp
.
esrap
.
parse-statements
(function).
mito.connection
common-lisp
.
mito.error
.
*connection*
(special variable).
check-connected
(function).
connect-toplevel
(function).
connected-p
(function).
connection-database-name
(function).
connection-quote-character
(function).
disconnect-toplevel
(function).
driver-type
(function).
with-quote-char
(macro).
mito.type
common-lisp
.
get-column-real-type
(function).
parse-dbtype
(function).
*real-type-cache*
(special variable).
parse-type-vars
(function).
mito.class
common-lisp
.
mito.class.column
.
mito.class.table
.
create-table-sxql
(generic function).
mito.migration.sxql
Extansions of SxQL for Mito.Migration
common-lisp
.
copy-create-sequence
(function).
copy-drop-sequence
(function).
copy-set-default
(function).
create-sequence
(structure).
create-sequence-name
(reader).
(setf create-sequence-name)
(writer).
create-sequence-p
(function).
create-sequence-sequence-name
(reader).
(setf create-sequence-sequence-name)
(writer).
drop-sequence
(structure).
drop-sequence-if-exists
(reader).
(setf drop-sequence-if-exists)
(writer).
drop-sequence-name
(reader).
(setf drop-sequence-name)
(writer).
drop-sequence-p
(function).
drop-sequence-sequence-name
(reader).
(setf drop-sequence-sequence-name)
(writer).
make-create-sequence
(function).
make-drop-sequence
(function).
make-set-default
(function).
set-default
(structure).
set-default-expression
(function).
(setf set-default-expression)
(function).
set-default-name
(reader).
(setf set-default-name)
(writer).
set-default-p
(function).
mito.dao.mixin
common-lisp
.
mito.util
.
dao-class
(class).
dao-synced
(generic reader).
(setf dao-synced)
(generic writer).
dao-table-mixin
(class).
make-dao-instance
(generic function).
object-created-at
(generic reader).
(setf object-created-at)
(generic writer).
object-id
(generic function).
(setf object-id)
(generic function).
object-updated-at
(generic reader).
(setf object-updated-at)
(generic writer).
object=
(generic function).
record-timestamps-mixin
(class).
serial-pk-mixin
(class).
uuid-pk-mixin
(class).
%object-id
(generic reader).
(setf %object-id)
(generic writer).
%object-uuid
(generic reader).
(setf %object-uuid)
(generic writer).
add-relational-readers
(function).
generate-uuid
(function).
make-relational-reader-method
(function).
mito.logger
common-lisp
.
*mito-logger-stream*
(special variable).
*mito-migration-logger-stream*
(special variable).
*trace-sql-hooks*
(special variable).
mito-sql-logger
(function).
with-sql-logging
(macro).
with-trace-sql
(macro).
get-prev-stack
(function).
trace-sql
(function).
mito.db.mysql
common-lisp
.
mito.util
.
sxql
.
acquire-advisory-lock
(function).
column-definitions
(function).
last-insert-id
(function).
release-advisory-lock
(function).
table-indices
(function).
table-view-query
(function).
ensure-string
(function).
mito.dao
common-lisp
.
mito.class
.
sxql
.
convert-for-driver-type
(generic function).
count-dao
(function).
create-dao
(generic function).
deftable
(macro).
delete-by-values
(generic function).
delete-dao
(generic function).
ensure-table-exists
(function).
find-dao
(function).
include-foreign-objects
(function).
insert-dao
(generic function).
recreate-table
(function).
retrieve-dao
(function).
save-dao
(generic function).
select-by-sql
(function).
select-dao
(macro).
update-dao
(generic function).
*db-date-format*
(special variable).
*db-datetime-format*
(special variable).
*db-datetime-format-without-timezone*
(special variable).
child-columns
(function).
expand-op
(function).
foreign-value
(function).
make-set-clause
(function).
slot-foreign-value
(function).
where-and
(function).
mito.middleware
lack.middleware.mito
common-lisp
.
*lack-middleware-mito*
(special variable).
mito.dao.column
common-lisp
.
mito.util
.
dao-table-column-class
(class).
dao-table-column-deflate
(generic function).
dao-table-column-inflate
(generic function).
deflate-for-col-type
(generic function).
inflate-for-col-type
(generic function).
*conc-name*
(special variable).
*db-date-format*
(special variable).
*db-datetime-format*
(special variable).
*db-datetime-format-with-out-timezone*
(special variable).
mito.class.table
common-lisp
.
mito.util
.
database-column-slots
(generic function).
find-child-columns
(function).
find-parent-column
(function).
find-slot-by-name
(function).
table-class
(class).
table-column-slots
(function).
table-direct-column-slots
(function).
table-indices-info
(generic function).
table-name
(generic function).
table-primary-key
(generic function).
table-serial-key
(generic function).
add-referencing-slots
(function).
expand-relational-keys
(function).
map-all-superclasses
(function).
rel-column-name
(function).
mito.class.column
common-lisp
.
mito.error
.
mito.util
.
ghost-slot-p
(generic reader).
(setf ghost-slot-p)
(generic writer).
primary-key-p
(generic reader).
(setf primary-key-p)
(generic writer).
table-column-class
(class).
table-column-info
(generic function).
table-column-info-for-create-table
(generic function).
table-column-name
(generic function).
table-column-not-null-p
(generic function).
table-column-references
(generic reader).
table-column-references-column
(generic function).
table-column-type
(generic function).
%table-column-type
(generic reader).
(setf %table-column-type)
(generic writer).
parse-col-type
(function).
references
(type).
mito.dao.view
common-lisp
.
dao-table-view
(class).
dao-table-view-as-query
(generic reader).
table-definition
(generic function).
copy-create-view
(function).
create-view
(structure).
create-view-as
(reader).
(setf create-view-as)
(writer).
create-view-name
(reader).
(setf create-view-name)
(writer).
create-view-or-replace
(reader).
(setf create-view-or-replace)
(writer).
create-view-p
(function).
create-view-view-name
(reader).
(setf create-view-view-name)
(writer).
make-create-view
(function).
mito.dao.table
common-lisp
.
mito.error
.
mito.util
.
dao-table-class
(class).
depending-table-classes
(function).
append-auto-pk-class-to-direct-superclasses-if-needed
(function).
append-record-timestamp-mixin-to-direct-superclasses-if-needed
(function).
initargs-contains-primary-key
(function).
initargs-enables-auto-pk
(function).
initargs-enables-record-timestamps
(function).
mito.error
common-lisp
.
col-type-required
(condition).
connection-not-established
(condition).
invalid-definition
(condition).
mito-error
(condition).
no-primary-keys
(condition).
mito.util
common-lisp
.
contains-class-or-subclasses
(function).
ensure-class
(function).
execute-with-retry
(function).
group-by-plist
(function).
lispify
(function).
list-diff
(function).
symbol-name-literally
(function).
unlispify
(function).
with-prepared-query
(macro).
%list-diff
(function).
call-with-prepared-query
(function).
escaped-symbol-p
(function).
obsolete-prepared-statement-p
(function).
mito.db.postgres
common-lisp
.
mito.util
.
sxql
.
acquire-advisory-lock
(function).
column-definitions
(function).
last-insert-id
(function).
release-advisory-lock
(function).
table-indices
(function).
table-view-query
(function).
get-serial-keys
(function).
mito.db
common-lisp
.
*use-prepare-cached*
(special variable).
acquire-advisory-lock
(function).
column-definitions
(function).
execute-sql
(generic function).
last-insert-id
(function).
release-advisory-lock
(function).
retrieve-by-sql
(generic function).
table-exists-p
(function).
table-indices
(function).
table-view-query
(function).
array-convert-nulls-to-nils
(function).
list-convert-nulls-to-nils
(function).
mito.migration.table
common-lisp
.
sxql
.
*auto-migration-mode*
(special variable).
*migration-keep-temp-tables*
(special variable).
migrate-table
(generic function).
migration-expressions
(function).
migration-expressions-for-others
(function).
migration-expressions-for-sqlite3
(function).
slot-defaults
(function).
mito.migration.util
common-lisp
.
generate-advisory-lock-id
(function).
+migrator-salt+
(special variable).
ascii-string-to-octets
(function).
crc32
(function).
mito.migration.versions
common-lisp
.
sxql
.
all-migration-expressions
(function).
current-migration-version
(function).
generate-migrations
(function).
migrate
(function).
migration-status
(function).
update-migration-version
(function).
%migration-status
(function).
*advisory-lock-drivers*
(special variable).
all-dao-classes
(function).
generate-version
(function).
initialize-migrations-table
(function).
migration-file-version
(function).
migration-files
(function).
schema-migrations-table-definition
(function).
with-advisory-lock
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
SQLite3 migration creates temporary tables with pre-migration data. If this variable is T they won’t be deleted after migration.
Stream to output sql generated during migrations.
EXPERIMENTAL FEATURE: If this is T, Mito uses DBI:PREPARE-CACHED
to retrieve/execute SQLs instead of DBI:PREPARE. The default value is NIL.
Note that DBI:PREPARE-CACHED is added CL-DBI v0.9.5.
Return the name of the current connection, or the one given as argument.
Same as DBI:EXECUTE except will recreate a prepared statement when getting DBI:DBI-DATABASE-ERROR.
Compute differences two lists.
Note this can be applied for a list of string-designators.
string
)) ¶(eql :mysql)
) (col-type (eql :boolean)
) value) ¶(eql :mysql)
) (col-type (eql :datetime)
) (value timestamp
)) ¶(eql :datetime)
) (value timestamp
)) ¶(eql :date)
) (value timestamp
)) ¶(eql :timestamp)
) value) ¶(eql :timestamptz)
) value) ¶(eql :sqlite3)
) (col-type (eql :boolean)
) value) ¶(eql :postgres)
) (col-type (eql :boolean)
) value) ¶symbol
) &rest initargs) ¶dao-table-class
) &rest initargs) ¶dao-table-column-class
) value) ¶dao-table-column-class
) value) ¶dao-table-view
)) ¶automatically generated reader method
table-class
)) ¶cons
) value) ¶(eql :datetime)
) value) ¶(eql :date)
) value) ¶(eql :timestamp)
) value) ¶(eql :timestamptz)
) value) ¶symbol
) &rest fields-and-values) ¶dao-table-class
) &rest fields-and-values) ¶table-column-class
)) ¶table-column-class
)) ¶Option to specify slots as ghost slots. Ghost slots do not depend on a database.
cons
) value) ¶(eql :datetime)
) value) ¶(eql :date)
) value) ¶(eql :timestamp)
) value) ¶(eql :timestamptz)
) value) ¶(eql :time)
) value) ¶(eql :boolean)
) value) ¶symbol
) &rest initargs) ¶table-class
) &rest initargs) ¶symbol
)) ¶dao-table-class
)) ¶record-timestamps-mixin
)) ¶automatically generated reader method
record-timestamps-mixin
)) ¶automatically generated writer method
serial-pk-mixin
)) ¶uuid-pk-mixin
)) ¶serial-pk-mixin
)) ¶uuid-pk-mixin
)) ¶record-timestamps-mixin
)) ¶automatically generated reader method
record-timestamps-mixin
)) ¶automatically generated writer method
table-column-class
)) ¶automatically generated reader method
table-column-class
)) ¶automatically generated writer method
string
) &key binds) ¶sql-statement
) &key binds) ¶composed-statement
) &key binds) ¶conjunctive-op
) &key binds) ¶Similar to table-column-info except the return value is for sxql:make-create-table.
(eql :mysql)
)) ¶(eql :sqlite3)
)) ¶(eql :postgres)
)) ¶table-column-class
)) ¶table-column-class
)) ¶table-column-class
)) ¶automatically generated reader method
table-column-class
)) ¶table-column-class
)) ¶dao-table-class
) &key if-not-exists &allow-other-keys) ¶symbol
) &rest args &key if-not-exists or-replace) ¶dao-table-view
) &key or-replace &allow-other-keys) ¶table-class
)) ¶table-class
)) ¶table-class
)) ¶dao-table-mixin
) &key) ¶sb-mop
.
table-class
) &key &allow-other-keys) ¶sb-mop
.
dao-table-view
) &key) ¶sb-mop
.
dao-table-class
) &key) ¶sb-mop
.
dao-table-class
) name &rest keys &key direct-superclasses &allow-other-keys) ¶sb-mop
.
dao-table-mixin
) &rest initargs &key conc-name &allow-other-keys) ¶dao-table-column-class
) &rest rest-initargs &key name readers writers inflate deflate &allow-other-keys) ¶table-class
) &rest initargs) ¶table-column-class
) &rest rest-initargs &key name initargs ghost &allow-other-keys) ¶dao-table-class
) &rest initargs) ¶dao-table-class
) &rest initargs &key direct-superclasses &allow-other-keys) ¶dao-table-mixin
) &rest initargs &key conc-name &allow-other-keys) ¶table-class
) &rest initargs) ¶dao-table-class
) &rest initargs) ¶dao-table-class
) &rest initargs &key direct-superclasses &allow-other-keys) ¶table-class
) (super standard-class
)) ¶sb-mop
.
drop-sequence
)) ¶sxql.sql-type
.
create-sequence
)) ¶sxql.sql-type
.
create-view
)) ¶sxql.sql-type
.
:slot
error
.
:table
boolean
(error ":as query is required for dao-table-view")
:as
This slot is read-only.
:id
standard-direct-slot-definition
.
(or symbol cons null)
:col-type
mito.class.column::references
:references
This slot is read-only.
boolean
:primary-key
Option to specify slots as ghost slots. Ghost slots do not depend on a database.
boolean
:ghost
(mito.dao.mixin::generate-uuid)
:id
name
.
as
.
name
.
name
.
Expand relational columns if the operator is :=, :!= , :in or :not-in.
name
.
serial-pk-mixin
)) ¶automatically generated reader method
id
.
serial-pk-mixin
)) ¶automatically generated writer method
id
.
uuid-pk-mixin
)) ¶automatically generated reader method
id
.
uuid-pk-mixin
)) ¶automatically generated writer method
id
.
table-column-class
)) ¶automatically generated reader method
table-column-class
)) ¶automatically generated writer method
expression-clause
.
sxql.sql-type
.
string
"set default"
Jump to: | %
(
A C D E F G I L M O P R S T U V W Y |
---|
Jump to: | %
(
A C D E F G I L M O P R S T U V W Y |
---|
Jump to: | *
+
A C D G I K N O P R S T U V |
---|
Jump to: | *
+
A C D G I K N O P R S T U V |
---|
Jump to: | C D E F I L M N P R S T U V |
---|
Jump to: | C D E F I L M N P R S T U V |
---|