The clsql Reference Manual

Table of Contents

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

The clsql Reference Manual

This is the clsql Reference Manual, version 6.4, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:43:53 2018 GMT+0.


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

1 Introduction

CLSQL is a Common Lisp to SQL engine interface by Kevin M.
Rosenberg. It includes both functional and object oriented subsystems
for data definition and manipulation as well as an integrated symbolic
SQL syntax.

CLSQL supports a number of RDBMS and uses the UFFI (http://uffi.kpe.io)
library for compatibility with Allegro CL, Lispworks, CMUCL, SBCL and
OpenMCL.

CLSQL has incorporated code from the following projects. At this point
in 2004, development of has stopped on these incorporated projects.
  - Pierre Mai's MaiSQL
  - onShore Development's UncommonSQL
  - Paul Meurer's SQL/ODBC
  - Cadabra's Oracle interface

CLSQL's home is http://clsql.kpe.io.

Documentation is available as a PDF file in doc/clsql.pdf and as HTML
files in doc/html.tar.gz.


CONTRIBUTING
------------

If you would like to report a bug please do so through the clsql
mailing list. http://lists.kpe.io/mailman/listinfo/CLSQL

Patches are welcome. It will be much easier for us to incorporate if
you use [git](http://git-scm.com/). Please keep distinct changes in
seperate patches as it makes it much easier to review. If you have
something small to to send to the mailing list `git format-patch` is
your friend.

If you have a bigger set of patches then I recommend creating a fork
on github from https://github.com/UnwashedMeme/clsql. Once your
patches are available there either issue a pull request or let us know
about it on the mailing list.

* http://help.github.com/ has some excellent tutorials on getting
  started.
* http://git-scm.com/book is an excellent in depth tutorial on how to
  use git effectively.


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

2 Systems

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


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

2.1 clsql

Maintainer

Kevin M. Rosenberg <kmr@debian.org>

Author

Kevin Rosenberg <kevin@rosenberg.net>

License

Lessor Lisp General Public License

Description

Common Lisp SQL Interface library

Long Description

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.

Version

6.4

Source

clsql.asd (file)

Component

sql (module)


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

3 Modules

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


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

3.1 clsql/sql

Parent

clsql (system)

Location

sql/

Components

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

3.2 clsql/sql/base

Parent

sql (module)

Location

sql/

Components

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

3.3 clsql/sql/database

Dependency

base (module)

Parent

sql (module)

Location

sql/

Components

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

3.4 clsql/sql/syntax

Dependency

database (module)

Parent

sql (module)

Location

sql/

Components

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

3.5 clsql/sql/functional

Dependency

syntax (module)

Parent

sql (module)

Location

sql/

Components

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

3.6 clsql/sql/object

Dependency

functional (module)

Parent

sql (module)

Location

sql/

Components

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

3.7 clsql/sql/generic

Dependency

functional (module)

Parent

sql (module)

Location

sql/

Components

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

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


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

4.1 Lisp


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

4.1.1 clsql.asd

Location

clsql.asd

Systems

clsql (system)

Packages

clsql-system


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

4.1.2 clsql/sql/base/cmucl-compat.lisp

Parent

base (module)

Location

sql/cmucl-compat.lisp

Packages

cmucl-compat

Exported Definitions

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

4.1.3 clsql/sql/base/package.lisp

Parent

base (module)

Location

sql/package.lisp

Packages

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

4.1.4 clsql/sql/base/kmr-mop.lisp

Dependency

package.lisp (file)

Parent

base (module)

Location

sql/kmr-mop.lisp

Internal Definitions

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

4.1.5 clsql/sql/base/base-classes.lisp

Dependency

package.lisp (file)

Parent

base (module)

Location

sql/base-classes.lisp

Exported Definitions
Internal Definitions

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

4.1.6 clsql/sql/base/conditions.lisp

Dependency

base-classes.lisp (file)

Parent

base (module)

Location

sql/conditions.lisp

Exported Definitions
Internal Definitions

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

4.1.7 clsql/sql/base/db-interface.lisp

Dependency

conditions.lisp (file)

Parent

base (module)

Location

sql/db-interface.lisp

Exported Definitions
Internal Definitions

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

4.1.8 clsql/sql/base/decimals.lisp

Dependencies
Parent

base (module)

Location

sql/decimals.lisp

Packages

decimals

Exported Definitions
Internal Definitions

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

4.1.9 clsql/sql/base/utils.lisp

Dependencies
Parent

base (module)

Location

sql/utils.lisp

Exported Definitions
Internal Definitions

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

4.1.10 clsql/sql/base/time.lisp

Dependencies
Parent

base (module)

Location

sql/time.lisp

Exported Definitions
Internal Definitions

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

4.1.11 clsql/sql/base/generics.lisp

Dependency

package.lisp (file)

Parent

base (module)

Location

sql/generics.lisp

Exported Definitions
Internal Definitions

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

4.1.12 clsql/sql/database/initialize.lisp

Parent

database (module)

Location

sql/initialize.lisp

Exported Definitions

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

4.1.13 clsql/sql/database/database.lisp

Dependency

initialize.lisp (file)

Parent

database (module)

Location

sql/database.lisp

Exported Definitions
Internal Definitions

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

4.1.14 clsql/sql/database/recording.lisp

Dependency

database.lisp (file)

Parent

database (module)

Location

sql/recording.lisp

Exported Definitions
Internal Definitions

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

4.1.15 clsql/sql/database/pool.lisp

Dependency

database.lisp (file)

Parent

database (module)

Location

sql/pool.lisp

Exported Definitions
Internal Definitions

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

4.1.16 clsql/sql/syntax/expressions.lisp

Parent

syntax (module)

Location

sql/expressions.lisp

Exported Definitions
Internal Definitions

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

4.1.17 clsql/sql/syntax/operations.lisp

Dependency

expressions.lisp (file)

Parent

syntax (module)

Location

sql/operations.lisp

Exported Definitions
Internal Definitions

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

4.1.18 clsql/sql/syntax/syntax.lisp

Dependency

operations.lisp (file)

Parent

syntax (module)

Location

sql/syntax.lisp

Exported Definitions
Internal Definitions

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

4.1.19 clsql/sql/functional/fdml.lisp

Parent

functional (module)

Location

sql/fdml.lisp

Exported Definitions
Internal Definitions

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

4.1.20 clsql/sql/functional/transaction.lisp

Dependency

fdml.lisp (file)

Parent

functional (module)

Location

sql/transaction.lisp

Exported Definitions
Internal Definitions

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

4.1.21 clsql/sql/functional/loop-extension.lisp

Dependency

fdml.lisp (file)

Parent

functional (module)

Location

sql/loop-extension.lisp

Packages

ansi-loop

Internal Definitions

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

4.1.22 clsql/sql/functional/fddl.lisp

Dependency

fdml.lisp (file)

Parent

functional (module)

Location

sql/fddl.lisp

Exported Definitions
Internal Definitions

%table-exists-p (method)


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

4.1.23 clsql/sql/object/metaclasses.lisp

Parent

object (module)

Location

sql/metaclasses.lisp

Exported Definitions
Internal Definitions

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

4.1.24 clsql/sql/object/ooddl.lisp

Dependency

metaclasses.lisp (file)

Parent

object (module)

Location

sql/ooddl.lisp

Exported Definitions
Internal Definitions

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

4.1.25 clsql/sql/object/oodml.lisp

Dependency

ooddl.lisp (file)

Parent

object (module)

Location

sql/oodml.lisp

Exported Definitions
Internal Definitions

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

4.1.26 clsql/sql/generic/generic-postgresql.lisp

Parent

generic (module)

Location

sql/generic-postgresql.lisp

Exported Definitions
Internal Definitions

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

4.1.27 clsql/sql/generic/generic-odbc.lisp

Parent

generic (module)

Location

sql/generic-odbc.lisp

Exported Definitions
Internal Definitions

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

4.1.28 clsql/sql/generic/sequences.lisp

Parent

generic (module)

Location

sql/sequences.lisp

Exported Definitions
Internal Definitions

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

4.1.29 clsql/sql/generic/command-object.lisp

Parent

generic (module)

Location

sql/command-object.lisp

Exported Definitions

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

5 Packages

Packages are listed by definition order.


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

5.1 clsql-system

Source

clsql.asd

Use List

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

5.2 cmucl-compat

Source

cmucl-compat.lisp (file)

Use List

common-lisp

Exported Definitions

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

5.3 clsql-user

This is the user package with CLSQL symbols.

Source

package.lisp (file)

Use List

common-lisp


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

5.4 clsql

This is the user package with CLSQL symbols.

Source

package.lisp (file)

Use List

common-lisp


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

5.5 clsql-sys

This is the INTERNAL SQL-Interface package of CLSQL.

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5.6 decimals

Source

decimals.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

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

5.7 ansi-loop

Source

loop-extension.lisp (file)

Internal Definitions

loop-gentemp (function)


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

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


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

6.1 Exported definitions


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

6.1.1 Special variables

Special Variable: *backend-warning-behavior*

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.

Package

clsql-sys

Source

conditions.lisp (file)

Special Variable: *cache-table-queries-default*

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.

Package

clsql-sys

Source

fddl.lisp (file)

Special Variable: *connect-if-exists*

Default value for the if-exists keyword argument in calls to CONNECT. Meaningful values are :new, :warn-new, :error, :warn-old and :old.

Package

clsql-sys

Source

database.lisp (file)

Special Variable: *db-auto-sync*

A non-nil value means that creating View Class instances or setting their slots automatically creates/updates the corresponding records in the underlying database.

Package

clsql-sys

Source

ooddl.lisp (file)

Special Variable: *db-pool-max-free-connections*

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.

Package

clsql-sys

Source

pool.lisp (file)

Special Variable: *default-caching*

Controls whether SELECT caches objects by default. The CommonSQL specification states caching is on by default.

Package

clsql-sys

Source

oodml.lisp (file)

Special Variable: *default-database*

Specifies the default database to be used.

Package

clsql-sys

Source

database.lisp (file)

Special Variable: *default-database-type*

Designates the default database type which is initialised by the function INITIALISE-DATABASE-TYPE.

Package

clsql-sys

Source

initialize.lisp (file)

Special Variable: *default-string-length*

The length of a string which does not have a user-specified length.

Package

clsql-sys

Source

ooddl.lisp (file)

Special Variable: *default-update-objects-max-len*

The default value to use for the MAX-LEN keyword argument to UPDATE-OBJECT-JOINS.

Package

clsql-sys

Source

oodml.lisp (file)

Special Variable: *foreign-library-search-paths*

A list of pathnames denoting directories where CLSQL will look for foreign libraries (in addition to the default places).

Package

clsql-sys

Source

db-interface.lisp (file)

Special Variable: *initialized-database-types*

A list of database types which have currently been initialised by calling INITIALIZE-DATABASE-TYPE.

Package

clsql-sys

Source

initialize.lisp (file)

Special Variable: *loaded-database-types*

Contains a list of database types which have been defined/loaded.

Package

clsql-sys

Source

initialize.lisp (file)

Special Variable: *old-sequence-names*

Should CLSQL use its old sequence naming scheme _CLSQL_SEQ_{table} instead of the current scheme {table}_CLSQL_SEQ

Package

clsql-sys

Source

sequences.lisp (file)


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

6.1.2 Macros

Macro: check-connection-spec CONNECTION-SPEC DATABASE-TYPE TEMPLATE

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.

Package

clsql-sys

Source

database.lisp (file)

Macro: def-view-class CLASS SUPERS SLOTS &rest CL-OPTIONS

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.

Package

clsql-sys

Source

ooddl.lisp (file)

Macro: define-decimal-formatter NAME &body KEYWORD-ARGUMENTS

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 "

Package

decimals

Source

decimals.lisp (file)

Macro: disable-sql-reader-syntax ()

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.

Package

clsql-sys

Source

syntax.lisp (file)

Macro: do-query ((&rest ARGS) QUERY-EXPRESSION &key DATABASE RESULT-TYPES) &body BODY

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.

Package

clsql-sys

Source

fdml.lisp (file)

Macro: enable-sql-reader-syntax ()

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.

Package

clsql-sys

Source

syntax.lisp (file)

Macro: file-enable-sql-reader-syntax ()

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

Package

clsql-sys

Source

syntax.lisp (file)

Macro: in OBJ &rest CHOICES
Package

clsql-sys

Source

utils.lisp (file)

Macro: locally-disable-sql-reader-syntax ()

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.

Package

clsql-sys

Source

syntax.lisp (file)

Macro: locally-enable-sql-reader-syntax ()

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.

Package

clsql-sys

Source

syntax.lisp (file)

Macro: restore-sql-reader-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.

Package

clsql-sys

Source

syntax.lisp (file)

Macro: shrink-vector VEC LEN
Package

cmucl-compat

Source

cmucl-compat.lisp (file)

Macro: with-database (DB-VAR CONNECTION-SPEC &key MAKE-DEFAULT POOL IF-EXISTS DATABASE-TYPE ENCODING) &body BODY

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.

Package

clsql-sys

Source

database.lisp (file)

Macro: with-default-database (DATABASE) &rest BODY

Perform BODY with DATABASE bound as *default-database*.

Package

clsql-sys

Source

database.lisp (file)

Macro: with-process-lock (LOCK DESC) &body BODY
Package

clsql-sys

Source

utils.lisp (file)

Macro: with-transaction (&key DATABASE) &body BODY

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.

Package

clsql-sys

Source

transaction.lisp (file)

Macro: without-interrupts &body BODY
Package

clsql-sys

Source

utils.lisp (file)


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

6.1.3 Functions

Function: add-sql-stream STREAM &key TYPE DATABASE

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.

Package

clsql-sys

Source

recording.lisp (file)

Function: add-transaction-commit-hook COMMIT-HOOK &key DATABASE

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*.

Package

clsql-sys

Source

transaction.lisp (file)

Function: add-transaction-rollback-hook ROLLBACK-HOOK &key 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*.

Package

clsql-sys

Source

transaction.lisp (file)

Function: attribute-type ATTRIBUTE TABLE &key OWNER 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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: bind-parameter PREPARED-STMT POSITION VALUE

Sets the value of a parameter is in prepared statement.

Package

clsql-sys

Source

fdml.lisp (file)

Function: cache-table-queries TABLE &key ACTION DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: command-object EXPRESSION &optional PARAMETERS PREPARED-NAME
Package

clsql-sys

Source

command-object.lisp (file)

Function: command-output CONTROL-STRING &rest ARGS
Package

clsql-sys

Source

utils.lisp (file)

Function: commit &key DATABASE

If DATABASE, which defaults to *DEFAULT-DATABASE*, is currently within the scope of a transaction, commits changes made since the transaction began.

Package

clsql-sys

Source

transaction.lisp (file)

Function: connect CONNECTION-SPEC &key IF-EXISTS MAKE-DEFAULT POOL DATABASE-TYPE ENCODING

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.

Package

clsql-sys

Source

database.lisp (file)

Function: connected-databases ()

Returns the list of active database objects.

Package

clsql-sys

Source

database.lisp (file)

Function: convert-to-db-default-case STR DATABASE
Package

clsql-sys

Source

utils.lisp (file)

Function: create-database CONNECTION-SPEC &key DATABASE-TYPE

This function creates a database in the database system specified by DATABASE-TYPE.

Package

clsql-sys

Source

database.lisp (file)

Function: create-index NAME &key ON UNIQUE ATTRIBUTES DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: create-large-object &key DATABASE

Creates a new large object in the database and returns the object identifier

Package

clsql-sys

Source

fdml.lisp (file)

Function: create-sequence NAME &key DATABASE

Creates a sequence called NAME in DATABASE which defaults to *DEFAULT-DATABASE*.

Package

clsql-sys

Source

fddl.lisp (file)

Function: create-table NAME DESCRIPTION &key DATABASE CONSTRAINTS TRANSACTIONS

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: create-view NAME &key AS COLUMN-LIST WITH-CHECK-OPTION DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: create-view-from-class VIEW-CLASS-NAME &key DATABASE TRANSACTIONS

Creates a table as defined by the View Class VIEW-CLASS-NAME in DATABASE which defaults to *DEFAULT-DATABASE*.

Package

clsql-sys

Source

ooddl.lisp (file)

Function: current-day ()
Package

clsql-sys

Source

time.lisp (file)

Function: current-month ()
Package

clsql-sys

Source

time.lisp (file)

Function: current-year ()
Package

clsql-sys

Source

time.lisp (file)

Function: date+ DATE &rest DURATIONS

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.

Package

clsql-sys

Source

time.lisp (file)

Function: date- DATE &rest DURATIONS

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.

Package

clsql-sys

Source

time.lisp (file)

Function: date-compare DATE-A DATE-B
Package

clsql-sys

Source

time.lisp (file)

Function: date-difference DATE1 DATE2

Returns a DURATION representing the difference between TIME1 and TIME2.

Package

clsql-sys

Source

time.lisp (file)

Function: date-dow DATE
Package

clsql-sys

Source

time.lisp (file)

Function: date-element DATE ELEMENT
Package

clsql-sys

Source

time.lisp (file)

Function: date-max NUMBER &rest MORE-NUMBERS
Package

clsql-sys

Source

time.lisp (file)

Function: date-min NUMBER &rest MORE-NUMBERS
Package

clsql-sys

Source

time.lisp (file)

Function: date-mjd INSTANCE
Function: (setf date-mjd) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: date-p OBJECT
Package

clsql-sys

Source

time.lisp (file)

Function: date-ymd DATE
Package

clsql-sys

Source

time.lisp (file)

Function: date< NUMBER &rest MORE-NUMBERS
Package

clsql-sys

Source

time.lisp (file)

Function: date<= NUMBER &rest MORE-NUMBERS
Package

clsql-sys

Source

time.lisp (file)

Function: date= NUMBER &rest MORE-NUMBERS
Package

clsql-sys

Source

time.lisp (file)

Function: date> NUMBER &rest MORE-NUMBERS
Package

clsql-sys

Source

time.lisp (file)

Function: date>= NUMBER &rest MORE-NUMBERS
Package

clsql-sys

Source

time.lisp (file)

Function: db-datestring DATE
Package

clsql-sys

Source

time.lisp (file)

Function: db-timestring TIME &key STREAM

return the string to store the given time in the database

Package

clsql-sys

Source

time.lisp (file)

Function: decode-date DATE

returns the decoded date as multiple values: day month year integer day-of-week

Package

clsql-sys

Source

time.lisp (file)

Function: decode-time TIME

returns the decoded time as multiple values: usec, second, minute, hour, day, month, year, integer day-of-week

Package

clsql-sys

Source

time.lisp (file)

Function: delete-large-object OBJECT-ID &key DATABASE

Deletes the large object in the database

Package

clsql-sys

Source

fdml.lisp (file)

Function: delete-records &key FROM WHERE DATABASE

Deletes records satisfying the SQL expression WHERE from the table specified by FROM in DATABASE specifies a database which defaults to *DEFAULT-DATABASE*.

Package

clsql-sys

Source

fdml.lisp (file)

Function: delete-sql-stream STREAM &key TYPE 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.

Package

clsql-sys

Source

recording.lisp (file)

Function: destroy-database CONNECTION-SPEC &key DATABASE-TYPE

This function destroys a database in the database system specified by DATABASE-TYPE.

Package

clsql-sys

Source

database.lisp (file)

Function: disconnect &key DATABASE ERROR

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.

Package

clsql-sys

Source

database.lisp (file)

Function: disconnect-pooled &optional CLEAR

Disconnects all connections in the pool. When clear, also deletes the pool objects.

Package

clsql-sys

Source

pool.lisp (file)

Function: drop-index NAME &key IF-DOES-NOT-EXIST ON DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: drop-sequence NAME &key IF-DOES-NOT-EXIST DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: drop-table NAME &key IF-DOES-NOT-EXIST DATABASE OWNER

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: drop-view NAME &key IF-DOES-NOT-EXIST DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: drop-view-from-class VIEW-CLASS-NAME &key DATABASE OWNER

Removes a table defined by the View Class VIEW-CLASS-NAME from DATABASE which defaults to *DEFAULT-DATABASE*.

Package

clsql-sys

Source

ooddl.lisp (file)

Function: duration+ TIME &rest DURATIONS

Add each DURATION to TIME, returning a new wall-time value.

Package

clsql-sys

Source

time.lisp (file)

Function: duration-day INSTANCE
Function: (setf duration-day) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: duration-hour INSTANCE
Function: (setf duration-hour) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: duration-minute INSTANCE
Function: (setf duration-minute) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: duration-month INSTANCE
Function: (setf duration-month) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: duration-reduce DURATION PRECISION &optional ROUND
Package

clsql-sys

Source

time.lisp (file)

Function: duration-second INSTANCE
Function: (setf duration-second) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: duration-timestring DURATION
Package

clsql-sys

Source

time.lisp (file)

Function: duration-year INSTANCE
Function: (setf duration-year) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: duration< DURATION-A DURATION-B
Package

clsql-sys

Source

time.lisp (file)

Function: duration<= DURATION-A DURATION-B
Package

clsql-sys

Source

time.lisp (file)

Function: duration= DURATION-A DURATION-B
Package

clsql-sys

Source

time.lisp (file)

Function: duration> X Y
Package

clsql-sys

Source

time.lisp (file)

Function: duration>= X Y
Package

clsql-sys

Source

time.lisp (file)

Function: encoding DB
Function: (setf encoding) ENCODING DB
Package

clsql-sys

Source

database.lisp (file)

Function: ensure-keyword NAME

Returns keyword for a name.

Package

clsql-sys

Source

utils.lisp (file)

Function: extract-roman STRING &aux PARSE
Package

clsql-sys

Source

time.lisp (file)

Function: find-database DATABASE &key ERRORP DB-TYPE

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.

Package

clsql-sys

Source

database.lisp (file)

Function: float-to-sql-string NUM

Convert exponent character for SQL

Package

clsql-sys

Source

utils.lisp (file)

Function: format-date STREAM DATE &key FORMAT DATE-SEPARATOR INTERNAL-SEPARATOR

produces on stream the datestring corresponding to the date with the given options

Package

clsql-sys

Source

time.lisp (file)

Function: format-decimal-number NUMBER &key ROUND-MAGNITUDE ROUNDER DECIMAL-SEPARATOR INTEGER-GROUP-SEPARATOR INTEGER-GROUP-DIGITS INTEGER-MINIMUM-WIDTH INTEGER-PAD-CHAR FRACTIONAL-GROUP-SEPARATOR FRACTIONAL-GROUP-DIGITS FRACTIONAL-MINIMUM-WIDTH FRACTIONAL-PAD-CHAR SHOW-TRAILING-ZEROS POSITIVE-SIGN NEGATIVE-SIGN ZERO-SIGN

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.

Package

decimals

Source

decimals.lisp (file)

Function: format-duration STREAM DURATION &key PRECISION
Package

clsql-sys

Source

time.lisp (file)

Function: format-time STREAM TIME &key FORMAT DATE-SEPARATOR TIME-SEPARATOR INTERNAL-SEPARATOR

produces on stream the timestring corresponding to the wall-time with the given options

Package

clsql-sys

Source

time.lisp (file)

Function: free-prepared-sql PREPARED-STMT

Delete the objects associated with a prepared statement.

Package

clsql-sys

Source

fdml.lisp (file)

Function: get-date ()

Returns a date for today

Package

clsql-sys

Source

time.lisp (file)

Function: get-time ()

Return a pair: (GREGORIAN DAY . TIME-OF-DAY)

Package

clsql-sys

Source

time.lisp (file)

Function: getenv VAR

Return the value of the environment variable.

Package

clsql-sys

Source

utils.lisp (file)

Function: gregorian-to-mjd MONTH DAY YEAR
Package

clsql-sys

Source

time.lisp (file)

Function: in-transaction-p &key DATABASE

A predicate to test whether DATABASE, which defaults to *DEFAULT-DATABASE*, is currently within the scope of a transaction.

Package

clsql-sys

Source

transaction.lisp (file)

Function: index-exists-p NAME &key OWNER DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: initialize-database-type &key DATABASE-TYPE

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*.

Package

clsql-sys

Source

initialize.lisp (file)

Function: insert-records &key INTO ATTRIBUTES VALUES AV-PAIRS QUERY DATABASE

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.

Package

clsql-sys

Source

fdml.lisp (file)

Function: interval-clear LIST TIME
Package

clsql-sys

Source

time.lisp (file)

Function: interval-contained INSTANCE
Function: (setf interval-contained) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: interval-data INSTANCE
Function: (setf interval-data) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: interval-edit LIST TIME START END &optional TAG

Attempts to modify the most deeply nested interval in list which begins at time. If no changes are made, returns nil.

Package

clsql-sys

Source

time.lisp (file)

Function: interval-end INSTANCE
Function: (setf interval-end) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: interval-match LIST TIME

Return the index of the first interval in list containing time

Package

clsql-sys

Source

time.lisp (file)

Function: interval-push INTERVAL-LIST INTERVAL &optional CONTAINER-RULE
Package

clsql-sys

Source

time.lisp (file)

Function: interval-relation X Y

Compare the relationship of node x to node y. Returns either :contained :contains :follows :overlaps or :precedes.

Package

clsql-sys

Source

time.lisp (file)

Function: interval-start INSTANCE
Function: (setf interval-start) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: interval-type INSTANCE
Function: (setf interval-type) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: is-database-open DATABASE
Package

clsql-sys

Source

database.lisp (file)

Function: iso-timestring TIME &key STREAM
Package

clsql-sys

Source

time.lisp (file)

Function: list-attribute-types TABLE &key OWNER DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: list-attributes NAME &key OWNER DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: list-classes &key TEST ROOT-CLASS DATABASE

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.

Package

clsql-sys

Source

ooddl.lisp (file)

Function: list-databases CONNECTION-SPEC &key DATABASE-TYPE

This function returns a list of databases existing in the database system specified by DATABASE-TYPE.

Package

clsql-sys

Source

database.lisp (file)

Function: list-indexes &key OWNER DATABASE ON

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: list-sequences &key OWNER DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: list-sql-streams &key TYPE DATABASE

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.

Package

clsql-sys

Source

recording.lisp (file)

Function: list-tables &key OWNER DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: list-views &key OWNER DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: make-date &key YEAR MONTH DAY HOUR MINUTE SECOND USEC OFFSET
Package

clsql-sys

Source

time.lisp (file)

Function: make-duration &key YEAR MONTH DAY HOUR MINUTE SECOND USEC
Package

clsql-sys

Source

time.lisp (file)

Function: make-interval &key (START START) (END END) (NAME NAME) (CONTAINED CONTAINED) (TYPE TYPE) (DATA DATA)
Package

clsql-sys

Source

time.lisp (file)

Function: make-process-lock NAME
Package

clsql-sys

Source

utils.lisp (file)

Function: make-sequence-of-type TYPE LENGTH

Returns a sequence of the given TYPE and LENGTH.

Package

cmucl-compat

Source

cmucl-compat.lisp (file)

Function: make-time &key YEAR MONTH DAY HOUR MINUTE SECOND USEC OFFSET
Package

clsql-sys

Source

time.lisp (file)

Function: map-query OUTPUT-TYPE-SPEC FUNCTION QUERY-EXPRESSION &key DATABASE RESULT-TYPES

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.

Package

clsql-sys

Source

fdml.lisp (file)

Function: merged-time DAY TIME-OF-DAY
Package

clsql-sys

Source

time.lisp (file)

Function: mjd-to-gregorian MJD
Package

clsql-sys

Source

time.lisp (file)

Function: month-name MONTH-INDEX
Package

clsql-sys

Source

time.lisp (file)

Function: number-to-sql-string NUM
Package

clsql-sys

Source

utils.lisp (file)

Function: parse-date-time STRING

parses date like 08/08/01, 8.8.2001, eg

Package

clsql-sys

Source

time.lisp (file)

Function: parse-datestring DATESTRING &key START END JUNK-ALLOWED

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).

Package

clsql-sys

Source

time.lisp (file)

Function: parse-decimal-number STRING &key DECIMAL-SEPARATOR POSITIVE-SIGN NEGATIVE-SIGN START END

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

Package

decimals

Source

decimals.lisp (file)

Function: parse-timestring TIMESTRING &key START END JUNK-ALLOWED

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.

Package

clsql-sys

Source

time.lisp (file)

Function: parse-yearstring STRING
Package

clsql-sys

Source

time.lisp (file)

Function: prepare-sql SQL-STMT TYPES &key DATABASE RESULT-TYPES FIELD-NAMES

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)

