This is the clsql Reference Manual, version 6.4, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:42:46 2024 GMT+0.
clsql/clsql.asd
clsql/sql/base/cmucl-compat.lisp
clsql/sql/base/package.lisp
clsql/sql/base/kmr-mop.lisp
clsql/sql/base/base-classes.lisp
clsql/sql/base/conditions.lisp
clsql/sql/base/db-interface.lisp
clsql/sql/base/decimals.lisp
clsql/sql/base/utils.lisp
clsql/sql/base/time.lisp
clsql/sql/base/generics.lisp
clsql/sql/database/initialize.lisp
clsql/sql/database/database.lisp
clsql/sql/database/recording.lisp
clsql/sql/database/pool.lisp
clsql/sql/syntax/expressions.lisp
clsql/sql/syntax/operations.lisp
clsql/sql/syntax/syntax.lisp
clsql/sql/functional/fdml.lisp
clsql/sql/functional/transaction.lisp
clsql/sql/functional/loop-extension.lisp
clsql/sql/functional/fddl.lisp
clsql/sql/object/metaclasses.lisp
clsql/sql/object/ooddl.lisp
clsql/sql/object/oodml.lisp
clsql/sql/generic/generic-postgresql.lisp
clsql/sql/generic/generic-odbc.lisp
clsql/sql/generic/sequences.lisp
clsql/sql/generic/command-object.lisp
The main system appears first, followed by any subsystem dependency.
clsql
Common Lisp SQL Interface library
Kevin M. Rosenberg <kmr@debian.org>
Kevin Rosenberg <kevin@rosenberg.net>
Lessor Lisp General Public License
A Common Lisp interface to SQL RDBMS based on
the Xanalys CommonSQL interface for Lispworks. It provides low-level
database interfaces as well as a functional and an object
oriented interface.
6.4
sql
(module).
Modules are listed depth-first from the system components tree.
clsql/sql
clsql/sql/base
clsql/sql/database
clsql/sql/syntax
clsql/sql/functional
clsql/sql/object
clsql/sql/generic
clsql/sql/base
sql
(module).
cmucl-compat.lisp
(file).
package.lisp
(file).
kmr-mop.lisp
(file).
base-classes.lisp
(file).
conditions.lisp
(file).
db-interface.lisp
(file).
decimals.lisp
(file).
utils.lisp
(file).
time.lisp
(file).
generics.lisp
(file).
clsql/sql/database
base
(module).
sql
(module).
initialize.lisp
(file).
database.lisp
(file).
recording.lisp
(file).
pool.lisp
(file).
clsql/sql/syntax
database
(module).
sql
(module).
expressions.lisp
(file).
operations.lisp
(file).
syntax.lisp
(file).
clsql/sql/functional
syntax
(module).
sql
(module).
fdml.lisp
(file).
transaction.lisp
(file).
loop-extension.lisp
(file).
fddl.lisp
(file).
clsql/sql/object
functional
(module).
sql
(module).
metaclasses.lisp
(file).
ooddl.lisp
(file).
oodml.lisp
(file).
clsql/sql/generic
functional
(module).
sql
(module).
generic-postgresql.lisp
(file).
generic-odbc.lisp
(file).
sequences.lisp
(file).
command-object.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
clsql/clsql.asd
clsql/sql/base/cmucl-compat.lisp
clsql/sql/base/package.lisp
clsql/sql/base/kmr-mop.lisp
clsql/sql/base/base-classes.lisp
clsql/sql/base/conditions.lisp
clsql/sql/base/db-interface.lisp
clsql/sql/base/decimals.lisp
clsql/sql/base/utils.lisp
clsql/sql/base/time.lisp
clsql/sql/base/generics.lisp
clsql/sql/database/initialize.lisp
clsql/sql/database/database.lisp
clsql/sql/database/recording.lisp
clsql/sql/database/pool.lisp
clsql/sql/syntax/expressions.lisp
clsql/sql/syntax/operations.lisp
clsql/sql/syntax/syntax.lisp
clsql/sql/functional/fdml.lisp
clsql/sql/functional/transaction.lisp
clsql/sql/functional/loop-extension.lisp
clsql/sql/functional/fddl.lisp
clsql/sql/object/metaclasses.lisp
clsql/sql/object/ooddl.lisp
clsql/sql/object/oodml.lisp
clsql/sql/generic/generic-postgresql.lisp
clsql/sql/generic/generic-odbc.lisp
clsql/sql/generic/sequences.lisp
clsql/sql/generic/command-object.lisp
clsql/sql/base/cmucl-compat.lisp
base
(module).
make-sequence-of-type
(function).
required-argument
(function).
result-type-or-lose
(function).
shrink-vector
(macro).
clsql/sql/base/kmr-mop.lisp
package.lisp
(file).
base
(module).
%slot-order-test-class
(class).
%svuc-slot-name
(function).
%svuc-slot-object
(function).
find-slot-by-name
(function).
find-slot-if
(function).
ordered-class-direct-slots
(function).
ordered-class-slots
(function).
process-class-option
(macro).
process-slot-option
(macro).
clsql/sql/base/base-classes.lisp
package.lisp
(file).
base
(module).
attribute-cache
(reader method).
(setf attribute-cache)
(writer method).
command-recording-stream
(reader method).
(setf command-recording-stream)
(writer method).
conn-pool
(reader method).
(setf conn-pool)
(writer method).
connection-spec
(reader method).
database
(class).
database-autocommit
(reader method).
(setf database-autocommit)
(writer method).
database-name
(reader method).
database-state
(reader method).
database-type
(reader method).
print-object
(method).
record-caches
(reader method).
(setf record-caches)
(writer method).
result-recording-stream
(reader method).
(setf result-recording-stream)
(writer method).
transaction
(reader method).
(setf transaction)
(writer method).
transaction-level
(reader method).
(setf transaction-level)
(writer method).
database-view-classes
(reader method).
(setf database-view-classes)
(writer method).
clsql/sql/base/conditions.lisp
base-classes.lisp
(file).
base
(module).
*backend-warning-behavior*
(special variable).
database
(reader method).
(setf database)
(writer method).
sql-condition
(condition).
sql-connection-error
(condition).
sql-database-data-error
(condition).
sql-database-error
(condition).
sql-database-warning
(condition).
sql-error
(condition).
sql-error-connection-spec
(reader method).
sql-error-database
(reader method).
sql-error-database-message
(reader method).
sql-error-database-type
(reader method).
sql-error-error-id
(reader method).
sql-error-expression
(reader method).
sql-error-secondary-error-id
(reader method).
sql-fatal-error
(condition).
sql-temporary-error
(condition).
sql-timeout-error
(condition).
sql-user-error
(condition).
sql-user-error-message
(reader method).
sql-warning
(condition).
sql-warning-database
(reader method).
database-too-strange
(condition).
error-converting-value
(function).
expected-type
(reader method).
(setf expected-type)
(writer method).
maybe-error-converting-value
(function).
signal-closed-database-error
(function).
signal-database-too-strange
(function).
signal-no-database-error
(function).
sql-value-conversion-error
(condition).
sql-warning-message
(reader method).
value
(reader method).
(setf value)
(writer method).
clsql/sql/base/db-interface.lisp
conditions.lisp
(file).
base
(module).
*foreign-library-search-paths*
(special variable).
database-acquire-from-conn-pool
(generic function).
database-attribute-type
(generic function).
database-bind-parameter
(generic function).
database-connect
(generic function).
database-create
(generic function).
database-create-large-object
(generic function).
database-create-sequence
(generic function).
database-delete-large-object
(generic function).
database-destroy
(generic function).
database-disconnect
(generic function).
database-drop-sequence
(generic function).
database-dump-result-set
(generic function).
database-execute-command
(generic function).
database-free-prepared
(generic function).
database-get-type-specifier
(generic function).
database-initialize-database-type
(generic function).
database-list
(generic function).
database-list-attributes
(generic function).
database-list-indexes
(generic function).
database-list-sequences
(generic function).
database-list-table-indexes
(generic function).
database-list-tables
(generic function).
database-list-tables-and-sequences
(generic function).
database-list-views
(generic function).
database-name-from-spec
(generic function).
database-prepare
(generic function).
database-probe
(generic function).
database-query
(generic function).
database-query-result-set
(generic function).
database-read-large-object
(generic function).
database-reconnect
(generic function).
database-release-to-conn-pool
(generic function).
database-run-prepared
(generic function).
database-sequence-last
(generic function).
database-sequence-next
(generic function).
database-set-sequence-position
(generic function).
database-store-next-row
(generic function).
database-type-library-loaded
(generic function).
database-type-load-foreign
(generic function).
database-underlying-type
(generic function).
database-write-large-object
(generic function).
db-backend-has-create/destroy-db?
(generic function).
db-type-default-case
(generic function).
db-type-has-auto-increment?
(generic function).
db-type-has-bigint?
(generic function).
db-type-has-boolean-where?
(generic function).
db-type-has-except?
(generic function).
db-type-has-fancy-math?
(generic function).
db-type-has-intersect?
(generic function).
db-type-has-prepared-stmt?
(generic function).
db-type-has-subqueries?
(generic function).
db-type-has-union?
(generic function).
db-type-has-views?
(generic function).
db-type-transaction-capable?
(generic function).
db-type-use-column-on-drop-index?
(generic function).
db-type-use-fully-qualified-column-on-drop-index?
(generic function).
push-library-path
(function).
database-abort-transaction
(generic function).
database-add-attribute
(generic function).
database-commit-transaction
(generic function).
database-last-autoincrement-id
(generic function).
database-rename-attribute
(generic function).
database-start-transaction
(generic function).
database-truncate
(generic function).
oid
(generic function).
clsql/sql/base/decimals.lisp
package.lisp
(file).
db-interface.lisp
(file).
base
(module).
decimal-parse-error
(condition).
define-decimal-formatter
(macro).
format-decimal-number
(function).
parse-decimal-number
(function).
round-half-away-from-zero
(function).
decimal-round-split
(function).
divide-into-groups
(function).
number-string-to-fractional
(function).
number-string-to-integer
(function).
string-align
(function).
clsql/sql/base/utils.lisp
package.lisp
(file).
db-interface.lisp
(file).
base
(module).
command-output
(function).
convert-to-db-default-case
(function).
ensure-keyword
(function).
float-to-sql-string
(function).
getenv
(function).
in
(macro).
make-process-lock
(function).
number-to-sql-string
(function).
sql-escape
(function).
sql-escape-quotes
(function).
symbol-name-default-case
(function).
with-process-lock
(macro).
without-interrupts
(macro).
%command-output
(function).
%get-int
(function).
+whitespace-chars+
(special variable).
defaulting
(macro).
delimited-string-to-list
(function).
delist-if-single
(function).
dequote
(function).
easy-slot-value
(function).
(setf easy-slot-value)
(function).
filter-plist
(function).
make-weak-hash-table
(macro).
pop-n
(macro).
position-char
(function).
read-decimal-value
(function).
read-stream-to-string
(function).
replace-all
(function).
replaced-string-length
(function).
string-to-list-connection-spec
(function).
substitute-char-string
(function).
substitute-chars-strings
(function).
substitute-string-for-char
(function).
to-class
(function).
to-class-name
(function).
to-slot-name
(function).
clsql/sql/base/time.lisp
package.lisp
(file).
conditions.lisp
(file).
utils.lisp
(file).
base
(module).
bad-component
(reader method).
current-day
(function).
current-month
(function).
current-year
(function).
date
(structure).
date+
(function).
date-
(function).
date-compare
(function).
date-difference
(function).
date-dow
(function).
date-element
(function).
date-max
(function).
date-min
(function).
date-mjd
(reader).
(setf date-mjd)
(writer).
date-p
(function).
date-ymd
(function).
date<
(function).
date<=
(function).
date=
(function).
date>
(function).
date>=
(function).
db-datestring
(function).
db-timestring
(function).
decode-date
(function).
decode-time
(function).
duration
(structure).
duration+
(function).
duration-day
(reader).
(setf duration-day)
(writer).
duration-hour
(reader).
(setf duration-hour)
(writer).
duration-minute
(reader).
(setf duration-minute)
(writer).
duration-month
(reader).
(setf duration-month)
(writer).
duration-reduce
(function).
duration-second
(reader).
(setf duration-second)
(writer).
duration-timestring
(function).
duration-year
(reader).
(setf duration-year)
(writer).
duration<
(function).
duration<=
(function).
duration=
(function).
duration>
(function).
duration>=
(function).
extract-roman
(function).
format-date
(function).
format-duration
(function).
format-time
(function).
get-date
(function).
get-time
(function).
gregorian-to-mjd
(function).
interval-clear
(function).
interval-contained
(reader).
(setf interval-contained)
(writer).
interval-data
(reader).
(setf interval-data)
(writer).
interval-edit
(function).
interval-end
(reader).
(setf interval-end)
(writer).
interval-match
(function).
interval-push
(function).
interval-relation
(function).
interval-start
(reader).
(setf interval-start)
(writer).
interval-type
(reader).
(setf interval-type)
(writer).
iso-timestring
(function).
make-date
(function).
make-duration
(function).
make-interval
(function).
make-time
(function).
merged-time
(function).
midnight
(generic function).
mjd-to-gregorian
(function).
month-name
(function).
parse-date-time
(function).
parse-datestring
(function).
parse-timestring
(function).
parse-yearstring
(function).
print-date
(function).
print-object
(method).
print-object
(method).
print-object
(method).
roll
(function).
roll-to
(function).
time+
(function).
time-
(function).
time-compare
(function).
time-difference
(function).
time-dow
(function).
time-element
(function).
time-max
(function).
time-min
(function).
time-mjd
(reader).
(setf time-mjd)
(writer).
time-ymd
(function).
time<
(function).
time<=
(function).
time=
(function).
time>
(function).
time>=
(function).
utime->time
(function).
wall-time
(structure).
week-containing
(function).
%make-date
(function).
%make-duration
(function).
%make-wall-time
(function).
%print-date
(function).
%print-duration
(function).
%print-wall-time
(function).
%time<
(function).
%time<=
(function).
%time=
(function).
%time>
(function).
%time>=
(function).
*day-keywords*
(special variable).
*day-names*
(special variable).
*iso-8601-duration-delimiters*
(special variable).
*month-keywords*
(special variable).
*month-names*
(special variable).
*roman-digits*
(special variable).
copy-date
(function).
copy-duration
(function).
copy-interval
(function).
copy-time
(function).
copy-wall-time
(function).
date->time
(function).
date/=
(function).
day-name
(function).
day-of-year
(function).
days-in-month
(function).
delete-at-index
(function).
duration-
(function).
duration-p
(function).
duration-usec
(reader).
(setf duration-usec)
(writer).
hork-integers
(function).
insert-at-index
(function).
interval
(structure).
interval-name
(reader).
(setf interval-name)
(writer).
interval-p
(function).
iso-8601-delimiter
(function).
iso-8601-duration-subseq
(function).
iso-8601-syntax-error
(condition).
iso-datestring
(function).
leap-days-in-days
(function).
leap-year?
(function).
ordinal-day
(function).
ordinal-month
(function).
parse-integer-insensitively
(function).
parse-iso-8601-duration
(function).
parse-iso-8601-time
(function).
pretty-time
(function).
replace-at-index
(function).
replace-string
(function).
restrict-intervals
(function).
sort-interval-list
(function).
syntax-parse-iso-8601
(function).
time->date
(function).
time-hms
(function).
time-meridian
(function).
time-second
(reader).
(setf time-second)
(writer).
time-usec
(reader).
(setf time-usec)
(writer).
time/=
(function).
to-string
(generic function).
valid-gregorian-date-p
(function).
valid-month-p
(function).
wall-time-p
(function).
wrap-time-for-date
(macro).
clsql/sql/base/generics.lisp
package.lisp
(file).
base
(module).
database-last-auto-increment-id
(generic function).
database-output-sql-as-type
(generic function).
delete-instance-records
(generic function).
execute-command
(generic function).
filter-select-list
(generic function).
instance-refreshed
(generic function).
query
(generic function).
read-sql-value
(generic function).
update-instance-from-records
(generic function).
update-record-from-slot
(generic function).
update-record-from-slots
(generic function).
update-records-from-instance
(generic function).
update-slot-from-record
(generic function).
%install-class
(generic function).
auto-increment-sequence-name
(generic function).
choose-database-for-instance
(generic function).
collect-table-refs
(generic function).
database-add-autoincrement-sequence
(generic function).
database-constraint-statement
(generic function).
database-generate-column-definition
(generic function).
database-output-sql
(generic function).
database-pkey-constraint
(generic function).
database-remove-autoincrement-sequence
(generic function).
database-translate-constraint
(generic function).
get-slot-values-from-view
(generic function).
key-value-from-db
(generic function).
output-sql
(generic function).
output-sql-hash-key
(generic function).
update-slot-from-db
(generic function).
update-slot-with-null
(generic function).
view-classes-and-storable-slots
(generic function).
clsql/sql/database/initialize.lisp
database
(module).
*default-database-type*
(special variable).
*initialized-database-types*
(special variable).
*loaded-database-types*
(special variable).
database-type-load-foreign
(method).
database-type-load-foreign
(method).
initialize-database-type
(function).
reload-database-types
(function).
clsql/sql/database/database.lisp
initialize.lisp
(file).
database
(module).
*connect-if-exists*
(special variable).
*default-database*
(special variable).
check-connection-spec
(macro).
connect
(function).
connected-databases
(function).
create-database
(function).
destroy-database
(function).
disconnect
(function).
encoding
(function).
(setf encoding)
(function).
find-database
(function).
is-database-open
(function).
list-databases
(function).
probe-database
(function).
reconnect
(function).
status
(function).
with-database
(macro).
with-default-database
(macro).
*connected-databases*
(special variable).
*default-encoding*
(special variable).
clsql/sql/database/recording.lisp
database.lisp
(file).
database
(module).
add-sql-stream
(function).
delete-sql-stream
(function).
list-sql-streams
(function).
sql-recording-p
(function).
sql-stream
(function).
start-sql-recording
(function).
stop-sql-recording
(function).
record-sql-command
(function).
record-sql-result
(function).
clsql/sql/database/pool.lisp
database.lisp
(file).
database
(module).
*db-pool-max-free-connections*
(special variable).
conn-pool
(class).
connection-spec
(reader method).
(setf connection-spec)
(writer method).
database-acquire-from-conn-pool
(method).
database-release-to-conn-pool
(method).
disconnect-pooled
(function).
%pool-force-disconnect
(function).
*db-pool*
(special variable).
*db-pool-lock*
(special variable).
acquire-from-pool
(function).
all-connections
(reader method).
(setf all-connections)
(writer method).
clear-conn-pool
(function).
conn-pool-lock
(reader method).
(setf conn-pool-lock)
(writer method).
find-or-create-connection-pool
(function).
free-connections
(reader method).
(setf free-connections)
(writer method).
pool-database-type
(reader method).
(setf pool-database-type)
(writer method).
release-to-pool
(function).
clsql/sql/syntax/expressions.lisp
syntax
(module).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
print-object
(method).
print-object
(method).
sql
(class).
sql-assignment-exp
(class).
sql-between-exp
(class).
sql-function-exp
(class).
sql-ident
(class).
sql-ident-attribute
(class).
sql-ident-table
(class).
sql-object-query
(class).
sql-query
(class).
sql-query-modifier-exp
(class).
sql-relational-exp
(class).
sql-set-exp
(class).
sql-typecast-exp
(class).
sql-upcase-like
(class).
sql-value-exp
(class).
%clsql-subclauses
(function).
%database-identifier
(class).
%make-database-identifier
(function).
%sql-expression
(class).
%write-operator
(function).
*in-subselect*
(special variable).
*output-hash*
(special variable).
*select-arguments*
(special variable).
*sql-stream*
(special variable).
+auto-increment-names+
(special variable).
+empty-string+
(special variable).
+null-string+
(special variable).
clsql-and
(function).
clsql-ands
(function).
clsql-or
(function).
clsql-ors
(function).
collect-table-refs
(method).
collect-table-refs
(method).
collect-table-refs
(method).
collect-table-refs
(method).
collect-table-refs
(method).
collect-table-refs
(method).
collect-table-refs
(method).
collect-table-refs
(method).
collect-table-refs
(method).
collect-table-refs
(method).
combine-database-identifiers
(function).
database-constraint-statement
(method).
database-identifier
(method).
database-identifier-equal
(function).
database-output-sql
(method).
database-output-sql
(method).
database-output-sql
(method).
database-output-sql
(method).
database-output-sql
(method).
database-output-sql
(method).
database-output-sql
(method).
database-output-sql
(method).
database-output-sql
(method).
database-output-sql
(method).
database-translate-constraint
(method).
delistify-dsd
(function).
escaped
(method).
escaped
(reader method).
(setf escaped)
(writer method).
escaped-database-identifier
(function).
listify
(function).
make-constraints-description
(function).
make-query
(function).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql
(method).
output-sql-hash-key
(method).
output-sql-hash-key
(method).
output-sql-hash-key
(method).
output-sql-hash-key
(method).
output-sql-where-clause
(function).
query-arg-p
(function).
query-get-selections
(function).
special-cased-symbol-p
(function).
special-char-p
(function).
sql-create-table
(class).
sql-create-view
(class).
sql-delete
(class).
sql-escape-string-exp
(class).
sql-insert
(class).
sql-output
(function).
sql-update
(class).
unescaped
(method).
unescaped
(reader method).
(setf unescaped)
(writer method).
unescaped-database-identifier
(function).
clsql/sql/syntax/operations.lisp
expressions.lisp
(file).
syntax
(module).
sql-*
(function).
sql-+
(function).
sql--
(function).
sql-/
(function).
sql-<
(function).
sql-<=
(function).
sql-<>
(function).
sql-=
(function).
sql-==
(function).
sql->
(function).
sql->=
(function).
sql-all
(function).
sql-and
(function).
sql-any
(function).
sql-avg
(function).
sql-between
(function).
sql-coalesce
(function).
sql-concat
(function).
sql-concat-op
(function).
sql-count
(function).
sql-distinct
(function).
sql-except
(function).
sql-exists
(function).
sql-function
(function).
sql-group-by
(function).
sql-having
(function).
sql-in
(function).
sql-intersect
(function).
sql-is
(function).
sql-like
(function).
sql-limit
(function).
sql-max
(function).
sql-min
(function).
sql-minus
(function).
sql-not
(function).
sql-not-null
(function).
sql-null
(function).
sql-nvl
(function).
sql-or
(function).
sql-order-by
(function).
sql-query
(function).
sql-some
(function).
sql-substr
(function).
sql-substring
(function).
sql-sum
(function).
sql-the
(function).
sql-union
(function).
sql-uplike
(function).
sql-userenv
(function).
*sql-op-table*
(special variable).
defsql
(macro).
sql-e-string
(function).
sql-lower
(function).
sql-upper
(function).
clsql/sql/syntax/syntax.lisp
operations.lisp
(file).
syntax
(module).
disable-sql-reader-syntax
(macro).
enable-sql-reader-syntax
(macro).
file-enable-sql-reader-syntax
(macro).
locally-disable-sql-reader-syntax
(macro).
locally-enable-sql-reader-syntax
(macro).
restore-sql-reader-syntax-state
(macro).
sql
(function).
sql-expression
(function).
sql-operation
(function).
sql-operator
(function).
%disable-sql-reader-syntax
(function).
%enable-sql-reader-syntax
(function).
*original-readtable*
(special variable).
*restore-sql-reader-syntax*
(special variable).
*sql-macro-close-char*
(special variable).
*sql-macro-open-char*
(special variable).
generate-sql-reference
(function).
sql-reader-open
(function).
clsql/sql/functional/fdml.lisp
functional
(module).
bind-parameter
(function).
create-large-object
(function).
database-query-result-set
(method).
delete-large-object
(function).
delete-records
(function).
do-query
(macro).
execute-command
(method).
execute-command
(method).
free-prepared-sql
(function).
insert-records
(function).
map-query
(function).
prepare-sql
(function).
print-query
(function).
query
(method).
query
(method).
query
(method).
read-large-object
(function).
run-prepared-sql
(function).
update-records
(function).
write-large-object
(function).
attribute
(reader method).
(setf attribute)
(writer method).
attribute-value-pair
(class).
db-value
(reader method).
(setf db-value)
(writer method).
field-names
(function).
for-each-row
(macro).
from-names
(function).
lisp->sql-name
(function).
make-attribute-value-pair
(function).
make-sql-insert
(function).
map-query-for-effect
(function).
map-query-to-list
(function).
map-query-to-simple
(function).
order-by-strings
(function).
query-string
(function).
to-attributes-and-values
(function).
where-strings
(function).
clsql/sql/functional/transaction.lisp
fdml.lisp
(file).
functional
(module).
add-transaction-commit-hook
(function).
add-transaction-rollback-hook
(function).
commit
(function).
in-transaction-p
(function).
rollback
(function).
set-autocommit
(function).
start-transaction
(function).
transaction
(class).
with-transaction
(macro).
commit-hooks
(reader method).
(setf commit-hooks)
(writer method).
database-abort-transaction
(method).
database-commit-transaction
(method).
database-start-transaction
(method).
mark-transaction-committed
(function).
previous-autocommit
(reader method).
rollback-hooks
(reader method).
(setf rollback-hooks)
(writer method).
transaction-status
(reader method).
(setf transaction-status)
(writer method).
clsql/sql/functional/loop-extension.lisp
fdml.lisp
(file).
functional
(module).
loop-gentemp
(function).
loop-record-iteration-path
(function).
clsql/sql/functional/fddl.lisp
fdml.lisp
(file).
functional
(module).
*cache-table-queries-default*
(special variable).
attribute-type
(function).
cache-table-queries
(function).
create-index
(function).
create-sequence
(function).
create-table
(function).
create-view
(function).
drop-index
(function).
drop-sequence
(function).
drop-table
(function).
drop-view
(function).
index-exists-p
(function).
list-attribute-types
(function).
list-attributes
(function).
list-indexes
(function).
list-sequences
(function).
list-tables
(function).
list-views
(function).
sequence-exists-p
(function).
sequence-last
(function).
sequence-next
(function).
set-sequence-position
(function).
table-exists-p
(function).
truncate-database
(function).
view-exists-p
(function).
%table-exists-p
(method).
clsql/sql/object/metaclasses.lisp
object
(module).
compute-effective-slot-definition
(method).
compute-slots
(method).
direct-slot-definition-class
(method).
effective-slot-definition-class
(method).
finalize-inheritance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
reinitialize-instance
(method).
validate-superclass
(method).
view-table
(reader method).
(setf view-table)
(writer method).
%convert-db-info-to-hash
(function).
*db-info-lambda-list*
(special variable).
+extra-class-options+
(special variable).
+extra-slot-options+
(special variable).
base-db-class
(function).
compute-column-name
(function).
compute-lisp-type-from-specified-type
(function).
database-identifier
(method).
database-identifier
(method).
db-ancestors
(function).
delistify
(function).
describe-db-layout
(function).
direct-normalized-slot-p
(function).
find-standard-db-class
(function).
get-keywords
(function).
join-slot-class
(function).
join-slot-class-name
(function).
join-slot-info-value
(function).
join-slot-p
(function).
join-slot-retrieval-method
(function).
key-or-base-slot-p
(function).
key-slot-p
(function).
key-slots
(reader method).
(setf key-slots)
(writer method).
normalizedp
(reader method).
(setf normalizedp)
(writer method).
not-direct-normalized-slot-p
(function).
object-definition
(reader method).
(setf object-definition)
(writer method).
parse-db-info
(function).
register-metaclass
(function).
remove-keyword-arg
(function).
set-view-table-slot
(function).
slot-has-default-p
(function).
slotdef-for-slot-with-class
(function).
slotdefs-for-slots-with-class
(function).
slots-for-possibly-normalized-class
(function).
specified-type
(reader method).
(setf specified-type)
(writer method).
standard-db-class
(class).
table-name-from-arg
(function).
view-class-direct-slot-definition
(class).
view-class-effective-slot-definition
(class).
view-class-qualifier
(reader method).
(setf view-class-qualifier)
(writer method).
view-class-slot-autoincrement-sequence
(reader method).
(setf view-class-slot-autoincrement-sequence)
(writer method).
view-class-slot-column
(reader method).
(setf view-class-slot-column)
(writer method).
view-class-slot-db-constraints
(reader method).
(setf view-class-slot-db-constraints)
(writer method).
view-class-slot-db-info
(reader method).
(setf view-class-slot-db-info)
(writer method).
view-class-slot-db-kind
(reader method).
(setf view-class-slot-db-kind)
(writer method).
view-class-slot-db-reader
(reader method).
(setf view-class-slot-db-reader)
(writer method).
view-class-slot-db-type
(reader method).
(setf view-class-slot-db-type)
(writer method).
view-class-slot-db-writer
(reader method).
(setf view-class-slot-db-writer)
(writer method).
view-class-slot-definition-mixin
(class).
view-class-slot-void-value
(reader method).
(setf view-class-slot-void-value)
(writer method).
clsql/sql/object/ooddl.lisp
metaclasses.lisp
(file).
object
(module).
*db-auto-sync*
(special variable).
*default-string-length*
(special variable).
create-view-from-class
(function).
def-view-class
(macro).
drop-view-from-class
(function).
initialize-instance
(method).
list-classes
(function).
(setf slot-value-using-class)
(method).
slot-value-using-class
(method).
standard-db-object
(class).
%install-class
(method).
%uninstall-class
(function).
*db-deserializing*
(special variable).
*db-initializing*
(special variable).
auto-increment-column-p
(method).
database-generate-column-definition
(method).
database-pkey-constraint
(method).
keyslots-for-class
(function).
view-database
(reader method).
clsql/sql/object/oodml.lisp
ooddl.lisp
(file).
object
(module).
*default-caching*
(special variable).
*default-update-objects-max-len*
(special variable).
bigint
(type).
database-get-type-specifier
(method).
database-get-type-specifier
(method).
database-output-sql-as-type
(method).
delete-instance-records
(method).
filter-select-list
(method).
generalized-boolean
(type).
instance-refreshed
(method).
join-slots
(reader method).
(setf join-slots)
(writer method).
joins
(reader method).
(setf joins)
(writer method).
mediumint
(type).
read-instance-from-stream
(function).
read-sql-value
(method).
read-sql-value
(method).
select
(function).
select-list
(reader method).
(setf select-list)
(writer method).
select-list
(class).
slot-list
(reader method).
(setf slot-list)
(writer method).
smallint
(type).
sql-slot-value
(function).
sql-view-class
(function).
tinyint
(type).
universal-time
(type).
update-instance-from-records
(method).
update-objects-joins
(function).
update-record-from-slot
(method).
update-record-from-slots
(method).
update-records-from-instance
(method).
update-slot-from-record
(method).
varchar
(type).
view-table
(method).
view-table
(method).
write-instance-to-stream
(function).
%object-joins-from-list
(function).
%tables-for-query
(function).
%update-instance-helper
(method).
%update-objects-joins-slot-defs
(function).
+no-slot-value+
(special variable).
all-home-keys-have-values-p
(function).
all-immediate-join-classes-for
(function).
attribute-references
(method).
attribute-value-pairs
(method).
build-objects
(function).
check-slot-type
(function).
choose-database-for-instance
(method).
class-and-slots
(class).
compute-records-cache-key
(function).
db-value-from-slot
(function).
fault-join-slot
(function).
fault-join-slot-raw
(function).
fault-join-target-slot
(function).
find-all
(function).
find-normalized-key
(function).
full-select-list
(function).
generate-attribute-reference
(function).
get-join-slots
(function).
get-joined-objects
(function).
get-slot-value-from-record
(method).
get-slot-values-from-view
(method).
immediate-join-slots
(function).
join-qualifier
(function).
join-slot-qualifier
(function).
key-qualifier-for-instance
(function).
key-value-from-db
(method).
make-class-and-slots
(function).
make-select-list
(function).
normalized-key-value
(function).
primary-key-slot-values
(method).
print-readable-symbol
(function).
records-cache-results
(function).
(setf records-cache-results)
(function).
select-reference-equal
(function).
select-table-sql-expr
(method).
slot-defs
(reader method).
(setf slot-defs)
(writer method).
sql-table
(method).
update-auto-increments-keys
(function).
update-fault-join-normalized-slot
(function).
update-slot-default-values
(method).
update-slot-from-db-value
(method).
update-slot-with-null
(method).
view-class
(reader method).
view-class
(reader method).
(setf view-class)
(writer method).
(setf view-class)
(writer method).
view-classes-and-slots-by-name
(method).
view-classes-and-storable-slots
(method).
view-table-exp
(method).
view-table-exp
(method).
clsql/sql/generic/generic-postgresql.lisp
generic
(module).
database
(reader method).
database-attribute-type
(method).
database-bind-parameter
(method).
database-create-sequence
(method).
database-drop-sequence
(method).
database-get-type-specifier
(method).
database-last-auto-increment-id
(method).
database-list
(method).
database-list
(method).
database-list-attributes
(method).
database-list-indexes
(method).
database-list-sequences
(method).
database-list-table-indexes
(method).
database-list-tables
(method).
database-list-views
(method).
database-prepare
(method).
database-run-prepared
(method).
database-sequence-last
(method).
database-sequence-next
(method).
database-set-sequence-position
(method).
db-type-default-case
(method).
db-type-has-auto-increment?
(method).
db-type-has-fancy-math?
(method).
db-type-has-prepared-stmt?
(method).
db-type-has-prepared-stmt?
(method).
generic-postgresql-database
(class).
slot-unbound
(method).
*next-prepared-id-num*
(special variable).
auto-increment-sequence-name
(method).
binding-to-param
(function).
bindings
(reader method).
clsql-type->postgresql-type
(function).
database-add-autoincrement-sequence
(method).
database-generate-column-definition
(method).
database-list-objects-of-type
(function).
database-remove-autoincrement-sequence
(method).
has-table
(function).
has-table-pg_roles
(reader method).
id
(reader method).
next-prepared-id
(function).
owner-clause
(function).
postgresql-database-list
(function).
postgresql-stmt
(class).
prepared-sql-to-postgresql-sql
(function).
result-types
(reader method).
stmt-field-names
(reader method).
(setf stmt-field-names)
(writer method).
clsql/sql/generic/generic-odbc.lisp
generic
(module).
database-attribute-type
(method).
database-disconnect
(method).
database-dump-result-set
(method).
database-execute-command
(method).
database-get-type-specifier
(method).
database-last-auto-increment-id
(method).
database-list-attributes
(method).
database-list-tables
(method).
database-list-views
(method).
database-query
(method).
database-query-result-set
(method).
database-store-next-row
(method).
db-type-has-auto-increment?
(method).
db-type-has-boolean-where?
(method).
db-type-has-except?
(method).
db-type-has-intersect?
(method).
db-type-use-fully-qualified-column-on-drop-index?
(method).
generic-odbc-database
(class).
initialize-instance
(method).
%database-list-*
(function).
close-query-fn
(reader method).
copy-odbc-result-set
(function).
database-odbc-db-type
(reader method).
(setf database-odbc-db-type)
(writer method).
database-output-sql
(method).
dbi-package
(reader method).
disconnect-fn
(reader method).
fetch-row-fn
(reader method).
list-all-database-tables-fn
(reader method).
list-all-table-columns-fn
(reader method).
make-odbc-result-set
(function).
odbc-conn
(reader method).
(setf odbc-conn)
(writer method).
odbc-result-set
(structure).
odbc-result-set-full-set
(reader).
(setf odbc-result-set-full-set)
(writer).
odbc-result-set-p
(function).
odbc-result-set-query
(reader).
(setf odbc-result-set-query)
(writer).
odbc-result-set-types
(reader).
(setf odbc-result-set-types)
(writer).
sql-fn
(reader method).
clsql/sql/generic/sequences.lisp
generic
(module).
*old-sequence-names*
(special variable).
database-create-sequence
(method).
database-drop-sequence
(method).
database-list-sequences
(method).
database-sequence-last
(method).
database-sequence-next
(method).
database-set-sequence-position
(method).
%seq-name-key
(function).
%sequence-name-to-table
(function).
%table-name-to-sequence-name
(function).
generic-database
(class).
clsql/sql/generic/command-object.lisp
generic
(module).
command-object
(function).
command-object
(class).
expression
(reader method).
(setf expression)
(writer method).
has-been-prepared
(reader method).
(setf has-been-prepared)
(writer method).
initialize-instance
(method).
parameters
(reader method).
(setf parameters)
(writer method).
prepare-sql-parameter
(generic function).
prepared-name
(reader method).
(setf prepared-name)
(writer method).
reset-command-object
(function).
Packages are listed by definition order.
cmucl-compat
common-lisp
.
make-sequence-of-type
(function).
required-argument
(function).
result-type-or-lose
(function).
shrink-vector
(macro).
clsql-sys
This is the INTERNAL SQL-Interface package of CLSQL.
common-lisp
.
sb-mop
.
*backend-warning-behavior*
(special variable).
*cache-table-queries-default*
(special variable).
*connect-if-exists*
(special variable).
*db-auto-sync*
(special variable).
*db-pool-max-free-connections*
(special variable).
*default-caching*
(special variable).
*default-database*
(special variable).
*default-database-type*
(special variable).
*default-string-length*
(special variable).
*default-update-objects-max-len*
(special variable).
*foreign-library-search-paths*
(special variable).
*initialized-database-types*
(special variable).
*loaded-database-types*
(special variable).
*old-sequence-names*
(special variable).
add-sql-stream
(function).
add-transaction-commit-hook
(function).
add-transaction-rollback-hook
(function).
attribute-cache
(generic reader).
(setf attribute-cache)
(generic writer).
attribute-type
(function).
bad-component
(generic reader).
bigint
(type).
bind-parameter
(function).
cache-table-queries
(function).
check-connection-spec
(macro).
command-object
(function).
command-object
(class).
command-output
(function).
command-recording-stream
(generic reader).
(setf command-recording-stream)
(generic writer).
commit
(function).
conn-pool
(generic reader).
(setf conn-pool)
(generic writer).
conn-pool
(class).
connect
(function).
connected-databases
(function).
connection-spec
(generic reader).
(setf connection-spec)
(generic writer).
convert-to-db-default-case
(function).
create-database
(function).
create-index
(function).
create-large-object
(function).
create-sequence
(function).
create-table
(function).
create-view
(function).
create-view-from-class
(function).
current-day
(function).
current-month
(function).
current-year
(function).
database
(generic reader).
(setf database)
(generic writer).
database
(class).
database-acquire-from-conn-pool
(generic function).
database-attribute-type
(generic function).
database-autocommit
(generic reader).
(setf database-autocommit)
(generic writer).
database-bind-parameter
(generic function).
database-connect
(generic function).
database-create
(generic function).
database-create-large-object
(generic function).
database-create-sequence
(generic function).
database-delete-large-object
(generic function).
database-destroy
(generic function).
database-disconnect
(generic function).
database-drop-sequence
(generic function).
database-dump-result-set
(generic function).
database-execute-command
(generic function).
database-free-prepared
(generic function).
database-get-type-specifier
(generic function).
database-initialize-database-type
(generic function).
database-last-auto-increment-id
(generic function).
database-list
(generic function).
database-list-attributes
(generic function).
database-list-indexes
(generic function).
database-list-sequences
(generic function).
database-list-table-indexes
(generic function).
database-list-tables
(generic function).
database-list-tables-and-sequences
(generic function).
database-list-views
(generic function).
database-name
(generic reader).
database-name-from-spec
(generic function).
database-output-sql-as-type
(generic function).
database-prepare
(generic function).
database-probe
(generic function).
database-query
(generic function).
database-query-result-set
(generic function).
database-read-large-object
(generic function).
database-reconnect
(generic function).
database-release-to-conn-pool
(generic function).
database-run-prepared
(generic function).
database-sequence-last
(generic function).
database-sequence-next
(generic function).
database-set-sequence-position
(generic function).
database-state
(generic reader).
database-store-next-row
(generic function).
database-type
(generic reader).
database-type-library-loaded
(generic function).
database-type-load-foreign
(generic function).
database-underlying-type
(generic function).
database-write-large-object
(generic function).
date
(structure).
date+
(function).
date-
(function).
date-compare
(function).
date-difference
(function).
date-dow
(function).
date-element
(function).
date-max
(function).
date-min
(function).
date-mjd
(reader).
(setf date-mjd)
(writer).
date-p
(function).
date-ymd
(function).
date<
(function).
date<=
(function).
date=
(function).
date>
(function).
date>=
(function).
db-backend-has-create/destroy-db?
(generic function).
db-datestring
(function).
db-timestring
(function).
db-type-default-case
(generic function).
db-type-has-auto-increment?
(generic function).
db-type-has-bigint?
(generic function).
db-type-has-boolean-where?
(generic function).
db-type-has-except?
(generic function).
db-type-has-fancy-math?
(generic function).
db-type-has-intersect?
(generic function).
db-type-has-prepared-stmt?
(generic function).
db-type-has-subqueries?
(generic function).
db-type-has-union?
(generic function).
db-type-has-views?
(generic function).
db-type-transaction-capable?
(generic function).
db-type-use-column-on-drop-index?
(generic function).
db-type-use-fully-qualified-column-on-drop-index?
(generic function).
decode-date
(function).
decode-time
(function).
def-view-class
(macro).
delete-instance-records
(generic function).
delete-large-object
(function).
delete-records
(function).
delete-sql-stream
(function).
destroy-database
(function).
disable-sql-reader-syntax
(macro).
disconnect
(function).
disconnect-pooled
(function).
do-query
(macro).
drop-index
(function).
drop-sequence
(function).
drop-table
(function).
drop-view
(function).
drop-view-from-class
(function).
duration
(structure).
duration+
(function).
duration-day
(reader).
(setf duration-day)
(writer).
duration-hour
(reader).
(setf duration-hour)
(writer).
duration-minute
(reader).
(setf duration-minute)
(writer).
duration-month
(reader).
(setf duration-month)
(writer).
duration-reduce
(function).
duration-second
(reader).
(setf duration-second)
(writer).
duration-timestring
(function).
duration-year
(reader).
(setf duration-year)
(writer).
duration<
(function).
duration<=
(function).
duration=
(function).
duration>
(function).
duration>=
(function).
enable-sql-reader-syntax
(macro).
encoding
(function).
(setf encoding)
(function).
ensure-keyword
(function).
execute-command
(generic function).
expression
(generic reader).
(setf expression)
(generic writer).
extract-roman
(function).
file-enable-sql-reader-syntax
(macro).
filter-select-list
(generic function).
find-database
(function).
float-to-sql-string
(function).
format-date
(function).
format-duration
(function).
format-time
(function).
free-prepared-sql
(function).
generalized-boolean
(type).
generic-odbc-database
(class).
generic-postgresql-database
(class).
get-date
(function).
get-time
(function).
getenv
(function).
gregorian-to-mjd
(function).
has-been-prepared
(generic reader).
(setf has-been-prepared)
(generic writer).
in
(macro).
in-transaction-p
(function).
index-exists-p
(function).
initialize-database-type
(function).
insert-records
(function).
instance-refreshed
(generic function).
interval-clear
(function).
interval-contained
(reader).
(setf interval-contained)
(writer).
interval-data
(reader).
(setf interval-data)
(writer).
interval-edit
(function).
interval-end
(reader).
(setf interval-end)
(writer).
interval-match
(function).
interval-push
(function).
interval-relation
(function).
interval-start
(reader).
(setf interval-start)
(writer).
interval-type
(reader).
(setf interval-type)
(writer).
is-database-open
(function).
iso-timestring
(function).
join-slots
(generic reader).
(setf join-slots)
(generic writer).
joins
(generic reader).
(setf joins)
(generic writer).
list-attribute-types
(function).
list-attributes
(function).
list-classes
(function).
list-databases
(function).
list-indexes
(function).
list-sequences
(function).
list-sql-streams
(function).
list-tables
(function).
list-views
(function).
locally-disable-sql-reader-syntax
(macro).
locally-enable-sql-reader-syntax
(macro).
make-date
(function).
make-duration
(function).
make-interval
(function).
make-process-lock
(function).
make-time
(function).
map-query
(function).
mediumint
(type).
merged-time
(function).
midnight
(generic function).
mjd-to-gregorian
(function).
month-name
(function).
number-to-sql-string
(function).
parameters
(generic reader).
(setf parameters)
(generic writer).
parse-date-time
(function).
parse-datestring
(function).
parse-timestring
(function).
parse-yearstring
(function).
prepare-sql
(function).
prepare-sql-parameter
(generic function).
prepared-name
(generic reader).
(setf prepared-name)
(generic writer).
print-date
(function).
print-query
(function).
probe-database
(function).
push-library-path
(function).
query
(generic function).
read-instance-from-stream
(function).
read-large-object
(function).
read-sql-value
(generic function).
reconnect
(function).
record-caches
(generic reader).
(setf record-caches)
(generic writer).
reload-database-types
(function).
reset-command-object
(function).
restore-sql-reader-syntax-state
(macro).
result-recording-stream
(generic reader).
(setf result-recording-stream)
(generic writer).
roll
(function).
roll-to
(function).
rollback
(function).
run-prepared-sql
(function).
select
(function).
select-list
(generic reader).
(setf select-list)
(generic writer).
select-list
(class).
sequence-exists-p
(function).
sequence-last
(function).
sequence-next
(function).
set-autocommit
(function).
set-sequence-position
(function).
slot-list
(generic reader).
(setf slot-list)
(generic writer).
smallint
(type).
sql
(function).
sql
(class).
sql-*
(function).
sql-+
(function).
sql--
(function).
sql-/
(function).
sql-<
(function).
sql-<=
(function).
sql-<>
(function).
sql-=
(function).
sql-==
(function).
sql->
(function).
sql->=
(function).
sql-all
(function).
sql-and
(function).
sql-any
(function).
sql-assignment-exp
(class).
sql-avg
(function).
sql-between
(function).
sql-between-exp
(class).
sql-coalesce
(function).
sql-concat
(function).
sql-concat-op
(function).
sql-condition
(condition).
sql-connection-error
(condition).
sql-count
(function).
sql-database-data-error
(condition).
sql-database-error
(condition).
sql-database-warning
(condition).
sql-distinct
(function).
sql-error
(condition).
sql-error-connection-spec
(generic reader).
sql-error-database
(generic reader).
sql-error-database-message
(generic reader).
sql-error-database-type
(generic reader).
sql-error-error-id
(generic reader).
sql-error-expression
(generic reader).
sql-error-secondary-error-id
(generic reader).
sql-escape
(function).
sql-escape-quotes
(function).
sql-except
(function).
sql-exists
(function).
sql-expression
(function).
sql-fatal-error
(condition).
sql-function
(function).
sql-function-exp
(class).
sql-group-by
(function).
sql-having
(function).
sql-ident
(class).
sql-ident-attribute
(class).
sql-ident-table
(class).
sql-in
(function).
sql-intersect
(function).
sql-is
(function).
sql-like
(function).
sql-limit
(function).
sql-max
(function).
sql-min
(function).
sql-minus
(function).
sql-not
(function).
sql-not-null
(function).
sql-null
(function).
sql-nvl
(function).
sql-object-query
(class).
sql-operation
(function).
sql-operator
(function).
sql-or
(function).
sql-order-by
(function).
sql-query
(function).
sql-query
(class).
sql-query-modifier-exp
(class).
sql-recording-p
(function).
sql-relational-exp
(class).
sql-set-exp
(class).
sql-slot-value
(function).
sql-some
(function).
sql-stream
(function).
sql-substr
(function).
sql-substring
(function).
sql-sum
(function).
sql-temporary-error
(condition).
sql-the
(function).
sql-timeout-error
(condition).
sql-typecast-exp
(class).
sql-union
(function).
sql-upcase-like
(class).
sql-uplike
(function).
sql-user-error
(condition).
sql-user-error-message
(generic reader).
sql-userenv
(function).
sql-value-exp
(class).
sql-view-class
(function).
sql-warning
(condition).
sql-warning-database
(generic reader).
standard-db-object
(class).
start-sql-recording
(function).
start-transaction
(function).
status
(function).
stop-sql-recording
(function).
symbol-name-default-case
(function).
table-exists-p
(function).
time+
(function).
time-
(function).
time-compare
(function).
time-difference
(function).
time-dow
(function).
time-element
(function).
time-max
(function).
time-min
(function).
time-mjd
(reader).
(setf time-mjd)
(writer).
time-ymd
(function).
time<
(function).
time<=
(function).
time=
(function).
time>
(function).
time>=
(function).
tinyint
(type).
transaction
(generic reader).
(setf transaction)
(generic writer).
transaction
(class).
transaction-level
(generic reader).
(setf transaction-level)
(generic writer).
truncate-database
(function).
universal-time
(type).
update-instance-from-records
(generic function).
update-objects-joins
(function).
update-record-from-slot
(generic function).
update-record-from-slots
(generic function).
update-records
(function).
update-records-from-instance
(generic function).
update-slot-from-record
(generic function).
utime->time
(function).
varchar
(type).
view-exists-p
(function).
view-table
(generic function).
(setf view-table)
(generic writer).
wall-time
(structure).
week-containing
(function).
with-database
(macro).
with-default-database
(macro).
with-process-lock
(macro).
with-transaction
(macro).
without-interrupts
(macro).
write-instance-to-stream
(function).
write-large-object
(function).
%clsql-subclauses
(function).
%command-output
(function).
%convert-db-info-to-hash
(function).
%database-identifier
(class).
%database-list-*
(function).
%disable-sql-reader-syntax
(function).
%enable-sql-reader-syntax
(function).
%get-int
(function).
%install-class
(generic function).
%make-database-identifier
(function).
%make-date
(function).
%make-duration
(function).
%make-wall-time
(function).
%object-joins-from-list
(function).
%pool-force-disconnect
(function).
%print-date
(function).
%print-duration
(function).
%print-wall-time
(function).
%seq-name-key
(function).
%sequence-name-to-table
(function).
%slot-order-test-class
(class).
%sql-expression
(class).
%svuc-slot-name
(function).
%svuc-slot-object
(function).
%table-exists-p
(generic function).
%table-name-to-sequence-name
(function).
%tables-for-query
(function).
%time<
(function).
%time<=
(function).
%time=
(function).
%time>
(function).
%time>=
(function).
%uninstall-class
(function).
%update-instance-helper
(generic function).
%update-objects-joins-slot-defs
(function).
%write-operator
(function).
*connected-databases*
(special variable).
*day-keywords*
(special variable).
*day-names*
(special variable).
*db-deserializing*
(special variable).
*db-info-lambda-list*
(special variable).
*db-initializing*
(special variable).
*db-pool*
(special variable).
*db-pool-lock*
(special variable).
*default-encoding*
(special variable).
*in-subselect*
(special variable).
*iso-8601-duration-delimiters*
(special variable).
*month-keywords*
(special variable).
*month-names*
(special variable).
*next-prepared-id-num*
(special variable).
*original-readtable*
(special variable).
*output-hash*
(special variable).
*restore-sql-reader-syntax*
(special variable).
*roman-digits*
(special variable).
*select-arguments*
(special variable).
*sql-macro-close-char*
(special variable).
*sql-macro-open-char*
(special variable).
*sql-op-table*
(special variable).
*sql-stream*
(special variable).
+auto-increment-names+
(special variable).
+empty-string+
(special variable).
+extra-class-options+
(special variable).
+extra-slot-options+
(special variable).
+no-slot-value+
(special variable).
+null-string+
(special variable).
+whitespace-chars+
(special variable).
acquire-from-pool
(function).
all-connections
(generic reader).
(setf all-connections)
(generic writer).
all-home-keys-have-values-p
(function).
all-immediate-join-classes-for
(function).
attribute
(generic reader).
(setf attribute)
(generic writer).
attribute-references
(generic function).
attribute-value-pair
(class).
attribute-value-pairs
(generic function).
auto-increment-column-p
(generic function).
auto-increment-sequence-name
(generic function).
base-db-class
(function).
binding-to-param
(function).
bindings
(generic reader).
build-objects
(function).
check-slot-type
(function).
choose-database-for-instance
(generic function).
class-and-slots
(class).
clear-conn-pool
(function).
close-query-fn
(generic reader).
clsql-and
(function).
clsql-ands
(function).
clsql-or
(function).
clsql-ors
(function).
clsql-type->postgresql-type
(function).
collect-table-refs
(generic function).
combine-database-identifiers
(function).
commit-hooks
(generic reader).
(setf commit-hooks)
(generic writer).
compute-column-name
(function).
compute-lisp-type-from-specified-type
(function).
compute-records-cache-key
(function).
conn-pool-lock
(generic reader).
(setf conn-pool-lock)
(generic writer).
copy-date
(function).
copy-duration
(function).
copy-interval
(function).
copy-odbc-result-set
(function).
copy-time
(function).
copy-wall-time
(function).
database-abort-transaction
(generic function).
database-add-attribute
(generic function).
database-add-autoincrement-sequence
(generic function).
database-commit-transaction
(generic function).
database-constraint-statement
(generic function).
database-generate-column-definition
(generic function).
database-identifier
(generic function).
database-identifier-equal
(function).
database-last-autoincrement-id
(generic function).
database-list-objects-of-type
(function).
database-odbc-db-type
(generic reader).
(setf database-odbc-db-type)
(generic writer).
database-output-sql
(generic function).
database-pkey-constraint
(generic function).
database-remove-autoincrement-sequence
(generic function).
database-rename-attribute
(generic function).
database-start-transaction
(generic function).
database-too-strange
(condition).
database-translate-constraint
(generic function).
database-truncate
(generic function).
database-view-classes
(generic reader).
(setf database-view-classes)
(generic writer).
date->time
(function).
date/=
(function).
day-name
(function).
day-of-year
(function).
days-in-month
(function).
db-ancestors
(function).
db-value
(generic reader).
(setf db-value)
(generic writer).
db-value-from-slot
(function).
dbi-package
(generic reader).
defaulting
(macro).
defsql
(macro).
delete-at-index
(function).
delimited-string-to-list
(function).
delist-if-single
(function).
delistify
(function).
delistify-dsd
(function).
dequote
(function).
describe-db-layout
(function).
direct-normalized-slot-p
(function).
disconnect-fn
(generic reader).
duration-
(function).
duration-p
(function).
duration-usec
(reader).
(setf duration-usec)
(writer).
easy-slot-value
(function).
(setf easy-slot-value)
(function).
error-converting-value
(function).
escaped
(generic function).
(setf escaped)
(generic writer).
escaped-database-identifier
(function).
expected-type
(generic reader).
(setf expected-type)
(generic writer).
fault-join-slot
(function).
fault-join-slot-raw
(function).
fault-join-target-slot
(function).
fetch-row-fn
(generic reader).
field-names
(function).
filter-plist
(function).
find-all
(function).
find-normalized-key
(function).
find-or-create-connection-pool
(function).
find-slot-by-name
(function).
find-slot-if
(function).
find-standard-db-class
(function).
for-each-row
(macro).
free-connections
(generic reader).
(setf free-connections)
(generic writer).
from-names
(function).
full-select-list
(function).
generate-attribute-reference
(function).
generate-sql-reference
(function).
generic-database
(class).
get-join-slots
(function).
get-joined-objects
(function).
get-keywords
(function).
get-slot-value-from-record
(generic function).
get-slot-values-from-view
(generic function).
has-table
(function).
has-table-pg_roles
(generic reader).
hork-integers
(function).
id
(generic reader).
immediate-join-slots
(function).
insert-at-index
(function).
interval
(structure).
interval-name
(reader).
(setf interval-name)
(writer).
interval-p
(function).
iso-8601-delimiter
(function).
iso-8601-duration-subseq
(function).
iso-8601-syntax-error
(condition).
iso-datestring
(function).
join-qualifier
(function).
join-slot-class
(function).
join-slot-class-name
(function).
join-slot-info-value
(function).
join-slot-p
(function).
join-slot-qualifier
(function).
join-slot-retrieval-method
(function).
key-or-base-slot-p
(function).
key-qualifier-for-instance
(function).
key-slot-p
(function).
key-slots
(generic reader).
(setf key-slots)
(generic writer).
key-value-from-db
(generic function).
keyslots-for-class
(function).
leap-days-in-days
(function).
leap-year?
(function).
lisp->sql-name
(function).
list-all-database-tables-fn
(generic reader).
list-all-table-columns-fn
(generic reader).
listify
(function).
loop-record-iteration-path
(function).
make-attribute-value-pair
(function).
make-class-and-slots
(function).
make-constraints-description
(function).
make-odbc-result-set
(function).
make-query
(function).
make-select-list
(function).
make-sql-insert
(function).
make-weak-hash-table
(macro).
map-query-for-effect
(function).
map-query-to-list
(function).
map-query-to-simple
(function).
mark-transaction-committed
(function).
maybe-error-converting-value
(function).
next-prepared-id
(function).
normalized-key-value
(function).
normalizedp
(generic reader).
(setf normalizedp)
(generic writer).
not-direct-normalized-slot-p
(function).
object-definition
(generic reader).
(setf object-definition)
(generic writer).
odbc-conn
(generic reader).
(setf odbc-conn)
(generic writer).
odbc-result-set
(structure).
odbc-result-set-full-set
(reader).
(setf odbc-result-set-full-set)
(writer).
odbc-result-set-p
(function).
odbc-result-set-query
(reader).
(setf odbc-result-set-query)
(writer).
odbc-result-set-types
(reader).
(setf odbc-result-set-types)
(writer).
oid
(generic function).
order-by-strings
(function).
ordered-class-direct-slots
(function).
ordered-class-slots
(function).
ordinal-day
(function).
ordinal-month
(function).
output-sql
(generic function).
output-sql-hash-key
(generic function).
output-sql-where-clause
(function).
owner-clause
(function).
parse-db-info
(function).
parse-integer-insensitively
(function).
parse-iso-8601-duration
(function).
parse-iso-8601-time
(function).
pool-database-type
(generic reader).
(setf pool-database-type)
(generic writer).
pop-n
(macro).
position-char
(function).
postgresql-database-list
(function).
postgresql-stmt
(class).
prepared-sql-to-postgresql-sql
(function).
pretty-time
(function).
previous-autocommit
(generic reader).
primary-key-slot-values
(generic function).
print-readable-symbol
(function).
process-class-option
(macro).
process-slot-option
(macro).
query-arg-p
(function).
query-get-selections
(function).
query-string
(function).
read-decimal-value
(function).
read-stream-to-string
(function).
record-sql-command
(function).
record-sql-result
(function).
records-cache-results
(function).
(setf records-cache-results)
(function).
register-metaclass
(function).
release-to-pool
(function).
remove-keyword-arg
(function).
replace-all
(function).
replace-at-index
(function).
replace-string
(function).
replaced-string-length
(function).
restrict-intervals
(function).
result-types
(generic reader).
rollback-hooks
(generic reader).
(setf rollback-hooks)
(generic writer).
select-reference-equal
(function).
select-table-sql-expr
(generic function).
set-view-table-slot
(function).
signal-closed-database-error
(function).
signal-database-too-strange
(function).
signal-no-database-error
(function).
slot-defs
(generic reader).
(setf slot-defs)
(generic writer).
slot-has-default-p
(function).
slotdef-for-slot-with-class
(function).
slotdefs-for-slots-with-class
(function).
slots-for-possibly-normalized-class
(function).
sort-interval-list
(function).
special-cased-symbol-p
(function).
special-char-p
(function).
specified-type
(generic reader).
(setf specified-type)
(generic writer).
sql-create-table
(class).
sql-create-view
(class).
sql-delete
(class).
sql-e-string
(function).
sql-escape-string-exp
(class).
sql-fn
(generic reader).
sql-insert
(class).
sql-lower
(function).
sql-output
(function).
sql-reader-open
(function).
sql-table
(generic function).
sql-update
(class).
sql-upper
(function).
sql-value-conversion-error
(condition).
sql-warning-message
(generic reader).
standard-db-class
(class).
stmt-field-names
(generic reader).
(setf stmt-field-names)
(generic writer).
string-to-list-connection-spec
(function).
substitute-char-string
(function).
substitute-chars-strings
(function).
substitute-string-for-char
(function).
syntax-parse-iso-8601
(function).
table-name-from-arg
(function).
time->date
(function).
time-hms
(function).
time-meridian
(function).
time-second
(reader).
(setf time-second)
(writer).
time-usec
(reader).
(setf time-usec)
(writer).
time/=
(function).
to-attributes-and-values
(function).
to-class
(function).
to-class-name
(function).
to-slot-name
(function).
to-string
(generic function).
transaction-status
(generic reader).
(setf transaction-status)
(generic writer).
unescaped
(generic function).
(setf unescaped)
(generic writer).
unescaped-database-identifier
(function).
update-auto-increments-keys
(function).
update-fault-join-normalized-slot
(function).
update-slot-default-values
(generic function).
update-slot-from-db
(generic function).
update-slot-from-db-value
(generic function).
update-slot-with-null
(generic function).
valid-gregorian-date-p
(function).
valid-month-p
(function).
value
(generic reader).
(setf value)
(generic writer).
view-class
(generic reader).
(setf view-class)
(generic writer).
view-class-direct-slot-definition
(class).
view-class-effective-slot-definition
(class).
view-class-qualifier
(generic reader).
(setf view-class-qualifier)
(generic writer).
view-class-slot-autoincrement-sequence
(generic reader).
(setf view-class-slot-autoincrement-sequence)
(generic writer).
view-class-slot-column
(generic reader).
(setf view-class-slot-column)
(generic writer).
view-class-slot-db-constraints
(generic reader).
(setf view-class-slot-db-constraints)
(generic writer).
view-class-slot-db-info
(generic reader).
(setf view-class-slot-db-info)
(generic writer).
view-class-slot-db-kind
(generic reader).
(setf view-class-slot-db-kind)
(generic writer).
view-class-slot-db-reader
(generic reader).
(setf view-class-slot-db-reader)
(generic writer).
view-class-slot-db-type
(generic reader).
(setf view-class-slot-db-type)
(generic writer).
view-class-slot-db-writer
(generic reader).
(setf view-class-slot-db-writer)
(generic writer).
view-class-slot-definition-mixin
(class).
view-class-slot-void-value
(generic reader).
(setf view-class-slot-void-value)
(generic writer).
view-classes-and-slots-by-name
(generic function).
view-classes-and-storable-slots
(generic function).
view-database
(generic reader).
view-table-exp
(generic function).
wall-time-p
(function).
where-strings
(function).
wrap-time-for-date
(macro).
decimals
common-lisp
.
decimal-parse-error
(condition).
define-decimal-formatter
(macro).
format-decimal-number
(function).
parse-decimal-number
(function).
round-half-away-from-zero
(function).
decimal-round-split
(function).
divide-into-groups
(function).
number-string-to-fractional
(function).
number-string-to-integer
(function).
string-align
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Action to perform on warning messages from backend. Default is
to :warn. May also be set to :error to signal an error
or :ignore/nil to silently ignore the warning.
Specifies the default behaivour for caching of attribute types. Meaningful values are t, nil and :flush as described for the action argument to CACHE-TABLE-QUERIES.
Default value for the if-exists keyword argument in calls to CONNECT. Meaningful values are :new, :warn-new, :error, :warn-old and :old.
A non-nil value means that creating View Class instances or setting their slots automatically creates/updates the corresponding records in the underlying database.
Threshold of free-connections in the pool before we disconnect a database rather than returning it to the pool. NIL for no limit. This is really a heuristic that should, on avg keep the free connections about this size.
Controls whether SELECT caches objects by default. The CommonSQL specification states caching is on by default.
Specifies the default database to be used.
Designates the default database type which is initialised by the function INITIALISE-DATABASE-TYPE.
The length of a string which does not have a user-specified length.
The default value to use for the MAX-LEN keyword argument to UPDATE-OBJECT-JOINS.
A list of pathnames denoting directories where CLSQL will look for foreign libraries (in addition to the default places).
A list of database types which have currently been initialised by calling INITIALIZE-DATABASE-TYPE.
Contains a list of database types which have been defined/loaded.
Should CLSQL use its old sequence naming scheme _CLSQL_SEQ_{table} instead of the current scheme {table}_CLSQL_SEQ
Check the connection specification against the provided template, and signal an sql-user-error if they don’t match. This function is called by database backends.
Creates a View Class called CLASS whose slots SLOTS can map
onto the attributes of a table in a database. If SUPERS is nil
then the superclass of CLASS will be STANDARD-DB-OBJECT,
otherwise SUPERS is a list of superclasses for CLASS which must
include STANDARD-DB-OBJECT or a descendent of this class. The
syntax of DEFCLASS is extended through the addition of a class
option :base-table which defines the database table onto which
the View Class maps and which defaults to CLASS. The DEFCLASS
syntax is also extended through additional slot
options. The :db-kind slot option specifies the kind of DB
mapping which is performed for this slot and defaults to :base
which indicates that the slot maps to an ordinary column of the
database table. A :db-kind value of :key indicates that this slot
is a special kind of :base slot which maps onto a column which is
one of the unique keys for the database table, the value :join
indicates this slot represents a join onto another View Class
which contains View Class objects, and the value :virtual
indicates a standard CLOS slot which does not map onto columns of
the database table. If a slot is specified with :db-kind :join,
the slot option :db-info contains a list which specifies the
nature of the join. For slots of :db-kind :base or :key,
the :type slot option has a special interpretation such that Lisp
types, such as string, integer and float are automatically
converted into appropriate SQL types for the column onto which
the slot maps. This behaviour may be over-ridden using
the :db-type slot option which is a string specifying the
vendor-specific database type for this slot’s column definition
in the database. The :column slot option specifies the name of
the SQL column which the slot maps onto, if :db-kind is
not :virtual, and defaults to the slot name. The :void-value slot
option specifies the value to store if the SQL value is NULL and
defaults to NIL. The :db-constraints slot option is a string
representing an SQL table constraint expression or a list of such
strings.
Define a decimal number formatter function to use with the ‘~/‘
directive of ‘cl:format‘. The valid format is this:
(define-decimal-formatter name
(:keyword form)
...)
_Name_ is the symbol that names the function. _Keyword_ must be a valid
keyword argument for the ‘format-decimal-number‘ function (see its
documentation for more information). _Form_ is evaluated and the value
is used with the _keyword_ argument. Macro’s side effect is that global
function _name_ is defined. It can be used with the ‘~/‘ directive of
‘cl:format‘ function.
Examples:
(define-decimal-formatter my-formatter
(:round-magnitude -6)
(:decimal-separator ",")
(:integer-group-separator " ")
(:integer-minimum-width 4)
(:fractional-group-separator " ")
(:fractional-minimum-width 10)
(:show-trailing-zeros t))
=> MY-FORMATTER
(format nil "~/my-formatter/" 10/6)
=> " 1,666 667 "
(format nil "~/my-formatter/" 100/8)
=> " 12,500 000 "
The ‘~/‘ directive function call can optionally take up to three
arguments to override the defaults:
~round-magnitude,integer-minimum-width,fractional-minimum-width/FUNCTION/
For example:
(format nil "~-2,3,4/my-formatter/" 10/6)
=> " 1,67 "
Turns off the SQL reader syntax setting the syntax state such that if the syntax is subsequently enabled, RESTORE-SQL-READER-SYNTAX-STATE will disable it again.
Repeatedly executes BODY within a binding of ARGS on the fields of each row selected by the SQL query QUERY-EXPRESSION, which may be a string or a symbolic SQL expression, in DATABASE which defaults to *DEFAULT-DATABASE*. The values returned by the execution of BODY are returned. RESULT-TYPES is a list of symbols which specifies the lisp type for each field returned by QUERY-EXPRESSION. If RESULT-TYPES is nil all results are returned as strings whereas the default value of :auto means that the lisp types are automatically computed for each field.
Turns on the SQL reader syntax setting the syntax state such that if the syntax is subsequently disabled, RESTORE-SQL-READER-SYNTAX-STATE will enable it again.
Turns on the SQL reader syntax for the rest of the file. The CL spec says that when finished loading a file the original *readtable* is restored. clhs COMPILE-FILE
Turns off the SQL reader syntax without changing the syntax state such that RESTORE-SQL-READER-SYNTAX-STATE will re-establish the current syntax state.
Turns on the SQL reader syntax without changing the syntax state such that RESTORE-SQL-READER-SYNTAX-STATE will re-establish the current syntax state.
Enables the SQL reader syntax if ENABLE-SQL-READER-SYNTAX has been called more recently than DISABLE-SQL-READER-SYNTAX and otherwise disables the SQL reader syntax. By default, the SQL reader syntax is disabled.
Evaluate the body in an environment, where DB-VAR is bound to the database connection given by CONNECTION-SPEC and CONNECT-ARGS. The connection is automatically closed or released to the pool on exit from the body. MAKE-DEFAULT has a default value of NIL.
Perform BODY with DATABASE bound as *default-database*.
Starts a transaction in the database specified by DATABASE, which is *DEFAULT-DATABASE* by default, and executes BODY within that transaction. If BODY aborts or throws, DATABASE is rolled back and otherwise the transaction is committed.
Adds the supplied stream STREAM (or T for *standard-output*) as a component of the recording broadcast stream for the SQL recording type specified by TYPE on DATABASE which defaults to *DEFAULT-DATABASE*. TYPE must be one of :commands, :results, or :both, defaulting to :commands, depending on whether the stream is to be added for recording SQL commands, results or both.
Adds COMMIT-HOOK, which should a designator for a function with no required arguments, to the list of hooks run when COMMIT is called on DATABASE which defaults to *DEFAULT-DATABASE*.
Adds ROLLBACK-HOOK, which should a designator for a function with no required arguments, to the list of hooks run when ROLLBACK is called on DATABASE which defaults to *DEFAULT-DATABASE*.
Returns a keyword representing the vendor-specific field type of the supplied attribute ATTRIBUTE in the table specified by TABLE in DATABASE which defaults to *DEFAULT-DATABASE*. OWNER is nil by default which means that the attribute specified by ATTRIBUTE, if it exists, must be user owned else nil is returned. If OWNER is a string denoting a user name, the attribute, if it exists, must be owned by OWNER else nil is returned, whereas if OWNER is :all then the attribute, if it exists, will be returned regardless of its owner.
Sets the value of a parameter is in prepared statement.
Controls the caching of attribute type information on the table specified by TABLE in DATABASE which defaults to *DEFAULT-DATABASE*. ACTION specifies the caching behaviour to adopt. If its value is t then attribute type information is cached whereas if its value is nil then attribute type information is not cached. If ACTION is :flush then all existing type information in the cache for TABLE is removed, but caching is still enabled. TABLE may be a string representing a table for which the caching action is to be taken while the caching action is applied to all tables if TABLE is t. Alternativly, when TABLE is :default, the default caching action specified by *CACHE-TABLE-QUERIES-DEFAULT* is applied to all table for which a caching action has not been explicitly set.
If DATABASE, which defaults to *DEFAULT-DATABASE*, is currently within the scope of a transaction, commits changes made since the transaction began.
Connects to a database of the supplied DATABASE-TYPE which defaults to *DEFAULT-DATABASE-TYPE*, using the type-specific connection specification CONNECTION-SPEC. The value of IF-EXISTS, which defaults to *CONNECT-IF-EXISTS*, determines what happens if a connection to the database specified by CONNECTION-SPEC is already established. A value of :new means create a new connection. A value of :warn-new means warn the user and create a new connect. A value of :warn-old means warn the user and use the old connection. A value of :error means fail, notifying the user. A value of :old means return the old connection. MAKE-DEFAULT is t by default which means that *DEFAULT-DATABASE* is set to the new connection, otherwise *DEFAULT-DATABASE* is not changed. If POOL is t the connection will be taken from the general pool, if POOL is a CONN-POOL object the connection will be taken from this pool.
Returns the list of active database objects.
This function creates a database in the database system specified by DATABASE-TYPE.
Creates an index called NAME on the table specified by ON in DATABASE which default to *DEFAULT-DATABASE*. The table attributes to use in constructing the index NAME are specified by ATTRIBUTES. The UNIQUE argument is nil by default but if it has a non-nil value then the indexed attributes must have unique values.
Creates a new large object in the database and returns the object identifier
Creates a sequence called NAME in DATABASE which defaults to *DEFAULT-DATABASE*.
Creates a table called NAME, which may be a string, symbol or SQL table identifier, in DATABASE which defaults to *DEFAULT-DATABASE*. DESCRIPTION is a list whose elements are lists containing the attribute names, types, and other constraints such as not-null or primary-key for each column in the table. CONSTRAINTS is a string representing an SQL table constraint expression or a list of such strings. With MySQL databases, if TRANSACTIONS is t an InnoDB table is created which supports transactions.
Creates a view called NAME in DATABASE which defaults to *DEFAULT-DATABASE*. The view is created using the query AS and the columns of the view may be specified using the COLUMN-LIST parameter. The WITH-CHECK-OPTION is nil by default but if it has a non-nil value, then all insert/update commands on the view are checked to ensure that the new data satisfy the query AS.
Creates a table as defined by the View Class VIEW-CLASS-NAME in DATABASE which defaults to *DEFAULT-DATABASE*.
Add each DURATION to DATE, returning a new date value.
Note that (barring daylight saving time) 12h + 12h will result in a new day, but doing
it as separate calculations will not, as the time is chopped to a date before being returned.
Subtract each DURATION to DATE, returning a new date value.
Note that (barring daylight saving time) 12h + 12h will result in a new day, but doing
it as separate calculations will not, as the time is chopped to a date before being returned.
Returns a DURATION representing the difference between TIME1 and TIME2.
return the string to store the given time in the database
returns the decoded date as multiple values: day month year integer day-of-week
returns the decoded time as multiple values: usec, second, minute, hour, day, month, year, integer day-of-week
Deletes the large object in the database
Deletes records satisfying the SQL expression WHERE from the table specified by FROM in DATABASE specifies a database which defaults to *DEFAULT-DATABASE*.
Removes the supplied stream STREAM from the recording broadcast
stream for the SQL recording type specified by TYPE on DATABASE
which defaults to *DEFAULT-DATABASE*. TYPE must be one
of :commands, :results, or :both, defaulting to :commands,
depending on whether the stream is to be added for recording SQL
commands, results or both.
This function destroys a database in the database system specified by DATABASE-TYPE.
Closes the connection to DATABASE and resets *DEFAULT-DATABASE* if that database was disconnected. If DATABASE is a database instance, this object is closed. If DATABASE is a string, then a connected database whose name matches DATABASE is sought in the list of connected databases. If no matching database is found and ERROR and DATABASE are both non-nil an error is signaled, otherwise nil is returned. If the database is from a pool it will be released to this pool.
Disconnects all connections in the pool. When clear, also deletes the pool objects.
Drops the index called NAME in DATABASE which defaults to *DEFAULT-DATABASE*. If the index does not exist and IF-DOES-NOT-EXIST is :ignore then DROP-INDEX returns nil whereas an error is signalled if IF-DOES-NOT-EXIST is :error. The argument ON allows the optional specification of a table to drop the index from.
Drops the sequence called NAME from DATABASE which defaults to *DEFAULT-DATABASE*. If the sequence does not exist and IF-DOES-NOT-EXIST is :ignore then DROP-SEQUENCE returns nil whereas an error is signalled if IF-DOES-NOT-EXIST is :error.
Drops the table called NAME from DATABASE which defaults to *DEFAULT-DATABASE*. If the table does not exist and IF-DOES-NOT-EXIST is :ignore then DROP-TABLE returns nil whereas an error is signalled if IF-DOES-NOT-EXIST is :error.
Drops the view called NAME from DATABASE which defaults to *DEFAULT-DATABASE*. If the view does not exist and IF-DOES-NOT-EXIST is :ignore then DROP-VIEW returns nil whereas an error is signalled if IF-DOES-NOT-EXIST is :error.
Removes a table defined by the View Class VIEW-CLASS-NAME from DATABASE which defaults to *DEFAULT-DATABASE*.
Add each DURATION to TIME, returning a new wall-time value.
Returns keyword for a name.
Returns the connected databases of type DB-TYPE whose names match the string DATABASE. If DATABASE is a database object, it is returned. If DB-TYPE is nil all databases matching the string DATABASE are considered. If no matching databases are found and ERRORP is nil then nil is returned. If ERRORP is nil and one or more matching databases are found, then the most recently connected database is returned as a first value and the number of matching databases is returned as a second value. If no, or more than one, matching databases are found and ERRORP is true, an error is signalled.
Convert exponent character for SQL
produces on stream the datestring corresponding to the date with the given options
Apply specified decimal number formatting rules to _number_ and
return a formatted string.
The second return value is (almost) the same formatted string divided
into four strings. It’s a list of four strings: sign, integer part,
decimal separator and fractional part. Formatting arguments
_integer-minimum-width_ and _fractional-minimum-width_ do not apply to
the second return value. Everything else does.
_Number_ must be of type ‘real‘. This function uses ‘rational‘ types
internally. If the given _number_ is a ‘float‘ it is first turned into
‘rational‘ by calling ‘cl:rational‘.
Formatting rules are specified with keyword arguments, as described
below. The default value is in parentheses.
* ‘round-magnitude (0)‘
This is the order of magnitude used for rounding. The value must be
an integer and it is interpreted as a power of 10.
* ‘show-trailing-zeros (nil)‘
If the value is non-nil print all trailing zeros in fractional part.
Examples:
(format-decimal-number 1/5 :round-magnitude -3
:show-trailing-zeros nil)
=> "0.2"
(format-decimal-number 1/5 :round-magnitude -3
:show-trailing-zeros t)
=> "0.200"
* ‘rounder (#’round-half-away-from-zero)‘
The value must be a function (or a symbol naming a function). It is
used to round the number to the specified round magnitude. The
function must work like ‘cl:truncate‘, ‘cl:floor‘, ‘cl:ceiling‘ and
‘cl:round‘, that is, take two arguments, a number and a divisor, and
return the quotient as the first value.
This package introduces another rounding function,
‘round-half-away-from-zero‘, which is used by default. See its
documentation for more information.
* ‘decimal-separator (#\.)‘
If the value is non-nil the ‘princ‘ output of the value will be
added between integer and fractional parts. Probably the most useful
types are ‘character‘ and ‘string‘.
* ‘integer-group-separator (nil)‘
* ‘fractional-group-separator (nil)‘
If the value is non-nil the digits in integer or fractional parts
are put in groups. The ‘princ‘ output of the value will be added
between digit groups.
* ‘integer-group-digits (3)‘
* ‘fractional-group-digits (3)‘
The value is a positive integer defining the number of digits in
groups.
* ‘integer-minimum-width (0)‘
* ‘fractional-minimum-width (0)‘
Format integer or fractional part using minimum of this amount of
characters, possibly using some padding characters (see below).
_positive-sign_, _negative-sign_ or _zero-sign_ (see below) is
included when calculating the width of the integer part. Similarly
_decimal-separator_ is included when calculating the width of the
fractional part.
* ‘integer-pad-char (#\Space)‘
* ‘fractional-pad-char (#\Space)‘
The value is the padding character which is used to fill
_integer-minimum-width_ or _fractional-minimum-width_.
* ‘positive-sign (nil)‘
* ‘negative-sign (#\-)‘
* ‘zero-sign (nil)‘
If values are non-nil these are used as the leading sign for positive, negative and zero numbers. The ‘princ‘ output of the value is used.
produces on stream the timestring corresponding to the wall-time with the given options
Delete the objects associated with a prepared statement.
Return a pair: (GREGORIAN DAY . TIME-OF-DAY)
Return the value of the environment variable.
A predicate to test whether DATABASE, which defaults to *DEFAULT-DATABASE*, is currently within the scope of a transaction.
Tests for the existence of an SQL index called NAME in DATABASE which defaults to *DEFAULT-DATABASE*. OWNER is nil by default which means that only indexes owned by users are examined. If OWNER is a string denoting a user name, only indexes owned by OWNER are examined. If OWNER is :all then all indexes are examined.
Initializes the supplied DATABASE-TYPE, if it is not already initialized, as indicated by *INITIALIZED-DATABASE-TYPES* and returns DATABASE-TYPE. *DEFAULT-DATABASE-TYPE* is set to DATABASE-TYPE and, if DATABASE-TYPE has not been initialised, it is added to *INITIALIZED-DATABASE-TYPES*.
Inserts records into the table specified by INTO in DATABASE
which defaults to *DEFAULT-DATABASE*. There are five ways of
specifying the values inserted into each row.
In the first VALUES contains a list of values to insert and ATTRIBUTES,
AV-PAIRS and QUERY are nil. This can be used when values are supplied for all
attributes in INTO.
In the second, ATTRIBUTES is a list of column names, VALUES is a corresponding
list of values and AV-PAIRS and QUERY are nil.
In the third, ATTRIBUTES, VALUES and QUERY are nil and AV-PAIRS is a list
of (attribute value) pairs, or attribute-value-pair objects.
In the fourth, VALUES, AV-PAIRS and ATTRIBUTES are nil and QUERY is a symbolic
SQL query expression in which the selected columns also exist in INTO.
In the fifth method, VALUES and AV-PAIRS are nil and ATTRIBUTES is a list of column names and QUERY is a symbolic SQL query expression which returns values for the specified columns.
Attempts to modify the most deeply nested interval in list which begins at time. If no changes are made, returns nil.
Return the index of the first interval in list containing time
Compare the relationship of node x to node y. Returns either :contained :contains :follows :overlaps or :precedes.
Returns a list containing information about the SQL types of each of the attributes in the table specified by TABLE in DATABASE which has a default value of *DEFAULT-DATABASE*. OWNER is nil by default which means that only attributes owned by users are listed. If OWNER is a string denoting a user name, only attributes owned by OWNER are listed. If OWNER is :all then all attributes are listed. The elements of the returned list are lists where the first element is the name of the attribute, the second element is its SQL type, the third is the type precision, the fourth is the scale of the attribute and the fifth is 1 if the attribute accepts null values and otherwise 0.
Returns a list of strings representing the attributes of table NAME in DATABASE which defaults to *DEFAULT-DATABASE*. OWNER is nil by default which means that only attributes owned by users are listed. If OWNER is a string denoting a user name, only attributes owned by OWNER are listed. If OWNER is :all then all attributes are listed.
Returns a list of all the View Classes which are connected to DATABASE, which defaults to *DEFAULT-DATABASE*, and which descend from the class ROOT-CLASS and which satisfy the function TEST. By default ROOT-CLASS is STANDARD-DB-OBJECT and TEST is IDENTITY.
This function returns a list of databases existing in the database system specified by DATABASE-TYPE.
Returns a list of strings representing index names in DATABASE which defaults to *DEFAULT-DATABASE*. OWNER is nil by default which means that only indexes owned by users are listed. If OWNER is a string denoting a user name, only indexes owned by OWNER are listed. If OWNER is :all then all indexes are listed. The keyword argument ON limits the results to indexes on the specified tables. Meaningful values for ON are nil (the default) which means that all tables are considered, a string, symbol or SQL expression representing a table name in DATABASE or a list of such table identifiers.
Returns a list of strings representing sequence names in DATABASE which defaults to *DEFAULT-DATABASE*. OWNER is nil by default which means that only sequences owned by users are listed. If OWNER is a string denoting a user name, only sequences owned by OWNER are listed. If OWNER is :all then all sequences are listed.
Returns the list of component streams for the broadcast stream recording SQL commands sent to and/or results returned from DATABASE which defaults to *DEFAULT-DATABASE*. TYPE must be one of :commands, :results, or :both, defaulting to :commands, and determines whether the listed streams contain those recording SQL commands, results or both.
Returns a list of strings representing table names in DATABASE which defaults to *DEFAULT-DATABASE*. OWNER is nil by default which means that only tables owned by users are listed. If OWNER is a string denoting a user name, only tables owned by OWNER are listed. If OWNER is :all then all tables are listed.
Returns a list of strings representing view names in DATABASE which defaults to *DEFAULT-DATABASE*. OWNER is nil by default which means that only views owned by users are listed. If OWNER is a string denoting a user name, only views owned by OWNER are listed. If OWNER is :all then all views are listed.
Returns a sequence of the given TYPE and LENGTH.
Map the function FUNCTION over the attribute values of each
row selected by the SQL query QUERY-EXPRESSION, which may be a
string or a symbolic SQL expression, in DATABASE which defaults
to *DEFAULT-DATABASE*. The results of the function are collected
as specified in OUTPUT-TYPE-SPEC and returned like in
MAP. RESULT-TYPES is a list of symbols which specifies the lisp
type for each field returned by QUERY-EXPRESSION. If RESULT-TYPES
is nil all results are returned as strings whereas the default
value of :auto means that the lisp types are automatically
computed for each field.
parses date like 08/08/01, 8.8.2001, eg
parse a ISO 8601 timestring and return the corresponding date.
Will throw a hissy fit if the date string is a duration. Will ignore any precision beyond day (hour/min/sec/usec).
Examine _string_ (or its substring from _start_ to _end_) for a
decimal number. Assume that the decimal number is exact and return it as
a rational number.
Rules for parsing: First all leading and trailing ‘#\Space‘ characters
are stripped. The resulting string may start with a _positive-sign_ or a
_negative-sign_ character. The latter causes this function to assume a
negative number. The following characters in the string must include one
or more digit characters and it may include one _decimal-separator_
character which separates integer and fractional parts. All other
characters are illegal. If these rules are not met a
‘decimal-parse-error‘ condition is signaled.
Examples:
(parse-decimal-number "0.2") => 1/5
(parse-decimal-number ".2") => 1/5
(parse-decimal-number "+3.") => 3
(parse-decimal-number " -7 ") => -7
(parse-decimal-number "−12,345"
:decimal-separator #\,
:negative-sign #\−)
=> -2469/200
parse a timestring and return the corresponding wall-time. If the timestring starts with P, read a duration; otherwise read an ISO 8601 formatted date string.
Prepares a SQL statement for execution. TYPES contains a
list of types corresponding to the input parameters. Returns a
prepared-statement object.
A type can be
:int
:double
:null
(:blob n)
(:string n)
Prints a tabular report of the results returned by the SQL query QUERY-EXP, which may be a symbolic SQL expression or a string, in DATABASE which defaults to *DEFAULT-DATABASE*. The report is printed onto STREAM which has a default value of t which means that *STANDARD-OUTPUT* is used. The TITLE argument, which defaults to nil, allows the specification of a list of strings to use as column titles in the tabular output. SIZES accepts a list of column sizes, one for each column selected by QUERY-EXP, to use in formatting the tabular report. The default value of t means that minimum sizes are computed. FORMATS is a list of format strings to be used for printing each column selected by QUERY-EXP. The default value of FORMATS is t meaning that ~A is used to format all columns or ~VA if column sizes are used.
This function tests for the existence of a database in the database system specified by DATABASE-TYPE.
Adds the pathspec PATH (which should denote a directory) to the list *FOREIGN-LIBRARY-SEARCH-PATHS*.
Reads the large object content
Reconnects DATABASE which defaults to *DEFAULT-DATABASE* to the underlying database management system. On success, t is returned and the variable *DEFAULT-DATABASE* is set to the newly reconnected database. If DATABASE is a database instance, this object is closed. If DATABASE is a string, then a connected database whose name matches DATABASE is sought in the list of connected databases. If no matching database is found and ERROR and DATABASE are both non-nil an error is signaled, otherwise nil is returned. When the current database connection cannot be closed, if FORCE is non-nil, as it is by default, the connection is closed and errors are suppressed. If force is nil and the database connection cannot be closed, an error is signalled.
Reloads any foreign code for the loaded database types after a dump.
Resets the command object to have no name and to be unprepared
(This is useful if you want to run a command against a second database)
If DATABASE, which defaults to *DEFAULT-DATABASE*, is currently within the scope of a transaction, rolls back changes made since the transaction began.
Divide _number_ by _divisor_ and round the result to the nearest integer.
If the result is half-way between two integers round away from zero. Two
values are returned: quotient and remainder.
This is similar to ‘cl:round‘ function except that ‘cl:round‘ rounds to an even integer when number is exactly between two integers. Examples:
(round-half-away-from-zero 3/2) => 2, -1/2
(round 3/2) => 2, -1/2
(round-half-away-from-zero 5/2) => 3, -1/2
(round 5/2) => 2, 1/2
Execute the prepared sql statment. All input parameters must be bound.
Executes a query on DATABASE, which has a default value of
*DEFAULT-DATABASE*, specified by the SQL expressions supplied
using the remaining arguments in SELECT-ALL-ARGS. The SELECT
argument can be used to generate queries in both functional and
object oriented contexts.
In the functional case, the required arguments specify the
columns selected by the query and may be symbolic SQL expressions
or strings representing attribute identifiers. Type modified
identifiers indicate that the values selected from the specified
column are converted to the specified lisp type. The keyword
arguments ALL, DISTINCT, FROM, GROUP-by, HAVING, ORDER-BY,
SET-OPERATION and WHERE are used to specify, using the symbolic
SQL syntax, the corresponding components of the SQL query
generated by the call to SELECT. RESULT-TYPES is a list of
symbols which specifies the lisp type for each field returned by
the query. If RESULT-TYPES is nil all results are returned as
strings whereas the default value of :auto means that the lisp
types are automatically computed for each field. FIELD-NAMES is t
by default which means that the second value returned is a list
of strings representing the columns selected by the query. If
FIELD-NAMES is nil, the list of column names is not returned as a
second value.
In the object oriented case, the required arguments to SELECT are
symbols denoting View Classes which specify the database tables
to query. In this case, SELECT returns a list of View Class
instances whose slots are set from the attribute values of the
records in the specified table. Slot-value is a legal operator
which can be employed as part of the symbolic SQL syntax used in
the WHERE keyword argument to SELECT. REFRESH is nil by default
which means that the View Class instances returned are retrieved
from a cache if an equivalent call to SELECT has previously been
issued. If REFRESH is true, the View Class instances returned are
updated as necessary from the database and the generic function
INSTANCE-REFRESHED is called to perform any necessary operations
on the updated instances.
In both object oriented and functional contexts, FLATP has a default value of nil which means that the results are returned as a list of lists. If FLATP is t and only one result is returned for each record selected in the query, the results are returned as elements of a list.
Tests for the existence of an SQL sequence called NAME in DATABASE which defaults to *DEFAULT-DATABASE*. OWNER is nil by default which means that only sequences owned by users are examined. If OWNER is a string denoting a user name, only sequences owned by OWNER are examined. If OWNER is :all then all sequences are examined.
Return the last value allocated in the sequence called NAME in DATABASE which defaults to *DEFAULT-DATABASE*.
Increment and return the next value in the sequence called NAME in DATABASE which defaults to *DEFAULT-DATABASE*.
Turns autocommit off for DATABASE if VALUE is NIL, and otherwise turns it on. Returns the old value of autocommit flag. For RDBMS (such as Oracle) which don’t automatically commit changes, turning autocommit on has the effect of explicitly committing changes made whenever SQL statements are executed. Autocommit is turned on by default.
Explicitly set the the position of the sequence called NAME in DATABASE, which defaults to *DEFAULT-DATABASE*, to POSITION which is returned.
Returns an SQL string generated from the expressions ARGS. The expressions are translated into SQL strings and then concatenated with a single space delimiting each expression. An error of type SQL-USER-ERROR is signalled if any element in ARGS is not of the supported types (a symbol, string, number or symbolic SQL expression) or a list or vector containing only these supported types.
Change hyphens to underscores, ensure string
Escape quotes for SQL string writing
Returns an SQL expression constructed from the supplied arguments which may be combined as follows: ATTRIBUTE and TYPE; ATTRIBUTE; ALIAS or TABLE and ATTRIBUTE and TYPE; ALIAS or TABLE and ATTRIBUTE; TABLE, ATTRIBUTE and TYPE; TABLE and ATTRIBUTE; TABLE and ALIAS; TABLE; and STRING. An error of type SQL-USER-ERROR is signalled if an unsupported combination of keyword arguments is specified.
Returns an SQL expression constructed from the supplied symbol OPERATOR representing an SQL operator or function and its arguments ARGS. An error of type SQL-USER-ERROR is signalled if OPERATOR is not a symbol representing a supported SQL operator. If OPERATOR is passed the symbol FUNCTION then the first value in ARGS must be a string representing a valid SQL function and the remaining values in ARGS its arguments as strings.
Returns the Lisp symbol corresponding to the SQL operator represented by the symbol OPERATOR. If OPERATOR does not represent a supported SQL operator or is not a symbol, nil is returned.
Predicate to test whether the SQL recording specified by TYPE
is currently enabled for DATABASE which defaults to *DEFAULT-DATABASE*.
TYPE may be one of :commands, :results, :both or :either, defaulting to
:commands, otherwise nil is returned.
Returns the broadcast stream used for recording SQL commands sent to or results returned from DATABASE which defaults to *DEFAULT-DATABASE*. TYPE must be one of :commands or :results, defaulting to :commands, and determines whether the stream returned is that used for recording SQL commands or results.
Starts recording of SQL commands sent to and/or results returned from DATABASE which defaults to *DEFAULT-DATABASE*. The SQL is output on one or more broadcast streams, initially just *STANDARD-OUTPUT*, and the functions ADD-SQL-STREAM and DELETE-SQL-STREAM may be used to add or delete command or result recording streams. The default value of TYPE is :commands which means that SQL commands sent to DATABASE are recorded. If TYPE is :results then SQL results returned from DATABASE are recorded. Both commands and results may be recorded by passing TYPE value of :both.
Starts a transaction block on DATABASE which defaults to *DEFAULT-DATABASE* and which continues until ROLLBACK or COMMIT are called.
Prints information about the currently connected databases to *STANDARD-OUTPUT*. The argument FULL is nil by default and a value of t means that more detailed information about each database is printed.
Stops recording of SQL commands sent to and/or results returned from DATABASE which defaults to *DEFAULT-DATABASE*. The default value of TYPE is :commands which means that SQL commands sent to DATABASE will no longer be recorded. If TYPE is :results then SQL results returned from DATABASE will no longer be recorded. Recording may be stopped for both commands and results by passing TYPE value of :both.
Tests for the existence of an SQL table called NAME in DATABASE which defaults to *DEFAULT-DATABASE*. OWNER is nil by default which means that only tables owned by users are examined. If OWNER is a string denoting a user name, only tables owned by OWNER are examined. If OWNER is :all then all tables are examined.
Add each DURATION to TIME, returning a new wall-time value.
Subtract each DURATION from TIME, returning a new wall-time value.
Returns a DURATION representing the difference between TIME1 and TIME2.
Return the 0 indexed Day of the week starting with Sunday
Returns the greatest of its arguments.
Returns the least of its arguments.
Returns T if its arguments are in strictly increasing order, NIL otherwise.
Returns T if arguments are in strictly non-decreasing order, NIL otherwise.
Returns T if all of its arguments are numerically equal, NIL otherwise.
Returns T if its arguments are in strictly decreasing order, NIL otherwise.
Returns T if arguments are in strictly non-increasing order, NIL otherwise.
Drops all tables, views, indexes and sequences in DATABASE which defaults to *DEFAULT-DATABASE*.
Updates from the records of the appropriate database tables the join slots
specified by SLOTS in the supplied list of View Class instances OBJECTS.
A simpler method of causing a join-slot to be requeried is to set it to
unbound, then request it again. This function has efficiency gains where
join-objects are shared among the ‘objects‘ (querying all join-objects,
then attaching them appropriately to each of the ‘objects‘)
SLOTS can be one of:
* :immediate (DEFAULT) - refresh join slots created with :retrieval :immediate
* :deferred - refresh join slots created with :retrieval :deferred
* :all,t - refresh all join slots regardless of :retrieval
* list of symbols - which explicit slots to refresh
* a single symobl - what slot to refresh
CLASS-NAME is used to specify the View Class of all instance in OBJECTS and
default to nil which means that the class of the first instance in OBJECTS
is used.
FORCE-P is t by default which means that all join slots are updated whereas
a value of nil means that only unbound join slots are updated.
MAX-LEN defaults to *DEFAULT-UPDATE-OBJECTS-MAX-LEN* When non-nil this is essentially a batch size for the max number of objects to query from the database at a time. If we need more than max-len we loop till we have all the objects
Updates the attribute values of existing records satsifying the SQL expression WHERE in the table specified by TABLE in DATABASE which defaults to *DEFAULT-DATABASE*. There are three ways of specifying the values to update for each row. In the first, VALUES contains a list of values to use in the update and ATTRIBUTES and AV-PAIRS are nil. This can be used when values are supplied for all attributes in TABLE. In the second, ATTRIBUTES is a list of column names, VALUES is a corresponding list of values and AV-PAIRS is nil. In the third, ATTRIBUTES and VALUES are nil and AV-PAIRS is an alist of (attribute value) pairs.
Return a pair: (GREGORIAN DAY . TIME-OF-DAY)
Tests for the existence of an SQL view called NAME in DATABASE which defaults to *DEFAULT-DATABASE*. OWNER is nil by default which means that only views owned by users are examined. If OWNER is a string denoting a user name, only views owned by OWNER are examined. If OWNER is :all then all views are examined.
Writes an instance to a stream where it can be later be read.
NOTE: an error will occur if a slot holds a value which can not be written readably.
Writes data to the large object
iso-8601-syntax-error
)) ¶sql-value-conversion-error
)) ¶sql-value-conversion-error
)) ¶postgresql-stmt
)) ¶automatically generated reader method
Acquire a database connection from the pool. This
is a chance to test the connection for validity before returning it to
the user. If this function returns NIL or throws an error that
database connection is considered bad and we make a new one.
Database objects have a chance to specialize, otherwise the default method uses the database-underlying-type and tries to do something appropriate.
Return the type of ATTRIBUTE in TABLE. Returns multiple values of TYPE_NAME (keyword) PRECISION SCALE NULLABLE.
%database-identifier
) (table %database-identifier
) (database generic-odbc-database
) &key owner) ¶%database-identifier
) (table %database-identifier
) (database generic-postgresql-database
) &key owner) ¶Bind a parameter for a prepared statement.
postgresql-stmt
) position value) ¶Internal generic implementation of connect.
Creates a database, returns T if successfull or signals an error.
Creates a new large object in the database and returns the object identifier
Create a sequence in DATABASE.
generic-postgresql-database
)) ¶Deletes the large object in the database
Destroys (drops) a database, returns T if successfull or signals an error if unable to destory.
Internal generic implementation of disconnect.
generic-odbc-database
)) ¶Drop a sequence from DATABASE.
generic-postgresql-database
)) ¶Dumps the received result-set.
generic-odbc-database
)) ¶Internal generic implementation of execute-command.
generic-odbc-database
)) ¶Free the resources of a prepared statement.
Return the type SQL type specifier as a string, for the given lisp type and parameters.
symbol
) args database (db-type (eql :mssql)
)) ¶Special database types for MSSQL backends
symbol
) args database (db-type (eql :postgresql)
)) ¶Special database types for POSTGRESQL backends
symbol
) args database db-type) ¶string
) args database db-type) ¶Pass through the literal type as defined in the type string
The internal generic implementation of initialize-database-type.
generic-odbc-database
) table column) ¶generic-postgresql-database
) table column) ¶Lists all databases found for TYPE. May signal an error if unable to communicate with database server.
List all attributes in TABLE.
%database-identifier
) (database generic-odbc-database
) &key owner) ¶%database-identifier
) (database generic-postgresql-database
) &key owner) ¶List all indexes in the DATABASE.
generic-postgresql-database
) &key owner) ¶List all sequences in DATABASE.
generic-postgresql-database
) &key owner) ¶List all indexes for a table in the DATABASE.
generic-postgresql-database
) &key owner) ¶List all tables in the given database
generic-odbc-database
) &key owner) ¶Since ODBC doesn’t expose the owner we use that parameter to filter on schema since that’s what tends to be exposed. Some DBs like mssql 2000 conflate the two so at least there it works nicely.
generic-postgresql-database
) &key owner) ¶List all tables in the given database, may include seqeneces
List all views in the DATABASE.
generic-odbc-database
) &key owner) ¶Since ODBC doesn’t expose the owner we use that parameter to filter on schema since that’s what tends to be exposed. Some DBs like mssql 2000 conflate the two so at least there it works nicely.
generic-postgresql-database
) &key owner) ¶Returns the name of a database.
Returns the name of the database that would be created if connect was called with the connection-spec.
Prepare a statement for later execution.
generic-postgresql-database
) result-types field-names) ¶Probes for the existence of a database, returns T if database found or NIL if not found. May signal an error if unable to communicate with database server.
Internal generic implementation of query.
generic-odbc-database
) result-types field-names) ¶Internal generic implementation of query mapping. Starts the query specified by query-expression on the given database and returns a result-set to be used with database-store-next-row and database-dump-result-set to access the returned data. The second value is the number of columns in the result-set, if there are any. If full-set is true, the number of rows in the result-set is returned as a third value, if this is possible (otherwise nil is returned for the third value). This might have memory and resource usage implications, since many databases will require the query to be executed in full to answer this question. If the query produced no results then nil is returned for all values that would have been returned otherwise. If an error occurs during query execution, the function should signal a sql-database-data-error.
string
) (database generic-odbc-database
) &key full-set result-types) ¶%sql-expression
) database &key full-set result-types) ¶Reads the large object content
Internal generic implementation of reconnect.
Chance for the database to cleanup before it is returned to the connection pool.
Execute a prepared statement.
postgresql-stmt
)) ¶Select the last value in sequence NAME in DATABASE.
generic-postgresql-database
)) ¶Increment a sequence in DATABASE.
generic-postgresql-database
)) ¶Set the position of the sequence called NAME in DATABASE.
integer
) (database generic-postgresql-database
)) ¶Returns t and stores the next row in the result set in list or returns nil when result-set is finished.
generic-odbc-database
) list) ¶The internal generic implementation for checking if database type library loaded successfully.
The internal generic implementation of reload-database-types.
Returns the type of the underlying database. For ODBC, needs to query ODBC driver.
Writes data to the large object
T [default] if backend can destroy and create databases.
:upper [default] if means identifiers mapped to UPPER case SQL like CommonSQL API. However, Postgresql maps identifiers to lower case, so PostgreSQL uses a value of :lower for this result.
NIL [default] if database-type supports auto-incrementing columns.
T [default] if database-type supports bigint.
T [default] if database-type supports boolean WHERE clause, such as ’WHERE MARRIED’.
T [default] if database-type supports EXCEPT.
NIL [default] if database-type does not have fancy math.
T [default] if database-type supports INTERSECT.
T if database backend supports prepared statements.
T [default] if database-type supports views.
T [default] if database-type supports boolean UNION.
T [default] if database-type supports views.
T [default] if database can supports transactions.
NIL [default] if database-type does not use column name on DROP INDEX.
NIL [default] if database-type does not require fully qualified column name on DROP INDEX.
Deletes the records represented by OBJECT in the appropriate table of the database associated with OBJECT. If OBJECT is not yet associated with a database, an error is signalled.
standard-db-object
) &key database) ¶Removes the records associated with a given instance
(as determined by key-qualifier-for-instance)
TODO: Doesnt handle normalized classes at all afaict
Executes the SQL command EXPRESSION, which may be an SQL expression or a string representing any SQL statement apart from a query, on the supplied DATABASE which defaults to *DEFAULT-DATABASE*.
%sql-expression
) &key database) ¶command-object
)) ¶command-object
)) ¶query that refers to parameters using "$1", "$2", "$n". These match positions in the parameters list.
Gives fine grained control over sql to be executed and mapped to slots called with a dummy instance (so that class precedence can be used)
standard-db-object
) (sl select-list
) database) ¶command-object
)) ¶command-object
)) ¶Have we already prepared this command object?
Provides a hook which is called within an object oriented call to SELECT with a non-nil value of REFRESH when the View Class instance OBJECT has been updated from the database. A method specialised on STANDARD-DB-OBJECT is provided which has no effects. Methods specialised on particular View Classes can be used to specify any operations that need to be made on View Classes instances which have been updated in calls to SELECT.
standard-db-object
)) ¶select-list
)) ¶automatically generated reader method
select-list
)) ¶automatically generated writer method
select-list
)) ¶automatically generated reader method
select-list
)) ¶automatically generated writer method
command-object
)) ¶list of parameters
command-object
)) ¶This causes the semantics to match cl-sql instead of cl-postgresql
This method is responsible for formatting parameters
as the database expects them (eg: :false is nil, nil is :null, dates are iso8601 strings)
command-object
)) ¶command-object
)) ¶If we want this to be a prepared statement, give it a name to identify it to this session
Executes the SQL query expression QUERY-EXPRESSION, which may be an SQL expression or a string, on the supplied DATABASE which defaults to *DEFAULT-DATABASE*. RESULT-TYPES is a list of symbols which specifies the lisp type for each field returned by QUERY-EXPRESSION. If RESULT-TYPES is nil all results are returned as strings whereas the default value of :auto means that the lisp types are automatically computed for each field. FIELD-NAMES is t by default which means that the second value returned is a list of strings representing the columns selected by QUERY-EXPRESSION. If FIELD-NAMES is nil, the list of column names is not returned as a second value. FLATP has a default value of nil which means that the results are returned as a list of lists. If FLATP is t and only one result is returned for each record selected by QUERY-EXPRESSION, the results are returned as elements of a list.
sql-object-query
) &key database result-types flatp field-names) ¶%sql-expression
) &key database result-types flatp field-names) ¶select-list
)) ¶automatically generated reader method
select-list
)) ¶automatically generated writer method
select-list
)) ¶automatically generated reader method
select-list
)) ¶automatically generated writer method
sql-connection-error
)) ¶sql-database-error
)) ¶sql-database-error
)) ¶sql-connection-error
)) ¶sql-database-error
)) ¶sql-database-data-error
)) ¶sql-database-error
)) ¶sql-user-error
)) ¶sql-database-warning
)) ¶Updates the slot values of the View Class instance OBJECT using the attribute values of the appropriate table of DATABASE which defaults to the database associated with OBJECT or, if OBJECT is not associated with a database, *DEFAULT-DATABASE*. Join slots are updated but instances of the class on which the join is made are not updated.
standard-db-object
) &key database) ¶Updates a database object with the current values stored in the database
TODO: Should this update immediate join slots similar to build-objects?
Can we just call build-objects?, update-objects-joins?
Updates the value stored in the column represented by the slot, specified by the CLOS slot name SLOT, of View Class instance OBJECT. DATABASE defaults to *DEFAULT-DATABASE* and specifies the database in which the update is made only if OBJECT is not associated with a database. In this case, a record is created in DATABASE and the attribute represented by SLOT is initialised from the value of the supplied slots with other attributes having default values. Furthermore, OBJECT becomes associated with DATABASE.
standard-db-object
) slot &key database) ¶just call update-records-from-slots which now handles this.
This function is only here to maintain backwards compatibility in the public api
Updates the values stored in the columns represented by the
slots, specified by the CLOS slot names SLOTS, of View Class
instance OBJECT. DATABASE defaults to *DEFAULT-DATABASE* and
specifies the database in which the update is made only if OBJECT
is not associated with a database. In this case, a record is
created in the appropriate table of DATABASE and the attributes
represented by SLOTS are initialised from the values of the
supplied slots with other attributes having default
values. Furthermore, OBJECT becomes associated with DATABASE.
standard-db-object
) slots &key database) ¶For a given list of slots, update all records associated with those slots
and classes.
Generally this will update the single record associated with this object, but for normalized classes might update as many records as there are inheritances
Using an instance of a View Class, OBJECT, update the table that stores its instance data. DATABASE defaults to *DEFAULT-DATABASE* and specifies the database in which the update is made only if OBJECT is not associated with a database. In this case, a record is created in the appropriate table of DATABASE using values from the slot values of OBJECT, and OBJECT becomes associated with DATABASE.
standard-db-object
) &key database) ¶Updates the records in the database associated with this object if view-database slot on the object is nil then the object is assumed to be new and is inserted
Updates the slot value, specified by the CLOS slot name SLOT, of the View Class instance OBJECT using the attribute values of the appropriate table of DATABASE which defaults to the database associated with OBJECT or, if OBJECT is not associated with a database, *DEFAULT-DATABASE*. Join slots are updated but instances of the class on which the join is made are not updated.
standard-db-object
) slot &key database) ¶Pulls the value of a given slot form the database and stores that in the appropriate slot on instance
select-list
)) ¶class-and-slots
)) ¶get the view-table of the view-class of o
standard-db-class
)) ¶automatically generated reader method
standard-db-class
)) ¶automatically generated writer method
standard-db-class
) slot-name direct-slots) ¶sb-mop
.
standard-db-class
)) ¶Need to sort order of class slots so they are the same across implementations.
sb-mop
.
standard-db-class
) &rest initargs) ¶sb-mop
.
standard-db-class
) &rest initargs) ¶sb-mop
.
standard-db-class
)) ¶sb-mop
.
standard-db-object
) &rest all-keys &key &allow-other-keys) ¶command-object
) &key &allow-other-keys) ¶generic-odbc-database
) &rest all-keys) ¶standard-db-class
) &rest all-keys &key direct-superclasses base-table qualifier normalizedp &allow-other-keys) ¶view-class-direct-slot-definition
) &key &allow-other-keys) ¶view-class-direct-slot-definition
) &rest initargs &key db-constraints db-kind type &allow-other-keys) ¶sql-ident-table
) &optional environment) ¶sql-relational-exp
) &optional environment) ¶sql-ident-attribute
) &optional environment) ¶%sql-expression
) stream) ¶standard-db-class
) &rest all-keys &key base-table normalizedp direct-superclasses qualifier &allow-other-keys) ¶generic-postgresql-database
) (slot (eql clsql-sys::has-table-pg_roles)
)) ¶standard-db-class
) instance slot-def) ¶Handle auto syncing values to the database if *db-auto-sync* is t
sb-mop
.
standard-db-class
) instance slot-def) ¶When a slot is unbound but should contain a join object or a value from a normalized view-class, then retrieve and set those slots, so the value can be returned
sb-mop
.
standard-db-class
) (superclass standard-class
)) ¶sb-mop
.
Function ‘parse-decimal-number‘ signals this condition when it couldn’t parse a decimal number from string.
parse-error
.
condition
.
Used to signal an error in connecting to a database.
Used to signal an error with the SQL data passed to a database.
:expression
, nil
This slot is read-only.
Used to signal an error in a CLSQL database interface.
(quote nil)
:error-id
This slot is read-only.
(quote nil)
:secondary-error-id
This slot is read-only.
(quote nil)
:message
This slot is read-only.
(quote nil)
:database
This slot is read-only.
:database
This slot is read-only.
simple-error
.
sql-condition
.
Used to signal an error when the database connection is no longer usable.
Used to signal an error when the database
cannot currently process a valid interaction because, for
example, it is still executing another command possibly issued by
another user.
Used to signal an error when the database times out while processing some operation.
Used to signal lisp errors inside CLSQL.
(quote "unspecified error")
:message
This slot is read-only.
sql-condition
.
warning
.
(quote nil)
:message
This slot is read-only.
structure-object
.
fixnum
0
structure-object
.
fixnum
0
fixnum
0
fixnum
0
fixnum
0
common-lisp
.
fixnum
0
fixnum
0
fixnum
0
query that refers to parameters using "$1", "$2", "$n". These match positions in the parameters list.
:expression
list of parameters
:parameters
If we want this to be a prepared statement, give it a name to identify it to this session
""
:prepared-name
Have we already prepared this command object?
:has-been-prepared
:connection-spec
:pool-database-type
(clsql-sys:make-process-lock "connection pool")
This class is the supertype of all databases handled by CLSQL.
(setf attribute-cache)
.
attribute-cache
.
(setf command-recording-stream)
.
command-recording-stream
.
(setf conn-pool)
.
conn-pool
.
connection-spec
.
database-abort-transaction
.
database-abort-transaction
.
database-add-attribute
.
database-attribute-type
.
(setf database-autocommit)
.
database-autocommit
.
database-commit-transaction
.
database-commit-transaction
.
database-disconnect
.
database-dump-result-set
.
database-dump-result-set
.
database-execute-command
.
database-execute-command
.
database-list-attributes
.
database-list-indexes
.
database-list-table-indexes
.
database-list-tables
.
database-list-tables-and-sequences
.
database-list-views
.
database-name
.
database-prepare
.
database-query
.
database-query
.
database-query-result-set
.
database-query-result-set
.
database-rename-attribute
.
database-start-transaction
.
database-start-transaction
.
database-state
.
database-store-next-row
.
database-store-next-row
.
database-type
.
(setf database-view-classes)
.
database-view-classes
.
print-object
.
(setf record-caches)
.
record-caches
.
(setf result-recording-stream)
.
result-recording-stream
.
(setf transaction)
.
transaction
.
(setf transaction-level)
.
transaction-level
.
:name
This slot is read-only.
Required to use connection pool.
:connection-spec
This slot is read-only.
:unknown
:database-type
This slot is read-only.
External format character encoding.
:encoding
:closed
This slot is read-only.
t
0
:conn-pool
Internal cache of table attributes. It is keyed by table-name. Values
are a list of ACTION specified for table and any cached value of list-attributes-types.
(make-hash-table :size 100 :test (quote equal))
Encapsulate same behavior across odbc and aodbc backends.
close-query-fn
.
database-attribute-type
.
database-disconnect
.
database-dump-result-set
.
database-execute-command
.
database-last-auto-increment-id
.
database-list-attributes
.
database-list-tables
.
database-list-views
.
(setf database-odbc-db-type)
.
database-odbc-db-type
.
database-output-sql
.
database-query
.
database-query-result-set
.
database-store-next-row
.
dbi-package
.
disconnect-fn
.
fetch-row-fn
.
initialize-instance
.
list-all-database-tables-fn
.
list-all-table-columns-fn
.
(setf odbc-conn)
.
odbc-conn
.
sql-fn
.
:dbi-package
This slot is read-only.
:odbc-conn
This slot is read-only.
This slot is read-only.
This slot is read-only.
This slot is read-only.
This slot is read-only.
:odbc-db-type
Encapsulate same behavior across postgresql and postgresql-socket backends.
auto-increment-sequence-name
.
database-add-autoincrement-sequence
.
database-attribute-type
.
database-create-sequence
.
database-drop-sequence
.
database-generate-column-definition
.
database-last-auto-increment-id
.
database-list-attributes
.
database-list-indexes
.
database-list-sequences
.
database-list-table-indexes
.
database-list-tables
.
database-list-views
.
database-prepare
.
database-remove-autoincrement-sequence
.
database-sequence-last
.
database-sequence-next
.
database-set-sequence-position
.
has-table-pg_roles
.
slot-unbound
.
boolean
This slot is read-only.
Collects the classes, slots and their respective sql representations
so that update-instance-from-recors, find-all, build-objects can share this
info and calculate it once. Joins are select-lists for each immediate join-slot
but only if make-select-list is called with do-joins-p
:view-class
:select-list
:slot-list
:joins
:join-slots
A literal SQL expression.
""
:string
An SQL Assignment expression.
An SQL between expression.
An SQL function expression.
An SQL identifer.
clsql-sys::+null-string+
:name
An SQL Attribute identifier.
An SQL table identifier.
:table-alias
An SQL SELECT query.
:selections
:all
:flatp
:set-operation
:distinct
:from
:where
:group-by
:having
:limit
:offset
:order-by
:inner-join
:on
An SQL query modifier expression.
An SQL relational expression.
An SQL set expression.
An SQL typecast expression.
An SQL ’like’ that upcases its arguments.
An SQL value expression.
Superclass for all CLSQL View Classes.
attribute-value-pairs
.
choose-database-for-instance
.
delete-instance-records
.
filter-select-list
.
get-slot-value-from-record
.
initialize-instance
.
instance-refreshed
.
primary-key-slot-values
.
update-instance-from-records
.
update-record-from-slot
.
update-record-from-slots
.
update-records-from-instance
.
update-slot-default-values
.
update-slot-from-db-value
.
update-slot-from-record
.
update-slot-with-null
.
view-classes-and-slots-by-name
.
view-database
.
:view-database
This slot is read-only.
An integer larger than a 32-bit integer, this width may vary by SQL implementation.
A type which outputs a SQL boolean value, though any lisp type can be stored in the slot.
An integer smaller than a 32-bit integer, but may be larger than a smallint. This width may vary by SQL implementation.
An integer smaller than a 32-bit integer. this width may vary by SQL implementation.
An 8-bit integer, this width may vary by SQL implementation.
A positive integer as returned by GET-UNIVERSAL-TIME.
A variable length string for the SQL varchar type.
List of active database objects.
For caching generated SQL strings, set to NIL to disable.
stream which accumulates SQL output
List of whitespace characters for this lisp implementation.
for places and values (as an &rest plist) if place-n is null set it to value-n
Creates a weak hash table for use in a cache.
pops n items off of a list in place and returns their values in a new list
if n > the length of the list in place, then we return the full list, setting the place to nil
a helper for dealing with lists of sql clauses
Interpolate ARGS into CONTROL-STRING as if by FORMAT, and synchronously execute the result using a Bourne-compatible shell, returns (VALUES string-output error-output exit-status)
Internal function used by database-list-tables and database-list-views
We want to quote an identifier if it came to us as a string or if it has special characters in it.
Given a list of objects that we are trying to join to, pull the correct ones for this object
Force disconnection of a connection from the pool.
Given lists of classes froms wheres and inner-join compile a list of tables that should appear in the FROM section of the query.
This includes any immediate join classes from each of the classes
Get the slot definitions for the joins slots specified as slot-names if slot-names is :immediate, :deferred or (or :all t) return all of that type of slot definitions
Try to find a working database connection in the pool or create a new one if needed. This performs 1 query against the DB to ensure it’s still valid. When possible (postgres, mssql) that query will be a reset command to put the connection back into its default state.
Do all of the home-keys have values ?
returns a list of all join-classes needed for a list of classes
Used by find-all to build objects.
THIS NEEDS TO MATCH THE ORDER OF FULL-SELECT-LIST
TODO: this caching scheme seems bad for a number of reasons
* order is not guaranteed so references being held by one object
might change to represent a different database row (seems HIGHLY
suspect)
* also join objects are overwritten rather than refreshed
TODO: the way we handle immediate joins seems only valid if it is a single object. I suspect that making a :set :immediate join column would result in an invalid number of objects returned from the database, because there would be multiple rows per object, but we would return an object per row
Be careful this function will disconnect connections without regard to whether another thread is actively using them.
Correctly creates a sql ’and’ expression for the clauses
ignores any nil clauses
returns a single child expression if there is only one
returns an ’and’ expression if there are many
returns nil if there are no children
Correctly creates a sql ’and’ expression for the clauses
ignores any nil clauses
returns a single child expression if there is only one
returns an ’and’ expression if there are many
returns nil if there are no children
Correctly creates a sql ’or’ expression for the clauses
ignores any nil clauses
returns a single child expression if there is only one
returns an ’or’ expression if there are many
returns nil if there are no children
Correctly creates a sql ’or’ expression for the clauses
ignores any nil clauses
returns a single child expression if there is only one
returns an ’or’ expression if there are many
returns nil if there are no children
Create a new database identifier by combining parts in a reasonable way
Computes the Lisp type for a user-specified type.
Returns a walltime for the given date
the day number within the year of the date DATE. For example, 1987 1 1 returns 1
the number of days in MONTH of YEAR, observing Gregorian leap year rules
Split a string with delimiter, from KMRCL.
if this is a single item in a list return it
Some MOPs, like openmcl 0.14.2, cons attribute values in a list.
Some MOPs, like openmcl 0.14.2, cons attribute values in a list.
Is this a normalized class and if so is the slot one of our direct slots?
Subtract each DURATION from TIME, returning a new duration value.
like slot-value except it accepts slot-names or defs and returns nil when the slot is unbound
like slot-value except it accepts slot-names or defs
Return a list of field name strings from a fields form
Returns a copy of the given plist with indicated key-value pairs removed. keys are searched with #’MEMBER
Called by SELECT to generate object query results when the
View Classes VIEW-CLASSES are passed as arguments to SELECT.
TODO: the caching scheme of passing in instances and overwriting their
values seems bad for a number of reasons
* order is not guaranteed so references being held by one object
might change to represent a different database row (seems HIGHLY
suspect)
TODO: the way we handle immediate joins seems only valid if it is a single
object. I suspect that making a :set :immediate join column would result
in an invalid number of objects returned from the database, because there
would be multiple objects returned from the database
Find the first / primary key of a normalized object
Find connection pool in hash table, creates a new connection pool if not found
Looks up a direct-slot-definition by name
Looks up a direct-slot-definition by name
Return a list of field name strings from a fields form
Returns a list of sql-ref of things to select for the given classes
THIS NEEDS TO MATCH THE ORDER OF build-objects
Turns key class and slot-def into a sql-expression representing the
table and column it comes from
used by things like make-select-list, update-slot-from-record
Returns list of join slots for a class.
if a retrieval method is specified only return slots of that type if the retrieval method is T, nil or :all return all join slots
Given a list of objects and a join slot-def get the objects that need to be
joined to the input objects
we will query in batches as large as batch-size
Builds the join where clause based on the keys of the join slot and values of the object
Get the join class for a given join slot
get the join class name for a given join slot
Get the join-slot db-info value associated with a key
takes a slot def and returns whether or not it is a join slot
Creates a sql-expression expressing the join between the home-key on the table and its respective key on the joined-to-table
if this is a join slot return the retrieval param in the db-info
takes a slot def and returns whether or not it is a key
Generate a boolean sql-expression that identifies an object by its keys
takes a slot def and returns whether or not it is a key
t if YEAR is a leap yeap in the Gregorian calendar
Create a new class-and-slots object
Make a select-list for the current class (or class-and-slots) object.
Normalized classes share a single key for all their key slots
Is this a normalized class and if so is the slot not one of our direct slots?
Gets an ordered list of direct class slots
Return the zero-based day number for the given DAY keyword.
Return the zero-based month number for the given MONTH keyword.
ensure that we do not output a "where" sql keyword when we will not output a clause. Also sets *in-subselect* to use SQL parentheticals as needed.
return a wall-time from a duration string
return the wall-time corresponding to the given ISO 8601 datestring
From KMRCL.
Return two values: the list of select-args up to the first keyword, uninclusive, and the args from that keyword to the end.
Release a database connection to the pool. The backend will have a chance to do cleanup.
Returns a new string in which all the occurences of the part
is replaced with replacement. [FROM http://cl-cookbook.sourceforge.net/strings.html#manip]
Search within string1 for search-string, replace with replace-string, non-destructively.
determines if two sql select references are equal using database identifier equal
returns nil if the slot does not have a default constraint
Get the slots for this class, if normalized this is only the direct slots otherwiese its all the slots
Should the symbols case be preserved, or should we convert to default casing
Check if a string has any special characters
Top-level call for generating SQL strings. Returns an SQL string appropriate for DATABASE which corresponds to the supplied lisp expression SQL-EXPR.
Substitutes a string for a single matching character of a string
Replace all instances of a chars with a string. repl-alist is an assoc list of characters and replacement strings.
Substitutes a string for a single matching character of a string
Returns a date for the given wall time (obvious loss in resolution)
Returns T if no two of its arguments are numerically equal, NIL otherwise.
try to turn what we got representing the slot into a slot name
handle pulling any autoincrement values into the object Also handles normalized key chaining
t if DATE (year month day) exists in the Gregorian calendar
t if MONTH exists in the Gregorian calendar
standard-db-class
) database &key transactions) ¶A function to help us update a given table (based on class-and-slots) with values from an object
attribute-value-pair
)) ¶automatically generated reader method
attribute-value-pair
)) ¶automatically generated writer method
class-and-slots
)) ¶build sql-ident-attributes for a given class-and-slots
class-and-slots
) (o standard-db-object
) database) ¶for a given class-and-slots and object, create the sql-expression & value pairs that need to be sent to the database
The sequence name to create for this autoincremnt column on this class if returns nil, there is no associated sequence
generic-postgresql-database
)) ¶postgresql-stmt
)) ¶automatically generated reader method
Used by the oodml functions to select which
database object to use. Chooses the database associated with the
object primarily, falls back to the database provided as an argument
or the *DEFAULT-DATABASE*.
standard-db-object
) &optional database) ¶Determine which database connection to use for a standard-db-object. Errs if none is available.
generic-odbc-database
)) ¶automatically generated reader method
sql-set-exp
)) ¶sql-function-exp
)) ¶sql-typecast-exp
)) ¶sql-value-exp
)) ¶sql-relational-exp
)) ¶sql-ident-table
)) ¶sql-ident-attribute
)) ¶list
)) ¶transaction
)) ¶automatically generated reader method
transaction
)) ¶automatically generated writer method
Abort current transaction in DATABASE.
Add the attribute to the table.
If a database needs to add a sequence for its
autoincrement to work, this is where it should go. Default is
that it doesnt so just return nil
standard-db-class
) (database generic-postgresql-database
)) ¶Commit current transaction in DATABASE.
generic-postgresql-database
)) ¶view-class-slot-definition-mixin
) &optional database find-class-p) ¶standard-db-class
) &optional database find-class-p) ¶the majority of this function is in expressions.lisp
this is here to make loading be less painful (try-recompiles) in SBCL
A function that takes whatever you give it, recursively coerces it,
and returns a database-identifier.
(escaped-database-identifiers *any-reasonable-object*) should be called to
produce a string that is safe to splice directly into sql strings.
This function should NOT throw errors when database is nil
find-class-p should be T if we want to search for classes
and check their use their view table. Should be used
on symbols we are sure indicate tables
;; metaclasses has further typecases of this, so that it will
;; load less painfully (try-recompiles) in SBCL
Many databases have the notion of an auto-increment
id; i.e. a sequence implicitly on a table. This function should
return that ID.
generic-odbc-database
)) ¶automatically generated reader method
generic-odbc-database
)) ¶automatically generated writer method
Returns an SQL string appropriate for DATABASE
and corresponding to the lisp expression
EXPR. DATABASE-OUTPUT-SQL is called by OUTPUT-SQL when no more
specific method exists for EXPR.
(eql t)
) (database generic-odbc-database
)) ¶vector
) database) ¶list
) database) ¶number
) database) ¶(eql t)
) database) ¶symbol
) database) ¶string
) database) ¶standard-db-class
) database) ¶If a database needs to add a sequence for its
autoincrement to work, this is where it should go. Default is
that it doesnt so just return nil
standard-db-class
) (database generic-postgresql-database
)) ¶Rename the attribute in the table to NEWNAME.
Start a transaction in DATABASE.
Given a column constraint returns its
database-specific name. For example, auto-increment constraints can
have different names in different database engines.
Remove all data from database.
attribute-value-pair
)) ¶automatically generated reader method
attribute-value-pair
)) ¶automatically generated writer method
generic-odbc-database
)) ¶automatically generated reader method
generic-odbc-database
)) ¶automatically generated reader method
null
)) ¶%database-identifier
)) ¶automatically generated reader method
%database-identifier
)) ¶automatically generated writer method
sql-value-conversion-error
)) ¶sql-value-conversion-error
)) ¶generic-odbc-database
)) ¶automatically generated reader method
standard-db-object
) slot &key database) ¶Used to copy values from the database into the object used by things like find-all and select
generic-postgresql-database
)) ¶automatically generated reader method
postgresql-stmt
)) ¶automatically generated reader method
id
.
standard-db-class
)) ¶automatically generated reader method
standard-db-class
)) ¶automatically generated writer method
TODO: is this deprecated? there are no uses anywhere in clsql
generic-odbc-database
)) ¶automatically generated reader method
generic-odbc-database
)) ¶automatically generated reader method
standard-db-class
)) ¶automatically generated reader method
standard-db-class
)) ¶automatically generated writer method
standard-db-class
)) ¶automatically generated reader method
standard-db-class
)) ¶automatically generated writer method
generic-odbc-database
)) ¶automatically generated reader method
generic-odbc-database
)) ¶automatically generated writer method
Return the unique ID of a database object.
Writes an SQL string appropriate for DATABASE
and corresponding to the lisp expression EXPR to
*SQL-STREAM*. The function SQL-OUTPUT is a top-level call for
generating SQL strings which initialises *SQL-STREAM*, calls
OUTPUT-SQL and reads the generated SQL string from
*SQL-STREAM*.
sql-escape-string-exp
) database) ¶sql-create-view
) database) ¶sql-create-table
) database) ¶sql-update
) database) ¶sql-delete
) database) ¶sql-insert
) database) ¶sql-object-query
) database) ¶sql-set-exp
) database) ¶sql-query-modifier-exp
) database) ¶sql-between-exp
) database) ¶sql-function-exp
) database) ¶sql-typecast-exp
) database) ¶sql-value-exp
) database) ¶sql-assignment-exp
) database) ¶sql-upcase-like
) database) ¶sql-relational-exp
) database) ¶sql-ident-attribute
) database) ¶sql-ident-table
) database) ¶%database-identifier
) database) ¶%sql-expression
) database) ¶Returns a list (or other object suitable for
use as the key of an EQUAL hash table) which uniquely identifies
the arguments EXPR and DATABASE.
vector
) database) ¶sql-ident-table
) database) ¶sql-ident-attribute
) database) ¶transaction
)) ¶automatically generated reader method
standard-db-object
) &key class slots) ¶Returns the values of all key-slots for a given class
postgresql-stmt
)) ¶automatically generated reader method
transaction
)) ¶automatically generated reader method
transaction
)) ¶automatically generated writer method
Turns an object representing a table into the :from part of the sql expression that will be executed
class-and-slots
)) ¶automatically generated reader method
class-and-slots
)) ¶automatically generated writer method
view-class-slot-definition-mixin
)) ¶view-class-slot-definition-mixin
)) ¶Internal slot storing the :type specified by user.
generic-odbc-database
)) ¶automatically generated reader method
select-list
)) ¶sql-warning
)) ¶postgresql-stmt
)) ¶automatically generated reader method
postgresql-stmt
)) ¶automatically generated writer method
transaction
)) ¶transaction
)) ¶nil or :committed
null
)) ¶%database-identifier
)) ¶automatically generated reader method
%database-identifier
)) ¶automatically generated writer method
standard-db-object
) classes-and-slots) ¶Makes sure that if a class has unfilled slots that claim to have a default,
that we retrieve those defaults from the database
TODO: use update-slots-from-record (doesnt exist) instead to batch this!
standard-db-object
) slotdef value) ¶This gets a value from the database and turns it itno a lisp value based on the slot’s slot-db-reader or baring that read-sql-value
Called to update a slot when its column has a NULL
value. If nulls are allowed for the column, the slot’s value will be
nil, otherwise its value will be set to the result of calling
DATABASE-NULL-VALUE on the type of the slot.
standard-db-object
) slotdef) ¶sets a slot to the void value of the slot-def (usually nil)
sql-value-conversion-error
)) ¶sql-value-conversion-error
)) ¶select-list
)) ¶automatically generated reader method
class-and-slots
)) ¶automatically generated reader method
select-list
)) ¶automatically generated writer method
class-and-slots
)) ¶automatically generated writer method
standard-db-class
)) ¶automatically generated reader method
standard-db-class
)) ¶automatically generated writer method
view-class-slot-definition-mixin
)) ¶view-class-slot-definition-mixin
)) ¶A string naming the (possibly automatically generated) sequence for a slot with an :auto-increment constraint.
view-class-slot-definition-mixin
)) ¶view-class-slot-definition-mixin
)) ¶The name of the SQL column this slot is stored in. Defaults to the slot name.
view-class-slot-definition-mixin
)) ¶view-class-slot-definition-mixin
)) ¶A keyword symbol representing a single SQL column constraint or list of such symbols.
view-class-slot-definition-mixin
)) ¶view-class-slot-definition-mixin
)) ¶Description of the join.
view-class-slot-definition-mixin
)) ¶view-class-slot-definition-mixin
)) ¶The kind of DB mapping which is performed for this slot. :base indicates the slot maps to an ordinary column of the DB view. :key indicates that this slot corresponds to part of the unique keys for this view, :join indicates ... and :virtual indicates that this slot is an ordinary CLOS slot. Defaults to :base.
view-class-slot-definition-mixin
)) ¶view-class-slot-definition-mixin
)) ¶If a string, then when reading values from the DB, the string will be used for a format string, with the only value being the value from the database. The resulting string will be used as the slot value. If a function then it will take one argument, the value from the database, and return the value that should be put into the slot.
view-class-slot-definition-mixin
)) ¶view-class-slot-definition-mixin
)) ¶A string which will be used as the type specifier for this slots column definition in the database.
view-class-slot-definition-mixin
)) ¶view-class-slot-definition-mixin
)) ¶If a string, then when reading values from the slot for the DB, the string will be used for a format string, with the only value being the value of the slot. The resulting string will be used as the column value in the DB. If a function then it will take one argument, the value of the slot, and return the value that should be put into the database.
view-class-slot-definition-mixin
)) ¶view-class-slot-definition-mixin
)) ¶Value to store if the SQL value is NULL. Default is NIL.
standard-db-object
) slots-to-match) ¶If it’s normalized, find the class that actually contains
the slot that’s tied to the db,
otherwise just search the current class
A method that collects all the classes and storable slots
that need to be read from or written to the database.
to-database-p should be T if we are writing this object to the database
and nil when we are reading this object from the database
Get a list of all the tables we need to update and the slots on them
for non normalized classes we return the class and all its storable slots
for normalized classes we return a list of direct slots and the class they
came from for each normalized view class
to-database-p is provided so that we can read / write different data
to the database in different circumstances
(specifically clsql-helper:dirty-db-slots-mixin which only updates slots
that have changed )
standard-db-object
)) ¶automatically generated reader method
standard-db-class
)) ¶class-and-slots
)) ¶Used to signal cases where CLSQL is going to fail at mapping your database correctly
:bad-component
This slot is read-only.
A database identifier represents a string/symbol ready to be spliced
into a sql string. It keeps references to both the escaped and
unescaped versions so that unescaped versions can be compared to the
results of list-tables/views/attributes etc. It also allows you to be
sure that an identifier is escaped only once.
(escaped-database-identifiers *any-reasonable-object*) should be called to
produce a string that is safe to splice directly into sql strings.
(unescaped-database-identifier *any-reasonable-object*) is generally what you pass to it with the exception that symbols have been clsql-sys:sql-escape which converts to a string and changes - to _ (so that unescaped can be compared to the results of eg: list-tables)
Represents an attribute-sql-expression and its value, used to pass to insert/update. Was previously a two list
A helper class to keep track of which slot-defs from a
table need to be updated, a normalized class might have many of these
because each of its parent classes might represent some other table and we
need to match which slots came from which parent class/table
Encapsulate same behavior across backends.
An SQL CREATE TABLE statement.
An SQL CREATE VIEW statement.
An SQL DELETE statement.
An escaped string string expression (postgresql E’stuff’) .
common-lisp
.
:string
An SQL INSERT statement.
An SQL UPDATE statement.
Metaclass for all CLSQL View Classes.
standard-class
.
%install-class
.
compute-effective-slot-definition
.
compute-slots
.
database-add-autoincrement-sequence
.
database-identifier
.
database-pkey-constraint
.
database-remove-autoincrement-sequence
.
direct-slot-definition-class
.
effective-slot-definition-class
.
finalize-inheritance
.
initialize-instance
.
(setf key-slots)
.
key-slots
.
(setf normalizedp)
.
normalizedp
.
(setf object-definition)
.
object-definition
.
reinitialize-instance
.
(setf slot-value-using-class)
.
slot-value-using-class
.
validate-superclass
.
(setf view-class-qualifier)
.
view-class-qualifier
.
(setf view-table)
.
view-table
.
view-table-exp
.
:view-table
:definition
:qualifier
standard-direct-slot-definition
.
view-class-slot-definition-mixin
.
standard-effective-slot-definition
.
view-class-slot-definition-mixin
.
database-identifier
.
(setf specified-type)
.
specified-type
.
(setf view-class-slot-autoincrement-sequence)
.
view-class-slot-autoincrement-sequence
.
(setf view-class-slot-column)
.
view-class-slot-column
.
(setf view-class-slot-db-constraints)
.
view-class-slot-db-constraints
.
(setf view-class-slot-db-info)
.
view-class-slot-db-info
.
(setf view-class-slot-db-kind)
.
view-class-slot-db-kind
.
(setf view-class-slot-db-reader)
.
view-class-slot-db-reader
.
(setf view-class-slot-db-type)
.
view-class-slot-db-type
.
(setf view-class-slot-db-writer)
.
view-class-slot-db-writer
.
(setf view-class-slot-void-value)
.
view-class-slot-void-value
.
The name of the SQL column this slot is stored in. Defaults to the slot name.
:column
The kind of DB mapping which is performed for this slot. :base indicates the slot maps to an ordinary column of the DB view. :key indicates that this slot corresponds to part of the unique keys for this view, :join indicates ... and :virtual indicates that this slot is an ordinary CLOS slot. Defaults to :base.
keyword
:base
:db-kind
If a string, then when reading values from the DB, the string will be used for a format string, with the only value being the value from the database. The resulting string will be used as the slot value. If a function then it will take one argument, the value from the database, and return the value that should be put into the slot.
:db-reader
If a string, then when reading values from the slot for the DB, the string will be used for a format string, with the only value being the value of the slot. The resulting string will be used as the column value in the DB. If a function then it will take one argument, the value of the slot, and return the value that should be put into the database.
:db-writer
A string which will be used as the type specifier for this slots column definition in the database.
:db-type
A keyword symbol representing a single SQL column constraint or list of such symbols.
:db-constraints
Value to store if the SQL value is NULL. Default is NIL.
:void-value
Description of the join.
:db-info
Internal slot storing the :type specified by user.
clsql-sys::specified-type
A string naming the (possibly automatically generated) sequence for a slot with an :auto-increment constraint.
:autoincrement-sequence
Jump to: | %
(
A B C D E F G H I J K L M N O P Q R S T U V W |
---|
Jump to: | %
(
A B C D E F G H I J K L M N O P Q R S T U V W |
---|
Jump to: | *
+
A B C D E F G H I J K L M N O P Q R S T U V W Y |
---|
Jump to: | *
+
A B C D E F G H I J K L M N O P Q R S T U V W Y |
---|
Jump to: | %
A B C D E F G I K L M O P R S T U V W |
---|
Jump to: | %
A B C D E F G I K L M O P R S T U V W |
---|