This is the clsql-orm Reference Manual, version 0.2.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:47:57 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
clsql-orm
0.2.1
clsql
(system).
cl-ppcre
(system).
cl-interpol
(system).
cl-inflector
(system).
symbol-munger
(system).
iterate
(system).
package.lisp
(file).
sqlite3.lisp
(file).
mysql.lisp
(file).
main.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
clsql-orm/clsql-orm.asd
clsql-orm/package.lisp
clsql-orm/sqlite3.lisp
clsql-orm/mysql.lisp
clsql-orm/main.lisp
clsql-orm/sqlite3.lisp
package.lisp
(file).
clsql-orm
(system).
sqlite3-column-def
(function).
sqlite3-list-columns
(function).
sqlite3-list-tables
(function).
clsql-orm/mysql.lisp
sqlite3.lisp
(file).
clsql-orm
(system).
mysql-list-columns-sql
(function).
clsql-orm/main.lisp
mysql.lisp
(file).
clsql-orm
(system).
clsql-join-definition
(generic function).
col-length
(reader method).
(setf col-length)
(writer method).
col-spec-eql
(function).
col=
(function).
column
(reader method).
column
(reader method).
(setf column)
(writer method).
(setf column)
(writer method).
column-def
(function).
column-def
(class).
column-diff
(function).
column-name=
(function).
db-type
(reader method).
(setf db-type)
(writer method).
gen-view-class
(function).
gen-view-classes
(function).
is-null
(reader method).
(setf is-null)
(writer method).
list-columns
(function).
list-tables
(function).
print-object
(method).
scale
(reader method).
(setf scale)
(writer method).
spec-type
(reader method).
(setf spec-type)
(writer method).
%tables-to-generate
(function).
*db-model-package*
(special variable).
*export-symbols*
(special variable).
*schema*
(special variable).
*singularize*
(special variable).
accessor-name-for-column
(function).
awhen
(macro).
clsql-column-definitions
(function).
clsql-join-column-name
(function).
clsql-reverse-join-definition
(function).
clsql-reverse-join-definitions
(function).
clsql-type-for-db-type
(function).
constraints
(reader method).
(setf constraints)
(writer method).
default
(reader method).
default
(reader method).
(setf default)
(writer method).
(setf default)
(writer method).
default-list-columns
(function).
default-list-columns-lesser-sql
(function).
default-list-columns-sql
(function).
ensure-list
(function).
ensure-strings
(macro).
fkey-col
(reader method).
(setf fkey-col)
(writer method).
fkey-schema
(reader method).
(setf fkey-schema)
(writer method).
fkey-table
(reader method).
(setf fkey-table)
(writer method).
identity-column-p
(function).
intern-normalize-for-lisp
(function).
internup
(function).
list-reverse-join-columns
(function).
normalize-for-sql
(function).
nullable-column-with-default
(condition).
pg-sequence-name
(function).
schema
(reader method).
schema
(reader method).
(setf schema)
(writer method).
(setf schema)
(writer method).
singular-intern-normalize-for-lisp
(function).
table
(reader method).
table
(reader method).
(setf table)
(writer method).
(setf table)
(writer method).
type-of-db
(function).
Packages are listed by definition order.
clsql-orm
This package provides methods to introspect a database
Providing features such as generating a CLSQL class based on a table name
clsql
.
common-lisp
.
iterate
.
clsql-join-definition
(generic function).
col-length
(generic reader).
(setf col-length)
(generic writer).
col-spec-eql
(function).
col=
(function).
column
(generic reader).
(setf column)
(generic writer).
column-def
(function).
column-def
(class).
column-diff
(function).
column-name=
(function).
db-type
(generic reader).
(setf db-type)
(generic writer).
gen-view-class
(function).
gen-view-classes
(function).
is-null
(generic reader).
(setf is-null)
(generic writer).
list-columns
(function).
list-tables
(function).
scale
(generic reader).
(setf scale)
(generic writer).
spec-type
(generic reader).
(setf spec-type)
(generic writer).
%tables-to-generate
(function).
*db-model-package*
(special variable).
*export-symbols*
(special variable).
*schema*
(special variable).
*singularize*
(special variable).
accessor-name-for-column
(function).
awhen
(macro).
clsql-column-definitions
(function).
clsql-join-column-name
(function).
clsql-reverse-join-definition
(function).
clsql-reverse-join-definitions
(function).
clsql-type-for-db-type
(function).
constraints
(generic reader).
(setf constraints)
(generic writer).
default
(generic reader).
(setf default)
(generic writer).
default-list-columns
(function).
default-list-columns-lesser-sql
(function).
default-list-columns-sql
(function).
ensure-list
(function).
ensure-strings
(macro).
fkey-col
(generic reader).
(setf fkey-col)
(generic writer).
fkey-schema
(generic reader).
(setf fkey-schema)
(generic writer).
fkey-table
(generic reader).
(setf fkey-table)
(generic writer).
identity-column-p
(function).
intern-normalize-for-lisp
(function).
internup
(function).
list-reverse-join-columns
(function).
mysql-list-columns-sql
(function).
normalize-for-sql
(function).
nullable-column-with-default
(condition).
pg-sequence-name
(function).
schema
(generic reader).
(setf schema)
(generic writer).
singular-intern-normalize-for-lisp
(function).
sqlite3-column-def
(function).
sqlite3-list-columns
(function).
sqlite3-list-tables
(function).
table
(generic reader).
(setf table)
(generic writer).
type-of-db
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Generate a view class for clsql, given a table
If you want to name the class differently from the table, use the :classname keyword.
If you do not want to generate join information for the class, do :generate-joins nil
Note: if you specify a classname, join generation to this table won’t work properly, as it depends on
table names and class names being the same.
The join slots/accessors will be named [home key]-[target table]. If you want to have your own naming conventions, it’s best to define a class that inherits from your generated class.
This is the function most people will use to generate table classes. It uses gen-view-class.
This function will operate on the default clsql database
Creates the definition for the joins. Note that this does not handle multi-column foreign keys at the moment. For that matter, if you wish to have custom names and the like, you’d best define an inheriting class
column-def
)) ¶automatically generated reader method
column-def
)) ¶automatically generated writer method
nullable-column-with-default
)) ¶column-def
)) ¶automatically generated reader method
nullable-column-with-default
)) ¶column-def
)) ¶automatically generated writer method
column-def
)) ¶automatically generated reader method
column-def
)) ¶automatically generated writer method
column-def
)) ¶automatically generated reader method
column-def
)) ¶automatically generated writer method
column-def
)) ¶automatically generated reader method
column-def
)) ¶automatically generated writer method
column-def
)) ¶column-def
)) ¶the original database type rather than its clsql/lisp keyword
column-def
) s) ¶Print the database object, and a couple of the most common identity slots.
(setf col-length)
.
col-length
.
(setf column)
.
column
.
(setf constraints)
.
constraints
.
(setf db-type)
.
db-type
.
(setf default)
.
default
.
(setf fkey-col)
.
fkey-col
.
(setf fkey-schema)
.
fkey-schema
.
(setf fkey-table)
.
fkey-table
.
(setf is-null)
.
is-null
.
print-object
.
(setf scale)
.
scale
.
(setf schema)
.
schema
.
(setf spec-type)
.
spec-type
.
(setf table)
.
table
.
clsql-orm::*schema*
:schema
:table
:column
:db-type
the original database type rather than its clsql/lisp keyword
:spec-type
:col-length
:scale
:is-null
:default
:constraints
:fkey-schema
:fkey-table
:fkey-col
Should we export every symbol we intern?
Should we try to singularize table names
For each user column, find out if it’s a primary key, constrain it to not null if necessary, translate its type, and declare an initarg
Given a postgres type and a modifier, return the clsql type
Returns a list of
#(column type length is-null default (key-types) fkey-table fkey-col)
for the user columns of table.
Do not confuse a table with the clsql class of a table - this needs the actual table name.
User columns are those columns which the user defines. Others are defined for various reasons. OID is often
one of these.
A fallback sql for databases whose information_schema is lacking (previously mysql, but perhaps others)
a function that can determine if a key column is IDENTITY for sqlserver
Interns a string after uppercasing and flipping underscores to hyphens
Interns a string after uppercasing and flipping underscores to hyphens
Returns the underlying db type for the dynamic connection
column-def
)) ¶automatically generated reader method
column-def
)) ¶automatically generated writer method
nullable-column-with-default
)) ¶column-def
)) ¶automatically generated reader method
nullable-column-with-default
)) ¶column-def
)) ¶automatically generated writer method
column-def
)) ¶automatically generated reader method
column-def
)) ¶automatically generated writer method
column-def
)) ¶automatically generated reader method
column-def
)) ¶automatically generated writer method
column-def
)) ¶automatically generated reader method
column-def
)) ¶automatically generated writer method
nullable-column-with-default
)) ¶column-def
)) ¶automatically generated reader method
nullable-column-with-default
)) ¶column-def
)) ¶automatically generated writer method
nullable-column-with-default
)) ¶column-def
)) ¶automatically generated reader method
nullable-column-with-default
)) ¶column-def
)) ¶automatically generated writer method
warning
.
(quote nil)
:schema
(quote nil)
:table
(quote nil)
:column
(quote nil)
:default
Jump to: | %
(
A C D E F G I L M N P S T |
---|
Jump to: | %
(
A C D E F G I L M N P S T |
---|
Jump to: | *
C D F I S T |
---|
Jump to: | *
C D F I S T |
---|
Jump to: | C F M N P S |
---|
Jump to: | C F M N P S |
---|