Package

clsql-sys

Source

fdml.lisp (file)

Function: print-date TIME &optional STYLE
Package

clsql-sys

Source

time.lisp (file)

Function: print-query QUERY-EXP &key TITLES FORMATS SIZES STREAM DATABASE

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.

Package

clsql-sys

Source

fdml.lisp (file)

Function: probe-database CONNECTION-SPEC &key DATABASE-TYPE

This function tests for the existence of a database in the database system specified by DATABASE-TYPE.

Package

clsql-sys

Source

database.lisp (file)

Function: push-library-path PATH

Adds the pathspec PATH (which should denote a directory) to the list *FOREIGN-LIBRARY-SEARCH-PATHS*.

Package

clsql-sys

Source

db-interface.lisp (file)

Function: read-instance-from-stream STREAM
Package

clsql-sys

Source

oodml.lisp (file)

Function: read-large-object OBJECT-ID &key DATABASE

Reads the large object content

Package

clsql-sys

Source

fdml.lisp (file)

Function: reconnect &key DATABASE ERROR FORCE

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.

Package

clsql-sys

Source

database.lisp (file)

Function: reload-database-types ()

Reloads any foreign code for the loaded database types after a dump.

Package

clsql-sys

Source

initialize.lisp (file)

Function: required-argument ()
Package

cmucl-compat

Source

cmucl-compat.lisp (file)

Function: reset-command-object CO

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)

Package

clsql-sys

Source

command-object.lisp (file)

Function: result-type-or-lose TYPE NIL-OK
Package

cmucl-compat

Source

cmucl-compat.lisp (file)

Function: roll DATE &key YEAR MONTH DAY SECOND HOUR MINUTE USEC DESTRUCTIVE
Package

clsql-sys

Source

time.lisp (file)

Function: roll-to DATE SIZE POSITION
Package

clsql-sys

Source

time.lisp (file)

Function: rollback &key DATABASE

If DATABASE, which defaults to *DEFAULT-DATABASE*, is currently within the scope of a transaction, rolls back changes made since the transaction began.

Package

clsql-sys

Source

transaction.lisp (file)

Function: round-half-away-from-zero NUMBER &optional DIVISOR

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

Package

decimals

Source

decimals.lisp (file)

Function: run-prepared-sql PREPARED-STMT

Execute the prepared sql statment. All input parameters must be bound.

Package

clsql-sys

Source

fdml.lisp (file)

Function: select &rest SELECT-ALL-ARGS

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.

Package

clsql-sys

Source

oodml.lisp (file)

Function: sequence-exists-p NAME &key OWNER DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: sequence-last NAME &key DATABASE

Return the last value allocated in the sequence called NAME in DATABASE which defaults to *DEFAULT-DATABASE*.

Package

clsql-sys

Source

fddl.lisp (file)

Function: sequence-next NAME &key DATABASE

Increment and return the next value in the sequence called NAME in DATABASE which defaults to *DEFAULT-DATABASE*.

Package

clsql-sys

Source

fddl.lisp (file)

Function: set-autocommit VALUE &key 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.

Package

clsql-sys

Source

transaction.lisp (file)

Function: set-sequence-position NAME POSITION &key DATABASE

Explicitly set the the position of the sequence called NAME in DATABASE, which defaults to *DEFAULT-DATABASE*, to POSITION which is returned.

Package

clsql-sys

Source

fddl.lisp (file)

Function: sql &rest ARGS

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.

Package

clsql-sys

Source

syntax.lisp (file)

Function: sql-* &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-+ &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-- &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-/ &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-< &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-<= &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-<> &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-= &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-== &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-> &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql->= &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-all &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-and &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-any &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-avg &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-between &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-coalesce &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-concat &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-concat-op &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-count &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-distinct &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-escape IDENTIFIER

Change hyphens to underscores, ensure string

Package

clsql-sys

Source

utils.lisp (file)

Function: sql-escape-quotes S

Escape quotes for SQL string writing

Package

clsql-sys

Source

utils.lisp (file)

Function: sql-except &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-exists &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-expression &key STRING TABLE ALIAS ATTRIBUTE TYPE

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.

Package

clsql-sys

Source

syntax.lisp (file)

Function: sql-function &rest ARGS
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-group-by &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-having &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-in &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-intersect &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-is &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-like &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-limit &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-max &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-min &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-minus &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-not &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-not-null &optional NOT-NULL-THING
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-null &optional NOT-NULL-THING
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-nvl &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-operation OPERATOR &rest ARGS

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.

Package

clsql-sys

Source

syntax.lisp (file)

Function: sql-operator OPERATOR

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.

Package

clsql-sys

Source

syntax.lisp (file)

Function: sql-or &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-order-by &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-query &rest ARGS
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-recording-p &key TYPE DATABASE

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.

Package

clsql-sys

Source

recording.lisp (file)

Function: sql-slot-value CLASSNAME SLOT &optional VALUE DATABASE
Package

clsql-sys

Source

oodml.lisp (file)

Function: sql-some &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-stream &key TYPE DATABASE

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.

Package

clsql-sys

Source

recording.lisp (file)

Function: sql-substr &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-substring &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-sum &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-the &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-union &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-uplike &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-userenv &rest REST
Package

clsql-sys

Source

operations.lisp (file)

Function: sql-view-class CLASSNAME &optional DATABASE
Package

clsql-sys

Source

oodml.lisp (file)

Function: start-sql-recording &key TYPE DATABASE

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.

Package

clsql-sys

Source

recording.lisp (file)

Function: start-transaction &key DATABASE

Starts a transaction block on DATABASE which defaults to *DEFAULT-DATABASE* and which continues until ROLLBACK or COMMIT are called.

Package

clsql-sys

Source

transaction.lisp (file)

Function: status &optional FULL

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.

Package

clsql-sys

Source

database.lisp (file)

Function: stop-sql-recording &key TYPE DATABASE

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.

Package

clsql-sys

Source

recording.lisp (file)

Function: symbol-name-default-case STR
Package

clsql-sys

Source

utils.lisp (file)

Function: table-exists-p NAME &key OWNER DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: time+ TIME &rest DURATIONS

Add each DURATION to TIME, returning a new wall-time value.

Package

clsql-sys

Source

time.lisp (file)

Function: time- TIME &rest DURATIONS

Subtract each DURATION from TIME, returning a new wall-time value.

Package

clsql-sys

Source

time.lisp (file)

Function: time-compare TIME-A TIME-B
Package

clsql-sys

Source

time.lisp (file)

Function: time-difference TIME1 TIME2

Returns a DURATION representing the difference between TIME1 and TIME2.

Package

clsql-sys

Source

time.lisp (file)

Function: time-dow TIME

Return the 0 indexed Day of the week starting with Sunday

Package

clsql-sys

Source

time.lisp (file)

Function: time-element TIME ELEMENT
Package

clsql-sys

Source

time.lisp (file)

Function: time-max NUMBER &rest MORE-NUMBERS

Returns the greatest of its arguments.

Package

clsql-sys

Source

time.lisp (file)

Function: time-min NUMBER &rest MORE-NUMBERS

Returns the least of its arguments.

Package

clsql-sys

Source

time.lisp (file)

Function: time-mjd INSTANCE
Function: (setf time-mjd) VALUE INSTANCE
Package

clsql-sys

Source

time.lisp (file)

Function: time-ymd TIME
Package

clsql-sys

Source

time.lisp (file)

Function: time< NUMBER &rest MORE-NUMBERS

Returns T if its arguments are in strictly increasing order, NIL otherwise.

Package

clsql-sys

Source

time.lisp (file)

Function: time<= NUMBER &rest MORE-NUMBERS

Returns T if arguments are in strictly non-decreasing order, NIL otherwise.

Package

clsql-sys

Source

time.lisp (file)

Function: time= NUMBER &rest MORE-NUMBERS

Returns T if all of its arguments are numerically equal, NIL otherwise.

Package

clsql-sys

Source

time.lisp (file)

Function: time> NUMBER &rest MORE-NUMBERS

Returns T if its arguments are in strictly decreasing order, NIL otherwise.

Package

clsql-sys

Source

time.lisp (file)

Function: time>= NUMBER &rest MORE-NUMBERS

Returns T if arguments are in strictly non-increasing order, NIL otherwise.

Package

clsql-sys

Source

time.lisp (file)

Function: truncate-database &key DATABASE

Drops all tables, views, indexes and sequences in DATABASE which defaults to *DEFAULT-DATABASE*.

Package

clsql-sys

Source

fddl.lisp (file)

Function: update-objects-joins OBJECTS &key SLOTS FORCE-P CLASS-NAME MAX-LEN

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

Package

clsql-sys

Source

oodml.lisp (file)

Function: update-records TABLE &key ATTRIBUTES VALUES AV-PAIRS WHERE DATABASE

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.

Package

clsql-sys

Source

fdml.lisp (file)

Function: utime->time UTIME

Return a pair: (GREGORIAN DAY . TIME-OF-DAY)

Package

clsql-sys

Source

time.lisp (file)

Function: view-exists-p NAME &key OWNER DATABASE

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.

Package

clsql-sys

Source

fddl.lisp (file)

Function: week-containing TIME
Package

clsql-sys

Source

time.lisp (file)

Function: write-instance-to-stream OBJ STREAM

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.

Package

clsql-sys

Source

oodml.lisp (file)

Function: write-large-object OBJECT-ID DATA &key DATABASE

Writes data to the large object

Package

clsql-sys

Source

fdml.lisp (file)


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

6.1.4 Generic functions

Generic Function: attribute-cache OBJECT
Generic Function: (setf attribute-cache) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: attribute-cache (DATABASE database)
Method: (setf attribute-cache) NEW-VALUE (DATABASE database)

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.

Source

base-classes.lisp (file)

Generic Function: bad-component CONDITION
Package

clsql-sys

Methods
Method: bad-component (CONDITION iso-8601-syntax-error)
Source

time.lisp (file)

Generic Function: command-recording-stream OBJECT
Generic Function: (setf command-recording-stream) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: command-recording-stream (DATABASE database)

automatically generated reader method

Source

base-classes.lisp (file)

Method: (setf command-recording-stream) NEW-VALUE (DATABASE database)

automatically generated writer method

Source

base-classes.lisp (file)

Generic Function: conn-pool OBJECT
Generic Function: (setf conn-pool) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: conn-pool (DATABASE database)

automatically generated reader method

Source

base-classes.lisp (file)

Method: (setf conn-pool) NEW-VALUE (DATABASE database)

automatically generated writer method

Source

base-classes.lisp (file)

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

clsql-sys

Methods
Method: connection-spec (CONN-POOL conn-pool)

automatically generated reader method

Source

pool.lisp (file)

Method: (setf connection-spec) NEW-VALUE (CONN-POOL conn-pool)

automatically generated writer method

Source

pool.lisp (file)

Method: connection-spec (DATABASE database)

Required to use connection pool.

Source

base-classes.lisp (file)

Generic Function: database CONDITION
Generic Function: (setf database) NEW-VALUE CONDITION
Package

clsql-sys

Methods
Method: database (POSTGRESQL-STMT postgresql-stmt)

automatically generated reader method

Source

generic-postgresql.lisp (file)

Method: database (CONDITION sql-value-conversion-error)
Method: (setf database) NEW-VALUE (CONDITION sql-value-conversion-error)
Source

conditions.lisp (file)

Generic Function: database-acquire-from-conn-pool DATABASE

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.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-acquire-from-conn-pool DATABASE
Source

pool.lisp (file)

Generic Function: database-attribute-type ATTRIBUTE TABLE DATABASE &key OWNER

Return the type of ATTRIBUTE in TABLE. Returns multiple values of TYPE_NAME (keyword) PRECISION SCALE NULLABLE.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-attribute-type (ATTRIBUTE %database-identifier) (TABLE %database-identifier) (DATABASE generic-odbc-database) &key OWNER &aux TABLE ATTRIBUTE
Source

generic-odbc.lisp (file)

Method: database-attribute-type (ATTRIBUTE %database-identifier) (TABLE %database-identifier) (DATABASE generic-postgresql-database) &key OWNER &aux TABLE ATTRIBUTE
Source

generic-postgresql.lisp (file)

Method: database-attribute-type ATTRIBUTE TABLE (DATABASE database) &key OWNER
Method: database-attribute-type ATTRIBUTE TABLE DATABASE &key OWNER
Generic Function: database-autocommit OBJECT
Generic Function: (setf database-autocommit) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: database-autocommit (DATABASE database)

automatically generated reader method

Source

base-classes.lisp (file)

Method: (setf database-autocommit) NEW-VALUE (DATABASE database)

automatically generated writer method

Source

base-classes.lisp (file)

Generic Function: database-bind-parameter PREPARED-STMT POSITION VALUE

Bind a parameter for a prepared statement.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-bind-parameter (STMT postgresql-stmt) POSITION VALUE
Source

generic-postgresql.lisp (file)

Method: database-bind-parameter PSTMT POSITION VALUE
Generic Function: database-connect CONNECTION-SPEC DATABASE-TYPE

Internal generic implementation of connect.

Package

clsql-sys

Source

db-interface.lisp (file)

Generic Function: database-create CONNECTION-SPEC TYPE

Creates a database, returns T if successfull or signals an error.

Package

clsql-sys

Source

db-interface.lisp (file)

Generic Function: database-create-large-object DATABASE

Creates a new large object in the database and returns the object identifier

Package

clsql-sys

Source

db-interface.lisp (file)

Generic Function: database-create-sequence NAME DATABASE

Create a sequence in DATABASE.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-create-sequence SEQUENCE-NAME DATABASE
Source

sequences.lisp (file)

Method: database-create-sequence SEQUENCE-NAME (DATABASE generic-postgresql-database)
Source

generic-postgresql.lisp (file)

Generic Function: database-delete-large-object OBJECT-ID DATABASE

Deletes the large object in the database

Package

clsql-sys

Source

db-interface.lisp (file)

Generic Function: database-destroy CONNECTION-SPEC TYPE

Destroys (drops) a database, returns T if successfull or signals an error if unable to destory.

Package

clsql-sys

Source

db-interface.lisp (file)

Generic Function: database-disconnect DATABASE

Internal generic implementation of disconnect.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-disconnect (DATABASE generic-odbc-database)
Source

generic-odbc.lisp (file)

Method: database-disconnect (DATABASE database) before
Method: database-disconnect DATABASE
Generic Function: database-drop-sequence NAME DATABASE

Drop a sequence from DATABASE.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-drop-sequence SEQUENCE-NAME DATABASE
Source

sequences.lisp (file)

Method: database-drop-sequence SEQUENCE-NAME (DATABASE generic-postgresql-database)
Source

generic-postgresql.lisp (file)

Generic Function: database-dump-result-set RESULT-SET DATABASE

Dumps the received result-set.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-dump-result-set RESULT-SET (DATABASE generic-odbc-database)
Source

generic-odbc.lisp (file)

Method: database-dump-result-set RESULT-SET (DATABASE database) before
Method: database-dump-result-set RESULT-SET DATABASE
Method: database-dump-result-set RESULT-SET (DATABASE database)
Generic Function: database-execute-command SQL-EXPRESSION DATABASE

Internal generic implementation of execute-command.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-execute-command SQL-EXPRESSION (DATABASE generic-odbc-database)
Source

generic-odbc.lisp (file)

Method: database-execute-command SQL-EXPRESSION (DATABASE database) before
Method: database-execute-command SQL-EXPRESSION DATABASE
Method: database-execute-command SQL-EXPRESSION (DATABASE database)
Generic Function: database-free-prepared PREPARED-STMT

Free the resources of a prepared statement.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-free-prepared PSTMT
Generic Function: database-get-type-specifier TYPE ARGS DATABASE DB-UNDERLYING-TYPE

Return the type SQL type specifier as a string, for the given lisp type and parameters.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-get-type-specifier (TYPE symbol) ARGS DATABASE (DB-TYPE (eql mssql))

Special database types for MSSQL backends

Source

generic-odbc.lisp (file)

Method: database-get-type-specifier (TYPE symbol) ARGS DATABASE (DB-TYPE (eql postgresql))

Special database types for POSTGRESQL backends

Source

generic-postgresql.lisp (file)

Method: database-get-type-specifier (TYPE symbol) ARGS DATABASE DB-TYPE
Source

oodml.lisp (file)

Method: database-get-type-specifier (TYPE string) ARGS DATABASE DB-TYPE

Pass through the literal type as defined in the type string

Source

oodml.lisp (file)

Generic Function: database-initialize-database-type DATABASE-TYPE

The internal generic implementation of initialize-database-type.

Package

clsql-sys

Source

db-interface.lisp (file)

Generic Function: database-last-auto-increment-id DATABASE TABLE COLUMN
Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: database-last-auto-increment-id (DATABASE generic-odbc-database) TABLE COLUMN
Source

generic-odbc.lisp (file)

Method: database-last-auto-increment-id (DATABASE generic-postgresql-database) TABLE COLUMN
Source

generic-postgresql.lisp (file)

Generic Function: database-list CONNECTION-SPEC TYPE

Lists all databases found for TYPE. May signal an error if unable to communicate with database server.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-list CONNECTION-SPEC (TYPE (eql postgresql-socket))
Source

generic-postgresql.lisp (file)

Method: database-list CONNECTION-SPEC (TYPE (eql postgresql))
Source

generic-postgresql.lisp (file)

Method: database-list SPEC TYPE
Generic Function: database-list-attributes TABLE DATABASE &key OWNER

List all attributes in TABLE.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-list-attributes (TABLE %database-identifier) (DATABASE generic-odbc-database) &key OWNER &aux TABLE
Source

generic-odbc.lisp (file)

Method: database-list-attributes (TABLE %database-identifier) (DATABASE generic-postgresql-database) &key OWNER
Source

generic-postgresql.lisp (file)

Method: database-list-attributes TABLE (DATABASE database) &key OWNER
Method: database-list-attributes TABLE DATABASE &key OWNER
Generic Function: database-list-indexes DATABASE &key OWNER

List all indexes in the DATABASE.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-list-indexes (DATABASE generic-postgresql-database) &key OWNER
Source

generic-postgresql.lisp (file)

Method: database-list-indexes (DATABASE database) &key OWNER
Method: database-list-indexes DATABASE &key OWNER
Generic Function: database-list-sequences DATABASE &key OWNER

List all sequences in DATABASE.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-list-sequences DATABASE &key OWNER
Source

sequences.lisp (file)

Method: database-list-sequences (DATABASE generic-postgresql-database) &key OWNER
Source

generic-postgresql.lisp (file)

Generic Function: database-list-table-indexes TABLE DATABASE &key OWNER

List all indexes for a table in the DATABASE.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-list-table-indexes TABLE (DATABASE generic-postgresql-database) &key OWNER
Source

generic-postgresql.lisp (file)

Method: database-list-table-indexes TABLE (DATABASE database) &key OWNER
Method: database-list-table-indexes TABLE DATABASE &key OWNER
Generic Function: database-list-tables DATABASE &key OWNER

List all tables in the given database

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-list-tables (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.

Source

generic-odbc.lisp (file)

Method: database-list-tables (DATABASE generic-postgresql-database) &key OWNER
Source

generic-postgresql.lisp (file)

Method: database-list-tables (DATABASE database) &key OWNER
Method: database-list-tables DATABASE &key OWNER
Generic Function: database-list-tables-and-sequences DATABASE &key OWNER

List all tables in the given database, may include seqeneces

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-list-tables-and-sequences DATABASE &key OWNER
Method: database-list-tables-and-sequences (DATABASE database) &key OWNER
Generic Function: database-list-views DATABASE &key OWNER

List all views in the DATABASE.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-list-views (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.

Source

generic-odbc.lisp (file)

Method: database-list-views (DATABASE generic-postgresql-database) &key OWNER
Source

generic-postgresql.lisp (file)

Method: database-list-views (DATABASE database) &key OWNER
Method: database-list-views DATABASE &key OWNER
Generic Function: database-name OBJECT

Returns the name of a database.

Package

clsql-sys

Methods
Method: database-name (DATABASE database)

automatically generated reader method

Source

base-classes.lisp (file)

Generic Function: database-name-from-spec CONNECTION-SPEC DATABASE-TYPE

Returns the name of the database that would be created if connect was called with the connection-spec.

Package

clsql-sys

Source

db-interface.lisp (file)

Generic Function: database-output-sql-as-type TYPE VAL DATABASE DB-TYPE
Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: database-output-sql-as-type TYPE VAL DATABASE DB-TYPE &aux *PRINT-CIRCLE* *PRINT-ARRAY* *PRINT-LENGTH* *PRINT-BASE*
Source

oodml.lisp (file)

Generic Function: database-prepare STMT TYPES DATABASE RESULT-TYPES FIELD-NAMES

Prepare a statement for later execution.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-prepare SQL-STMT TYPES (DATABASE generic-postgresql-database) RESULT-TYPES FIELD-NAMES
Source

generic-postgresql.lisp (file)

Method: database-prepare STMT TYPES DATABASE RESULT-TYPES FIELD-NAMES
Method: database-prepare STMT TYPES (DATABASE database) RESULT-TYPES FIELD-NAMES
Generic Function: database-probe CONNECTION-SPEC TYPE

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.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-probe SPEC TYPE
Generic Function: database-query QUERY-EXPRESSION DATABASE RESULT-TYPES FIELD-NAMES

Internal generic implementation of query.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-query QUERY-EXPRESSION (DATABASE generic-odbc-database) RESULT-TYPES FIELD-NAMES
Source

generic-odbc.lisp (file)

Method: database-query QUERY-EXPRESSION (DATABASE database) RESULT-SET FIELD-NAMES before
Method: database-query QUERY-EXPRESSION DATABASE RESULT-TYPES FIELD-NAMES
Method: database-query QUERY-EXPRESSION (DATABASE database) RESULT-TYPES FIELD-NAMES
Generic Function: database-query-result-set QUERY-EXPRESSION DATABASE &key FULL-SET RESULT-TYPES

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.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-query-result-set (QUERY-EXPRESSION string) (DATABASE generic-odbc-database) &key FULL-SET RESULT-TYPES
Source

generic-odbc.lisp (file)

Method: database-query-result-set (EXPR %sql-expression) DATABASE &key FULL-SET RESULT-TYPES
Source

fdml.lisp (file)

Method: database-query-result-set EXPR (DATABASE database) &key FULL-SET RESULT-TYPES before
Method: database-query-result-set QUERY-EXPRESSION DATABASE &key FULL-SET RESULT-TYPES
Method: database-query-result-set QUERY-EXPRESSION (DATABASE database) &key FULL-SET RESULT-TYPES
Generic Function: database-read-large-object OBJECT-ID DATABASE

Reads the large object content

Package

clsql-sys

Source

db-interface.lisp (file)

Generic Function: database-reconnect DATABASE

Internal generic implementation of reconnect.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-reconnect DATABASE
Generic Function: database-release-to-conn-pool DATABASE

Chance for the database to cleanup before it is returned to the connection pool.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-release-to-conn-pool DATABASE
Source

pool.lisp (file)

Generic Function: database-run-prepared PREPARED-STMT

Execute a prepared statement.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-run-prepared (STMT postgresql-stmt)
Source

generic-postgresql.lisp (file)

Method: database-run-prepared PSTMT
Generic Function: database-sequence-last NAME DATABASE

Select the last value in sequence NAME in DATABASE.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-sequence-last SEQUENCE-NAME DATABASE
Source

sequences.lisp (file)

Method: database-sequence-last SEQUENCE-NAME (DATABASE generic-postgresql-database)
Source

generic-postgresql.lisp (file)

Generic Function: database-sequence-next NAME DATABASE

Increment a sequence in DATABASE.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-sequence-next SEQUENCE-NAME DATABASE
Source

sequences.lisp (file)

Method: database-sequence-next SEQUENCE-NAME (DATABASE generic-postgresql-database)
Source

generic-postgresql.lisp (file)

Generic Function: database-set-sequence-position NAME POSITION DATABASE

Set the position of the sequence called NAME in DATABASE.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-set-sequence-position SEQUENCE-NAME POSITION DATABASE
Source

sequences.lisp (file)

Method: database-set-sequence-position NAME (POSITION integer) (DATABASE generic-postgresql-database)
Source

generic-postgresql.lisp (file)

Generic Function: database-state OBJECT
Package

clsql-sys

Methods
Method: database-state (DATABASE database)

automatically generated reader method

Source

base-classes.lisp (file)

Generic Function: database-store-next-row RESULT-SET DATABASE LIST

Returns t and stores the next row in the result set in list or returns nil when result-set is finished.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-store-next-row RESULT-SET (DATABASE generic-odbc-database) LIST
Source

generic-odbc.lisp (file)

Method: database-store-next-row RESULT-SET (DATABASE database) LIST before
Method: database-store-next-row RESULT-SET DATABASE LIST
Method: database-store-next-row RESULT-SET (DATABASE database) LIST
Generic Function: database-type OBJECT
Package

clsql-sys

Methods
Method: database-type (DATABASE database)

automatically generated reader method

Source

base-classes.lisp (file)

Generic Function: database-type-library-loaded DATABASE-TYPE

The internal generic implementation for checking if database type library loaded successfully.

Package

clsql-sys

Source

db-interface.lisp (file)

Generic Function: database-type-load-foreign DATABASE-TYPE

The internal generic implementation of reload-database-types.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-type-load-foreign DATABASE-TYPE after
Source

initialize.lisp (file)

Method: database-type-load-foreign X
Source

initialize.lisp (file)

Generic Function: database-underlying-type DATABASE

Returns the type of the underlying database. For ODBC, needs to query ODBC driver.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: database-underlying-type DATABASE
Generic Function: database-write-large-object OBJECT-ID DATA DATABASE

Writes data to the large object

Package

clsql-sys

Source

db-interface.lisp (file)

Generic Function: db-backend-has-create/destroy-db? DB-TYPE

T [default] if backend can destroy and create databases.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-backend-has-create/destroy-db? DB-TYPE
Generic Function: db-type-default-case DB-TYPE

: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.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-default-case (DB-TYPE (eql postgresql))
Source

generic-postgresql.lisp (file)

Method: db-type-default-case DB-TYPE
Generic Function: db-type-has-auto-increment? DB-TYPE

NIL [default] if database-type supports auto-incrementing columns.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-has-auto-increment? (DB-UNDERLYING-TYPE (eql mssql))
Source

generic-odbc.lisp (file)

Method: db-type-has-auto-increment? (DB-TYPE (eql postgresql))
Source

generic-postgresql.lisp (file)

Method: db-type-has-auto-increment? DB-TYPE
Generic Function: db-type-has-bigint? DB-TYPE

T [default] if database-type supports bigint.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-has-bigint? DB-TYPE
Generic Function: db-type-has-boolean-where? DB-TYPE

T [default] if database-type supports boolean WHERE clause, such as ’WHERE MARRIED’.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-has-boolean-where? (DB-TYPE (eql mssql))
Source

generic-odbc.lisp (file)

Method: db-type-has-boolean-where? DB-TYPE
Generic Function: db-type-has-except? DB-TYPE

T [default] if database-type supports EXCEPT.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-has-except? (DB-TYPE (eql mssql))
Source

generic-odbc.lisp (file)

Method: db-type-has-except? DB-TYPE
Generic Function: db-type-has-fancy-math? DB-TYPE

NIL [default] if database-type does not have fancy math.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-has-fancy-math? (DB-TYPE (eql postgresql))
Source

generic-postgresql.lisp (file)

Method: db-type-has-fancy-math? DB-TYPE
Generic Function: db-type-has-intersect? DB-TYPE

T [default] if database-type supports INTERSECT.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-has-intersect? (DB-TYPE (eql mssql))
Source

generic-odbc.lisp (file)

Method: db-type-has-intersect? DB-TYPE
Generic Function: db-type-has-prepared-stmt? DB-TYPE

T if database backend supports prepared statements.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-has-prepared-stmt? (DB-TYPE (eql postgresql-socket))
Source

generic-postgresql.lisp (file)

Method: db-type-has-prepared-stmt? (DB-TYPE (eql postgresql))
Source

generic-postgresql.lisp (file)

Method: db-type-has-prepared-stmt? DB-TYPE
Generic Function: db-type-has-subqueries? DB-TYPE

T [default] if database-type supports views.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-has-subqueries? DB-TYPE
Generic Function: db-type-has-union? DB-TYPE

T [default] if database-type supports boolean UNION.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-has-union? DB-TYPE
Generic Function: db-type-has-views? DB-TYPE

T [default] if database-type supports views.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-has-views? DB-TYPE
Generic Function: db-type-transaction-capable? DB DATABASE

T [default] if database can supports transactions.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-transaction-capable? DB DATABASE
Generic Function: db-type-use-column-on-drop-index? DB-TYPE

NIL [default] if database-type does not use column name on DROP INDEX.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-use-column-on-drop-index? DB-TYPE
Generic Function: db-type-use-fully-qualified-column-on-drop-index? DB-TYPE

NIL [default] if database-type does not require fully qualified column name on DROP INDEX.

Package

clsql-sys

Source

db-interface.lisp (file)

Methods
Method: db-type-use-fully-qualified-column-on-drop-index? (DB-TYPE (eql mssql))
Source

generic-odbc.lisp (file)

Method: db-type-use-fully-qualified-column-on-drop-index? DB-TYPE
Generic Function: delete-instance-records OBJECT &key DATABASE

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.

Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: delete-instance-records (INSTANCE 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

Source

oodml.lisp (file)

Generic Function: execute-command EXPRESSION &key DATABASE

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*.

Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: execute-command (EXPR %sql-expression) &key DATABASE
Source

fdml.lisp (file)

Method: execute-command (SQL-EXPRESSION string) &key DATABASE
Source

fdml.lisp (file)

Generic Function: expression OBJECT
Generic Function: (setf expression) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: expression (COMMAND-OBJECT command-object)
Method: (setf expression) NEW-VALUE (COMMAND-OBJECT command-object)

query that refers to parameters using "$1", "$2", "$n". These match positions in the parameters list.

Source

command-object.lisp (file)

Generic Function: filter-select-list VIEW-CLASS SELECT-LIST DATABASE

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)

Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: filter-select-list (C standard-db-object) (SL select-list) DATABASE
Source

oodml.lisp (file)

Generic Function: has-been-prepared OBJECT
Generic Function: (setf has-been-prepared) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: has-been-prepared (COMMAND-OBJECT command-object)
Method: (setf has-been-prepared) NEW-VALUE (COMMAND-OBJECT command-object)

Have we already prepared this command object?

Source

command-object.lisp (file)

Generic Function: instance-refreshed 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.

Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: instance-refreshed (INSTANCE standard-db-object)
Source

oodml.lisp (file)

Generic Function: join-slots OBJECT
Generic Function: (setf join-slots) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: join-slots (SELECT-LIST select-list)

automatically generated reader method

Source

oodml.lisp (file)

Method: (setf join-slots) NEW-VALUE (SELECT-LIST select-list)

automatically generated writer method

Source

oodml.lisp (file)

Generic Function: joins OBJECT
Generic Function: (setf joins) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: joins (SELECT-LIST select-list)

automatically generated reader method

Source

oodml.lisp (file)

Method: (setf joins) NEW-VALUE (SELECT-LIST select-list)

automatically generated writer method

Source

oodml.lisp (file)

Generic Function: midnight SELF
Package

clsql-sys

Source

time.lisp (file)

Methods
Method: midnight (SELF wall-time)

truncate hours, minutes and seconds

Generic Function: parameters OBJECT
Generic Function: (setf parameters) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: parameters (COMMAND-OBJECT command-object)

list of parameters

Source

command-object.lisp (file)

Method: (setf parameters) NEW (O command-object)

This causes the semantics to match cl-sql instead of cl-postgresql

Source

command-object.lisp (file)

Generic Function: prepare-sql-parameter SQL-PARAMETER

This method is responsible for formatting parameters
as the database expects them (eg: :false is nil, nil is :null, dates are iso8601 strings)

Package

clsql-sys

Source

command-object.lisp (file)

Methods
Method: prepare-sql-parameter SQL-PARAMETER
Generic Function: prepared-name OBJECT
Generic Function: (setf prepared-name) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: prepared-name (COMMAND-OBJECT command-object)
Method: (setf prepared-name) NEW-VALUE (COMMAND-OBJECT command-object)

If we want this to be a prepared statement, give it a name to identify it to this session

Source

command-object.lisp (file)

Generic Function: query QUERY-EXPRESSION &key DATABASE RESULT-TYPES FLATP FIELD-NAMES

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.

Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: query (EXPR sql-object-query) &key DATABASE RESULT-TYPES FLATP FIELD-NAMES
Source

fdml.lisp (file)

Method: query (EXPR %sql-expression) &key DATABASE RESULT-TYPES FLATP FIELD-NAMES
Source

fdml.lisp (file)

Method: query (QUERY-EXPRESSION string) &key DATABASE RESULT-TYPES FLATP FIELD-NAMES
Source

fdml.lisp (file)

Generic Function: read-sql-value VAL TYPE DATABASE DB-TYPE
Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: read-sql-value VAL TYPE DATABASE DB-TYPE

read a sql value, from :around read-eval is disabled read numbers in base 10

Source

oodml.lisp (file)

Method: read-sql-value VAL TYPE DATABASE DB-TYPE &aux *READ-EVAL* *READ-BASE* around
Source

oodml.lisp (file)

Generic Function: record-caches OBJECT
Generic Function: (setf record-caches) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: record-caches (DATABASE database)

automatically generated reader method

Source

base-classes.lisp (file)

Method: (setf record-caches) NEW-VALUE (DATABASE database)

automatically generated writer method

Source

base-classes.lisp (file)

Generic Function: result-recording-stream OBJECT
Generic Function: (setf result-recording-stream) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: result-recording-stream (DATABASE database)

automatically generated reader method

Source

base-classes.lisp (file)

Method: (setf result-recording-stream) NEW-VALUE (DATABASE database)

automatically generated writer method

Source

base-classes.lisp (file)

Generic Function: select-list OBJECT
Generic Function: (setf select-list) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: select-list (SELECT-LIST select-list)

automatically generated reader method

Source

oodml.lisp (file)

Method: (setf select-list) NEW-VALUE (SELECT-LIST select-list)

automatically generated writer method

Source

oodml.lisp (file)

Generic Function: slot-list OBJECT
Generic Function: (setf slot-list) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: slot-list (SELECT-LIST select-list)

automatically generated reader method

Source

oodml.lisp (file)

Method: (setf slot-list) NEW-VALUE (SELECT-LIST select-list)

automatically generated writer method

Source

oodml.lisp (file)

Generic Function: sql-error-connection-spec CONDITION
Package

clsql-sys

Methods
Method: sql-error-connection-spec (CONDITION sql-connection-error)
Source

conditions.lisp (file)

Generic Function: sql-error-database CONDITION
Package

clsql-sys

Methods
Method: sql-error-database (CONDITION sql-database-error)
Source

conditions.lisp (file)

Generic Function: sql-error-database-message CONDITION
Package

clsql-sys

Methods
Method: sql-error-database-message (CONDITION sql-database-error)
Source

conditions.lisp (file)

Generic Function: sql-error-database-type CONDITION
Package

clsql-sys

Methods
Method: sql-error-database-type (CONDITION sql-connection-error)
Source

conditions.lisp (file)

Generic Function: sql-error-error-id CONDITION
Package

clsql-sys

Methods
Method: sql-error-error-id (CONDITION sql-database-error)
Source

conditions.lisp (file)

Generic Function: sql-error-expression CONDITION
Package

clsql-sys

Methods
Method: sql-error-expression (CONDITION sql-database-data-error)
Source

conditions.lisp (file)

Generic Function: sql-error-secondary-error-id CONDITION
Package

clsql-sys

Methods
Method: sql-error-secondary-error-id (CONDITION sql-database-error)
Source

conditions.lisp (file)

Generic Function: sql-user-error-message CONDITION
Package

clsql-sys

Methods
Method: sql-user-error-message (CONDITION sql-user-error)
Source

conditions.lisp (file)

Generic Function: sql-warning-database CONDITION
Package

clsql-sys

Methods
Method: sql-warning-database (CONDITION sql-database-warning)
Source

conditions.lisp (file)

Generic Function: transaction OBJECT
Generic Function: (setf transaction) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: transaction (DATABASE database)

automatically generated reader method

Source

base-classes.lisp (file)

Method: (setf transaction) NEW-VALUE (DATABASE database)

automatically generated writer method

Source

base-classes.lisp (file)

Generic Function: transaction-level OBJECT
Generic Function: (setf transaction-level) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: transaction-level (DATABASE database)

automatically generated reader method

Source

base-classes.lisp (file)

Method: (setf transaction-level) NEW-VALUE (DATABASE database)

automatically generated writer method

Source

base-classes.lisp (file)

Generic Function: update-instance-from-records OBJECT &key DATABASE

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.

Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: update-instance-from-records (INSTANCE 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?

Source

oodml.lisp (file)

Generic Function: update-record-from-slot OBJECT SLOT &key DATABASE

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.

Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: update-record-from-slot (OBJ 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

Source

oodml.lisp (file)

Generic Function: update-record-from-slots OBJECT SLOTS &key DATABASE

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.

Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: update-record-from-slots (OBJ 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

Source

oodml.lisp (file)

Generic Function: update-records-from-instance OBJECT &key DATABASE

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.

Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: update-records-from-instance (OBJ 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

Source

oodml.lisp (file)

Generic Function: update-slot-from-record OBJECT SLOT &key DATABASE

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.

Package

clsql-sys

Source

generics.lisp (file)

Methods
Method: update-slot-from-record (INSTANCE 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

Source

oodml.lisp (file)

Generic Function: view-table OBJECT
Generic Function: (setf view-table) NEW-VALUE OBJECT
Package

clsql-sys

Methods
Method: view-table (O select-list)
Source

oodml.lisp (file)

Method: view-table (O class-and-slots)

get the view-table of the view-class of o

Source

oodml.lisp (file)

Method: view-table (STANDARD-DB-CLASS standard-db-class)

automatically generated reader method

Source

metaclasses.lisp (file)

Method: (setf view-table) NEW-VALUE (STANDARD-DB-CLASS standard-db-class)

automatically generated writer method

Source

metaclasses.lisp (file)


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

6.1.5 Conditions

Condition: decimal-parse-error ()

Function ‘parse-decimal-number‘ signals this condition when it couldn’t parse a decimal number from string.

Package

decimals

Source

decimals.lisp (file)

Direct superclasses

parse-error (condition)

Condition: sql-condition ()
Package

clsql-sys

Source

conditions.lisp (file)

Direct superclasses

condition (condition)

Direct subclasses
Condition: sql-connection-error ()

Used to signal an error in connecting to a database.

Package

clsql-sys

Source

conditions.lisp (file)

Direct superclasses

sql-database-error (condition)

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

:database-type

Initform

(quote nil)

Readers

sql-error-database-type (generic function)

Slot: connection-spec
Initargs

:connection-spec

Initform

(quote nil)

Readers

sql-error-connection-spec (generic function)

Condition: sql-database-data-error ()

Used to signal an error with the SQL data passed to a database.

Package

clsql-sys

Source

conditions.lisp (file)

Direct superclasses

sql-database-error (condition)

Direct methods

sql-error-expression (method)

Direct slots
Slot: expression
Initargs

:expression, nil

Readers

sql-error-expression (generic function)

Condition: sql-database-error ()

Used to signal an error in a CLSQL database interface.

Package

clsql-sys

Source

conditions.lisp (file)

Direct superclasses

sql-error (condition)

Direct subclasses
Direct methods
Direct slots
Slot: error-id
Initargs

:error-id

Initform

(quote nil)

Readers

sql-error-error-id (generic function)

Slot: secondary-error-id
Initargs

:secondary-error-id

Initform

(quote nil)

Readers

sql-error-secondary-error-id (generic function)

Slot: database-message
Initargs

:message

Initform

(quote nil)

Readers

sql-error-database-message (generic function)

Slot: database
Initargs

:database

Initform

(quote nil)

Readers

sql-error-database (generic function)

Condition: sql-database-warning ()
Package

clsql-sys

Source

conditions.lisp (file)

Direct superclasses

sql-warning (condition)

Direct methods

sql-warning-database (method)

Direct slots
Slot: database
Initargs

:database

Readers

sql-warning-database (generic function)

Condition: sql-error ()
Package

clsql-sys

Source

conditions.lisp (file)

Direct superclasses
Direct subclasses
Condition: sql-fatal-error ()

Used to signal an error when the database connection is no longer usable.

Package

clsql-sys

Source

conditions.lisp (file)

Direct superclasses

sql-connection-error (condition)

Condition: sql-temporary-error ()

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.

Package

clsql-sys

Source

conditions.lisp (file)

Direct superclasses

sql-database-error (condition)

Condition: sql-timeout-error ()

Used to signal an error when the database times out while processing some operation.

Package

clsql-sys

Source

conditions.lisp (file)

Direct superclasses

sql-connection-error (condition)

Condition: sql-user-error ()

Used to signal lisp errors inside CLSQL.

Package

clsql-sys

Source

conditions.lisp (file)

Direct superclasses

sql-error (condition)

Direct subclasses
Direct methods

sql-user-error-message (method)

Direct slots
Slot: message
Initargs

:message

Initform

(quote "unspecified error")

Readers

sql-user-error-message (generic function)

Condition: sql-warning ()
Package

clsql-sys

Source

conditions.lisp (file)

Direct superclasses
Direct subclasses

sql-database-warning (condition)

Direct methods

sql-warning-message (method)

Direct slots
Slot: message
Initargs

:message

Initform

(quote nil)

Readers

sql-warning-message (generic function)


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

6.1.6 Structures

Structure: date ()
Package

clsql-sys

Source

time.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: mjd
Type

fixnum

Initform

0

Readers

date-mjd (function)

Writers

(setf date-mjd) (function)

Structure: duration ()
Package

clsql-sys

Source

time.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: year
Type

fixnum

Initform

0

Readers

duration-year (function)

Writers

(setf duration-year) (function)

Slot: month
Type

fixnum

Initform

0

Readers

duration-month (function)

Writers

(setf duration-month) (function)

Slot: day
Type

fixnum

Initform

0

Readers

duration-day (function)

Writers

(setf duration-day) (function)

Slot: hour
Type

fixnum

Initform

0

Readers

duration-hour (function)

Writers

(setf duration-hour) (function)

Slot: second
Type

fixnum

Initform

0

Readers

duration-second (function)

Writers

(setf duration-second) (function)

Slot: minute
Type

fixnum

Initform

0

Readers

duration-minute (function)

Writers

(setf duration-minute) (function)

Slot: usec
Type

fixnum

Initform

0

Readers

duration-usec (function)

Writers

(setf duration-usec) (function)

Structure: wall-time ()
Package

clsql-sys

Source

time.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: mjd
Type

fixnum

Initform

0

Readers

time-mjd (function)

Writers

(setf time-mjd) (function)

Slot: second
Type

fixnum

Initform

0

Readers

time-second (function)

Writers

(setf time-second) (function)

Slot: usec
Type

fixnum

Initform

0

Readers

time-usec (function)

Writers

(setf time-usec) (function)


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

6.1.7 Classes

Class: command-object ()
Package

clsql-sys

Source

command-object.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: expression

query that refers to parameters using "$1", "$2", "$n". These match positions in the parameters list.

Initargs

:expression

Readers

expression (generic function)

Writers

(setf expression) (generic function)

Slot: parameters

list of parameters

Initargs

:parameters

Readers

parameters (generic function)

Writers

(setf parameters) (generic function)

Slot: prepared-name

If we want this to be a prepared statement, give it a name to identify it to this session

Initargs

:prepared-name

Initform

""

Readers

prepared-name (generic function)

Writers

(setf prepared-name) (generic function)

Slot: has-been-prepared

Have we already prepared this command object?

Initargs

:has-been-prepared

Readers

has-been-prepared (generic function)

Writers

(setf has-been-prepared) (generic function)

Class: conn-pool ()
Package

clsql-sys

Source

pool.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: connection-spec
Initargs

:connection-spec

Readers

connection-spec (generic function)

Writers

(setf connection-spec) (generic function)

Slot: database-type
Initargs

:pool-database-type

Readers

pool-database-type (generic function)

Writers

(setf pool-database-type) (generic function)

Slot: free-connections
Readers

free-connections (generic function)

Writers

(setf free-connections) (generic function)

Slot: all-connections
Readers

all-connections (generic function)

Writers

(setf all-connections) (generic function)

Slot: lock
Initform

(clsql-sys:make-process-lock "connection pool")

Readers

conn-pool-lock (generic function)

Writers

(setf conn-pool-lock) (generic function)

Class: database ()

This class is the supertype of all databases handled by CLSQL.

Package

clsql-sys

Source

base-classes.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: name
Initargs

:name

Readers

database-name (generic function)

Slot: connection-spec

Required to use connection pool.

Initargs

:connection-spec

Readers

connection-spec (generic function)

Slot: database-type
Initargs

:database-type

Initform

:unknown

Readers

database-type (generic function)

Slot: encoding

External format character encoding.

Initargs

:encoding

Slot: state
Initform

:closed

Readers

database-state (generic function)

Slot: autocommit
Initform

t

Readers

database-autocommit (generic function)

Writers

(setf database-autocommit) (generic function)

Slot: command-recording-stream
Readers

command-recording-stream (generic function)

Writers

(setf command-recording-stream) (generic function)

Slot: result-recording-stream
Readers

result-recording-stream (generic function)

Writers

(setf result-recording-stream) (generic function)

Slot: record-caches
Readers

record-caches (generic function)

Writers

(setf record-caches) (generic function)

Slot: view-classes
Readers

database-view-classes (generic function)

Writers

(setf database-view-classes) (generic function)

Slot: transaction-level
Initform

0

Readers

transaction-level (generic function)

Writers

(setf transaction-level) (generic function)

Slot: transaction
Readers

transaction (generic function)

Writers

(setf transaction) (generic function)

Slot: conn-pool
Initargs

:conn-pool

Readers

conn-pool (generic function)

Writers

(setf conn-pool) (generic function)

Slot: attribute-cache

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.

Initform

(make-hash-table :size 100 :test (quote equal))

Readers

attribute-cache (generic function)

Writers

(setf attribute-cache) (generic function)

Class: generic-odbc-database ()

Encapsulate same behavior across odbc and aodbc backends.

Package

clsql-sys

Source

generic-odbc.lisp (file)

Direct superclasses

database (class)

Direct methods
Direct slots
Slot: dbi-package
Initargs

:dbi-package

Readers

dbi-package (generic function)

Slot: odbc-conn
Initargs

:odbc-conn

Readers

odbc-conn (generic function)

Writers

(setf odbc-conn) (generic function)

Slot: disconnect-fn
Readers

disconnect-fn (generic function)

Slot: sql-fn
Readers

sql-fn (generic function)

Slot: close-query-fn
Readers

close-query-fn (generic function)

Slot: fetch-row
Readers

fetch-row-fn (generic function)

Slot: list-all-database-tables-fn
Readers

list-all-database-tables-fn (generic function)

Slot: list-all-table-columns-fn
Readers

list-all-table-columns-fn (generic function)

Slot: odbc-db-type
Initargs

:odbc-db-type

Readers

database-odbc-db-type (generic function)

Writers

(setf database-odbc-db-type) (generic function)

Class: generic-postgresql-database ()

Encapsulate same behavior across postgresql and postgresql-socket backends.

Package

clsql-sys

Source

generic-postgresql.lisp (file)

Direct superclasses

database (class)

Direct methods
Direct slots
Slot: has-table-pg_roles
Type

boolean

Readers

has-table-pg_roles (generic function)

Class: select-list ()

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

Package

clsql-sys

Source

oodml.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: view-class
Initargs

:view-class

Readers

view-class (generic function)

Writers

(setf view-class) (generic function)

Slot: select-list
Initargs

:select-list

Readers

select-list (generic function)

Writers

(setf select-list) (generic function)

Slot: slot-list
Initargs

:slot-list

Readers

slot-list (generic function)

Writers

(setf slot-list) (generic function)

Slot: joins
Initargs

:joins

Readers

joins (generic function)

Writers

(setf joins) (generic function)

Slot: join-slots
Initargs

:join-slots

Readers

join-slots (generic function)

Writers

(setf join-slots) (generic function)

Class: sql ()

A literal SQL expression.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

%sql-expression (class)

Direct methods
  • print-object (method)
  • output-sql (method)
  • make-load-form (method)
Direct slots
Slot: text
Initargs

:string

Initform

""

Class: sql-assignment-exp ()

An SQL Assignment expression.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

sql-relational-exp (class)

Direct methods

output-sql (method)

Class: sql-between-exp ()

An SQL between expression.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

sql-function-exp (class)

Direct methods

output-sql (method)

Class: sql-function-exp ()

An SQL function expression.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

%sql-expression (class)

Direct subclasses

sql-between-exp (class)

Direct methods
Direct slots
Slot: name
Initargs

:name

Slot: args
Initargs

:args

Class: sql-ident ()

An SQL identifer.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

%sql-expression (class)

Direct subclasses
Direct methods
Direct slots
Slot: name
Initargs

:name

Initform

clsql-sys::+null-string+

Class: sql-ident-attribute ()

An SQL Attribute identifier.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

sql-ident (class)

Direct methods
Direct slots
Slot: qualifier
Initargs

:qualifier

Initform

clsql-sys::+null-string+

Slot: type
Initargs

:type

Initform

clsql-sys::+null-string+

Class: sql-ident-table ()

An SQL table identifier.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

sql-ident (class)

Direct methods
Direct slots
Slot: alias
Initargs

:table-alias

Class: sql-object-query ()
Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

%sql-expression (class)

Direct methods
Direct slots
Slot: objects
Initargs

:objects

Slot: flatp
Initargs

:flatp

Slot: exp
Initargs

:exp

Slot: refresh
Initargs

:refresh

Class: sql-query ()

An SQL SELECT query.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

%sql-expression (class)

Direct methods
Direct slots
Slot: selections
Initargs

:selections

Slot: all
Initargs

:all

Slot: flatp
Initargs

:flatp

Slot: set-operation
Initargs

:set-operation

Slot: distinct
Initargs

:distinct

Slot: from
Initargs

:from

Slot: where
Initargs

:where

Slot: group-by
Initargs

:group-by

Slot: having
Initargs

:having

Slot: limit
Initargs

:limit

Slot: offset
Initargs

:offset

Slot: order-by
Initargs

:order-by

Slot: inner-join
Initargs

:inner-join

Slot: on
Initargs

:on

Class: sql-query-modifier-exp ()

An SQL query modifier expression.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

%sql-expression (class)

Direct methods

output-sql (method)

Direct slots
Slot: modifier
Initargs

:modifier

Slot: components
Initargs

:components

Class: sql-relational-exp ()

An SQL relational expression.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

%sql-expression (class)

Direct subclasses
Direct methods
Direct slots
Slot: operator
Initargs

:operator

Slot: sub-expressions
Initargs

:sub-expressions

Class: sql-set-exp ()

An SQL set expression.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

%sql-expression (class)

Direct methods
Direct slots
Slot: operator
Initargs

:operator

Slot: sub-expressions
Initargs

:sub-expressions

Class: sql-typecast-exp ()

An SQL typecast expression.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

sql-value-exp (class)

Direct methods
Class: sql-upcase-like ()

An SQL ’like’ that upcases its arguments.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

sql-relational-exp (class)

Direct methods

output-sql (method)

Class: sql-value-exp ()

An SQL value expression.

Package

clsql-sys

Source

expressions.lisp (file)

Direct superclasses

%sql-expression (class)

Direct subclasses

sql-typecast-exp (class)

Direct methods
Direct slots
Slot: modifier
Initargs

:modifier

Slot: components
Initargs

:components

Class: standard-db-object ()

Superclass for all CLSQL View Classes.

Package

clsql-sys

Source

ooddl.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: view-database
Initargs

:view-database

Readers

view-database (generic function)

Class: transaction ()
Package

clsql-sys

Source

transaction.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: commit-hooks
Readers

commit-hooks (generic function)

Writers

(setf commit-hooks) (generic function)

Slot: rollback-hooks
Readers

rollback-hooks (generic function)

Writers

(setf rollback-hooks) (generic function)

Slot: previous-autocommit
Initargs

:previous-autocommit