clsql

API Reference

clsql

Common Lisp SQL Interface library

CMUCL-COMPAT

  • Function REQUIRED-ARGUMENT
  • Macro SHRINK-VECTOR (vec len)
  • Function MAKE-SEQUENCE-OF-TYPE (type length)
    Returns a sequence of the given TYPE and LENGTH.
  • Function RESULT-TYPE-OR-LOSE (type nil-ok)

CLSQL-SYS

This is the INTERNAL SQL-Interface package of CLSQL.
  • Class DATABASE
    This class is the supertype of all databases handled by CLSQL.
    NAME   Reader: DATABASE-NAME
    CONNECTION-SPEC   Reader: CONNECTION-SPEC
    Required to use connection pool.
    DATABASE-TYPE   Reader: DATABASE-TYPE
    ENCODING
    External format character encoding.
    STATE   Reader: DATABASE-STATE
    AUTOCOMMIT   Accessor: DATABASE-AUTOCOMMIT
    COMMAND-RECORDING-STREAM   Accessor: COMMAND-RECORDING-STREAM
    RESULT-RECORDING-STREAM   Accessor: RESULT-RECORDING-STREAM
    RECORD-CACHES   Accessor: RECORD-CACHES
    VIEW-CLASSES   Accessor: DATABASE-VIEW-CLASSES
    TRANSACTION-LEVEL   Accessor: TRANSACTION-LEVEL
    TRANSACTION   Accessor: TRANSACTION
    CONN-POOL   Accessor: CONN-POOL
    ATTRIBUTE-CACHE   Accessor: 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.
  • Variable *BACKEND-WARNING-BEHAVIOR*
    :warn
    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.
  • Condition SQL-CONDITION
  • Condition SQL-ERROR  (SIMPLE-ERROR, SQL-CONDITION)
  • Condition SQL-DATABASE-ERROR  (SQL-ERROR)
    Used to signal an error in a CLSQL database interface.
  • Condition SQL-CONNECTION-ERROR  (SQL-DATABASE-ERROR)
    Used to signal an error in connecting to a database.
  • Condition SQL-DATABASE-DATA-ERROR  (SQL-DATABASE-ERROR)
    Used to signal an error with the SQL data passed to a database.
  • Condition SQL-TEMPORARY-ERROR  (SQL-DATABASE-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.
  • Condition SQL-TIMEOUT-ERROR  (SQL-CONNECTION-ERROR)
    Used to signal an error when the database times out while processing some operation.
  • Condition SQL-FATAL-ERROR  (SQL-CONNECTION-ERROR)
    Used to signal an error when the database connection is no longer usable.
  • Condition SQL-USER-ERROR  (SQL-ERROR)
    Used to signal lisp errors inside CLSQL.
  • Condition SQL-WARNING  (WARNING, SQL-CONDITION)
  • Condition SQL-DATABASE-WARNING  (SQL-WARNING)
  • Generic-Function DATABASE-TYPE-LOAD-FOREIGN (database-type)
    The internal generic implementation of reload-database-types.
  • Generic-Function DATABASE-TYPE-LIBRARY-LOADED (database-type)
    The internal generic implementation for checking if database type library loaded successfully.
  • Generic-Function DATABASE-INITIALIZE-DATABASE-TYPE (database-type)
    The internal generic implementation of initialize-database-type.
  • 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.
  • Generic-Function DATABASE-CONNECT (connection-spec database-type)
    Internal generic implementation of connect.
  • Generic-Function DATABASE-RECONNECT (database)
    Internal generic implementation of reconnect.
  • Method DATABASE-RECONNECT ((database t))
  • Method DATABASE-RECONNECT ((database t))
  • Method DATABASE-RECONNECT ((database t))
  • Generic-Function DATABASE-DISCONNECT (database)
    Internal generic implementation of disconnect.
  • Method DATABASE-DISCONNECT ((database t))
  • Method DATABASE-DISCONNECT ((database t))
  • Method DATABASE-DISCONNECT ((database t))
  • Generic-Function DATABASE-QUERY (query-expression database result-types field-names)
    Internal generic implementation of query.
  • Method DATABASE-QUERY (query-expression (database database) result-types field-names)
  • Method DATABASE-QUERY (query-expression (database database) result-types field-names)
  • Method DATABASE-QUERY (query-expression (database database) result-types field-names)
  • Method DATABASE-QUERY (query-expression (database t) result-types field-names)
  • Method DATABASE-QUERY (query-expression (database t) result-types field-names)
  • Method DATABASE-QUERY (query-expression (database t) result-types field-names)
  • Generic-Function DATABASE-EXECUTE-COMMAND (sql-expression database)
    Internal generic implementation of execute-command.
  • Method DATABASE-EXECUTE-COMMAND (sql-expression (database database))
  • Method DATABASE-EXECUTE-COMMAND (sql-expression (database database))
  • Method DATABASE-EXECUTE-COMMAND (sql-expression (database database))
  • Method DATABASE-EXECUTE-COMMAND (sql-expression (database t))
  • Method DATABASE-EXECUTE-COMMAND (sql-expression (database t))
  • Method DATABASE-EXECUTE-COMMAND (sql-expression (database t))
  • 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.
  • Method DATABASE-QUERY-RESULT-SET (query-expression (database database) &key full-set result-types)
  • Method DATABASE-QUERY-RESULT-SET (query-expression (database database) &key full-set result-types)
  • Method DATABASE-QUERY-RESULT-SET (query-expression (database database) &key full-set result-types)
  • Method DATABASE-QUERY-RESULT-SET (query-expression (database t) &key full-set result-types)
  • Method DATABASE-QUERY-RESULT-SET (query-expression (database t) &key full-set result-types)
  • Method DATABASE-QUERY-RESULT-SET (query-expression (database t) &key full-set result-types)
  • Generic-Function DATABASE-DUMP-RESULT-SET (result-set database)
    Dumps the received result-set.
  • Method DATABASE-DUMP-RESULT-SET (result-set (database database))
  • Method DATABASE-DUMP-RESULT-SET (result-set (database database))
  • Method DATABASE-DUMP-RESULT-SET (result-set (database database))
  • Method DATABASE-DUMP-RESULT-SET (result-set (database t))
  • Method DATABASE-DUMP-RESULT-SET (result-set (database t))
  • Method DATABASE-DUMP-RESULT-SET (result-set (database t))
  • 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.
  • Method DATABASE-STORE-NEXT-ROW (result-set (database database) list)
  • Method DATABASE-STORE-NEXT-ROW (result-set (database database) list)
  • Method DATABASE-STORE-NEXT-ROW (result-set (database database) list)
  • Method DATABASE-STORE-NEXT-ROW (result-set (database t) list)
  • Method DATABASE-STORE-NEXT-ROW (result-set (database t) list)
  • Method DATABASE-STORE-NEXT-ROW (result-set (database t) list)
  • Generic-Function DATABASE-CREATE (connection-spec type)
    Creates a database, returns T if successfull or signals an error.
  • 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.
  • Method DATABASE-PROBE (spec type)
  • Method DATABASE-PROBE (spec type)
  • Method DATABASE-PROBE (spec type)
  • Generic-Function DATABASE-LIST (connection-spec type)
    Lists all databases found for TYPE. May signal an error if unable to communicate with database server.
  • Method DATABASE-LIST (spec type)
  • Method DATABASE-LIST (spec type)
  • Method DATABASE-LIST (spec type)
  • Generic-Function DATABASE-DESTROY (connection-spec type)
    Destroys (drops) a database, returns T if successfull or signals an error if unable to destory.
  • Generic-Function DATABASE-CREATE-SEQUENCE (name database)
    Create a sequence in DATABASE.
  • Generic-Function DATABASE-DROP-SEQUENCE (name database)
    Drop a sequence from DATABASE.
  • Generic-Function DATABASE-SEQUENCE-NEXT (name database)
    Increment a sequence in DATABASE.
  • Generic-Function DATABASE-LIST-SEQUENCES (database &key owner)
    List all sequences in DATABASE.
  • Generic-Function DATABASE-SET-SEQUENCE-POSITION (name position database)
    Set the position of the sequence called NAME in DATABASE.
  • Generic-Function DATABASE-SEQUENCE-LAST (name database)
    Select the last value in sequence NAME in DATABASE.
  • 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.
  • Generic-Function DATABASE-LIST-TABLES (database &key owner)
    List all tables in the given database
  • Method DATABASE-LIST-TABLES ((database t) &key owner)
  • Method DATABASE-LIST-TABLES ((database t) &key owner)
  • Method DATABASE-LIST-TABLES ((database t) &key owner)
  • Method DATABASE-LIST-TABLES ((database database) &key owner)
  • Method DATABASE-LIST-TABLES ((database database) &key owner)
  • Method DATABASE-LIST-TABLES ((database database) &key owner)
  • Generic-Function DATABASE-LIST-TABLES-AND-SEQUENCES (database &key owner)
    List all tables in the given database, may include seqeneces
  • Method DATABASE-LIST-TABLES-AND-SEQUENCES ((database database) &key owner)
  • Method DATABASE-LIST-TABLES-AND-SEQUENCES ((database database) &key owner)
  • Method DATABASE-LIST-TABLES-AND-SEQUENCES ((database database) &key owner)
  • Method DATABASE-LIST-TABLES-AND-SEQUENCES ((database t) &key owner)
  • Method DATABASE-LIST-TABLES-AND-SEQUENCES ((database t) &key owner)
  • Method DATABASE-LIST-TABLES-AND-SEQUENCES ((database t) &key owner)
  • Generic-Function DATABASE-LIST-VIEWS (database &key owner)
    List all views in the DATABASE.
  • Method DATABASE-LIST-VIEWS ((database t) &key owner)
  • Method DATABASE-LIST-VIEWS ((database t) &key owner)
  • Method DATABASE-LIST-VIEWS ((database t) &key owner)
  • Method DATABASE-LIST-VIEWS ((database database) &key owner)
  • Method DATABASE-LIST-VIEWS ((database database) &key owner)
  • Method DATABASE-LIST-VIEWS ((database database) &key owner)
  • Generic-Function DATABASE-LIST-INDEXES (database &key owner)
    List all indexes in the DATABASE.
  • Method DATABASE-LIST-INDEXES ((database t) &key owner)
  • Method DATABASE-LIST-INDEXES ((database t) &key owner)
  • Method DATABASE-LIST-INDEXES ((database t) &key owner)
  • Method DATABASE-LIST-INDEXES ((database database) &key owner)
  • Method DATABASE-LIST-INDEXES ((database database) &key owner)
  • Method DATABASE-LIST-INDEXES ((database database) &key owner)
  • Generic-Function DATABASE-LIST-TABLE-INDEXES (table database &key owner)
    List all indexes for a table in the DATABASE.
  • Method DATABASE-LIST-TABLE-INDEXES (table (database t) &key owner)
  • Method DATABASE-LIST-TABLE-INDEXES (table (database t) &key owner)
  • Method DATABASE-LIST-TABLE-INDEXES (table (database t) &key owner)
  • Method DATABASE-LIST-TABLE-INDEXES (table (database database) &key owner)
  • Method DATABASE-LIST-TABLE-INDEXES (table (database database) &key owner)
  • Method DATABASE-LIST-TABLE-INDEXES (table (database database) &key owner)
  • Generic-Function DATABASE-LIST-ATTRIBUTES (table database &key owner)
    List all attributes in TABLE.
  • Method DATABASE-LIST-ATTRIBUTES (table (database t) &key owner)
  • Method DATABASE-LIST-ATTRIBUTES (table (database t) &key owner)
  • Method DATABASE-LIST-ATTRIBUTES (table (database t) &key owner)
  • Method DATABASE-LIST-ATTRIBUTES (table (database database) &key owner)
  • Method DATABASE-LIST-ATTRIBUTES (table (database database) &key owner)
  • Method DATABASE-LIST-ATTRIBUTES (table (database database) &key owner)
  • 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.
  • Method DATABASE-ATTRIBUTE-TYPE (attribute table (database t) &key owner)
  • Method DATABASE-ATTRIBUTE-TYPE (attribute table (database t) &key owner)
  • Method DATABASE-ATTRIBUTE-TYPE (attribute table (database t) &key owner)
  • Method DATABASE-ATTRIBUTE-TYPE (attribute table (database database) &key owner)
  • Method DATABASE-ATTRIBUTE-TYPE (attribute table (database database) &key owner)
  • Method DATABASE-ATTRIBUTE-TYPE (attribute table (database database) &key owner)
  • Generic-Function DATABASE-UNDERLYING-TYPE (database)
    Returns the type of the underlying database. For ODBC, needs to query ODBC driver.
  • Method DATABASE-UNDERLYING-TYPE (database)
  • Method DATABASE-UNDERLYING-TYPE (database)
  • Method DATABASE-UNDERLYING-TYPE (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.
  • Method DB-TYPE-USE-COLUMN-ON-DROP-INDEX? (db-type)
  • Method DB-TYPE-USE-COLUMN-ON-DROP-INDEX? (db-type)
  • 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.
  • Method DB-TYPE-USE-FULLY-QUALIFIED-COLUMN-ON-DROP-INDEX? (db-type)
  • Method DB-TYPE-USE-FULLY-QUALIFIED-COLUMN-ON-DROP-INDEX? (db-type)
  • Method DB-TYPE-USE-FULLY-QUALIFIED-COLUMN-ON-DROP-INDEX? (db-type)
  • Generic-Function DB-TYPE-HAS-VIEWS? (db-type)
    T [default] if database-type supports views.
  • Generic-Function DB-TYPE-HAS-BIGINT? (db-type)
    T [default] if database-type supports bigint.
  • 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.
  • Generic-Function DB-TYPE-HAS-FANCY-MATH? (db-type)
    NIL [default] if database-type does not have fancy math.
  • Method DB-TYPE-HAS-FANCY-MATH? (db-type)
  • Method DB-TYPE-HAS-FANCY-MATH? (db-type)
  • Method DB-TYPE-HAS-FANCY-MATH? (db-type)
  • Generic-Function DB-TYPE-HAS-SUBQUERIES? (db-type)
    T [default] if database-type supports views.
  • Generic-Function DB-TYPE-HAS-BOOLEAN-WHERE? (db-type)
    T [default] if database-type supports boolean WHERE clause, such as 'WHERE MARRIED'.
  • Generic-Function DB-TYPE-HAS-UNION? (db-type)
    T [default] if database-type supports boolean UNION.
  • Generic-Function DB-BACKEND-HAS-CREATE/DESTROY-DB? (db-type)
    T [default] if backend can destroy and create databases.
  • Generic-Function DB-TYPE-TRANSACTION-CAPABLE? (db database)
    T [default] if database can supports transactions.
  • Generic-Function DB-TYPE-HAS-PREPARED-STMT? (db-type)
    T if database backend supports prepared statements.
  • Method DB-TYPE-HAS-PREPARED-STMT? ((db-type t))
  • Method DB-TYPE-HAS-PREPARED-STMT? ((db-type t))
  • Method DB-TYPE-HAS-PREPARED-STMT? ((db-type t))
  • Generic-Function DB-TYPE-HAS-INTERSECT? (db-type)
    T [default] if database-type supports INTERSECT.
  • Generic-Function DB-TYPE-HAS-EXCEPT? (db-type)
    T [default] if database-type supports EXCEPT.
  • Generic-Function DB-TYPE-HAS-AUTO-INCREMENT? (db-type)
    NIL [default] if database-type supports auto-incrementing columns.
  • Method DB-TYPE-HAS-AUTO-INCREMENT? (db-type)
  • Method DB-TYPE-HAS-AUTO-INCREMENT? (db-type)
  • Method DB-TYPE-HAS-AUTO-INCREMENT? (db-type)
  • Generic-Function DATABASE-CREATE-LARGE-OBJECT (database)
    Creates a new large object in the database and returns the object identifier
  • Generic-Function DATABASE-WRITE-LARGE-OBJECT (object-id data database)
    Writes data to the large object
  • Generic-Function DATABASE-READ-LARGE-OBJECT (object-id database)
    Reads the large object content
  • Generic-Function DATABASE-DELETE-LARGE-OBJECT (object-id database)
    Deletes the large object in the database
  • Generic-Function DATABASE-PREPARE (stmt types database result-types field-names)
    Prepare a statement for later execution.
  • Method DATABASE-PREPARE (stmt types (database database) result-types field-names)
  • Method DATABASE-PREPARE (stmt types (database database) result-types field-names)
  • Method DATABASE-PREPARE (stmt types (database database) result-types field-names)
  • Method DATABASE-PREPARE (stmt types (database t) result-types field-names)
  • Method DATABASE-PREPARE (stmt types (database t) result-types field-names)
  • Method DATABASE-PREPARE (stmt types (database t) result-types field-names)
  • Generic-Function DATABASE-BIND-PARAMETER (prepared-stmt position value)
    Bind a parameter for a prepared statement.
  • Method DATABASE-BIND-PARAMETER ((pstmt t) position value)
  • Method DATABASE-BIND-PARAMETER ((pstmt t) position value)
  • Method DATABASE-BIND-PARAMETER ((pstmt t) position value)
  • Generic-Function DATABASE-RUN-PREPARED (prepared-stmt)
    Execute a prepared statement.
  • Method DATABASE-RUN-PREPARED ((pstmt t))
  • Method DATABASE-RUN-PREPARED ((pstmt t))
  • Method DATABASE-RUN-PREPARED ((pstmt t))
  • Generic-Function DATABASE-FREE-PREPARED (prepared-stmt)
    Free the resources of a prepared statement.
  • Method DATABASE-FREE-PREPARED ((pstmt t))
  • Method DATABASE-FREE-PREPARED ((pstmt t))
  • Method DATABASE-FREE-PREPARED ((pstmt t))
  • 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.
  • Generic-Function DATABASE-RELEASE-TO-CONN-POOL (database)
    Chance for the database to cleanup before it is returned to the connection pool.
  • Method DATABASE-DISCONNECT ((database database))
  • Method DATABASE-QUERY (query-expression (database database) result-set field-names)
  • Method DATABASE-EXECUTE-COMMAND (sql-expression (database database))
  • Method DATABASE-QUERY-RESULT-SET (expr (database database) &key full-set result-types)
  • Method DATABASE-DUMP-RESULT-SET (result-set (database database))
  • Method DATABASE-STORE-NEXT-ROW (result-set (database database) list)
  • Variable *FOREIGN-LIBRARY-SEARCH-PATHS*
    nil
    A list of pathnames denoting directories where CLSQL will look for foreign libraries (in addition to the default places).
  • Function PUSH-LIBRARY-PATH (path)
    Adds the pathspec PATH (which should denote a directory) to the list *FOREIGN-LIBRARY-SEARCH-PATHS*.
  • Function NUMBER-TO-SQL-STRING (num)
  • Function FLOAT-TO-SQL-STRING (num)
    Convert exponent character for SQL
  • Function SQL-ESCAPE (identifier)
    Change hyphens to underscores, ensure string
  • Macro WITHOUT-INTERRUPTS (&body body)
  • Function MAKE-PROCESS-LOCK (name)
  • Macro WITH-PROCESS-LOCK ((lock desc) &body body)
  • Function SQL-ESCAPE-QUOTES (s)
    Escape quotes for SQL string writing
  • Function COMMAND-OUTPUT (control-string &rest args)
  • Macro IN (obj &rest choices)
  • Function GETENV (var)
    Return the value of the environment variable.
  • Function SYMBOL-NAME-DEFAULT-CASE (str)
  • Function CONVERT-TO-DB-DEFAULT-CASE (str database)
  • Function ENSURE-KEYWORD (name)
    Returns keyword for a name.
  • Function MONTH-NAME (month-index)
  • Struct WALL-TIME
    MJD
    SECOND
    USEC
  • Function TIME-MJD (instance)
  • Function (setf TIME-MJD) (value instance)
  • Struct DURATION
    YEAR
    MONTH
    DAY
    HOUR
    SECOND
    MINUTE
    USEC
  • Function DURATION-YEAR (instance)
  • Function (setf DURATION-YEAR) (value instance)
  • Function DURATION-MONTH (instance)
  • Function (setf DURATION-MONTH) (value instance)
  • Function DURATION-DAY (instance)
  • Function (setf DURATION-DAY) (value instance)
  • Function DURATION-HOUR (instance)
  • Function (setf DURATION-HOUR) (value instance)
  • Function DURATION-SECOND (instance)
  • Function (setf DURATION-SECOND) (value instance)
  • Function DURATION-MINUTE (instance)
  • Function (setf DURATION-MINUTE) (value instance)
  • Struct DATE
    MJD
  • Function DATE-P (object)
  • Function DATE-MJD (instance)
  • Function (setf DATE-MJD) (value instance)
  • Function DURATION-TIMESTRING (duration)
  • Function MAKE-TIME (&key (year 0) (month 1) (day 1) (hour 0) (minute 0) (second 0) (usec 0) (offset 0))
  • Function MAKE-DATE (&key (year 0) (month 1) (day 1) (hour 0) (minute 0) (second 0) (usec 0) (offset 0))
  • Function UTIME->TIME (utime)
    Return a pair: (GREGORIAN DAY . TIME-OF-DAY)
  • Function GET-TIME
    Return a pair: (GREGORIAN DAY . TIME-OF-DAY)
  • Function GET-DATE
    Returns a date for today
  • Function MAKE-DURATION (&key (year 0) (month 0) (day 0) (hour 0) (minute 0) (second 0) (usec 0))
  • Function TIME-YMD (time)
  • Function TIME-DOW (time)
    Return the 0 indexed Day of the week starting with Sunday
  • Function DECODE-TIME (time)
    returns the decoded time as multiple values: usec, second, minute, hour, day, month, year, integer day-of-week
  • Function DATE-YMD (date)
  • Function DATE-DOW (date)
  • Function DECODE-DATE (date)
    returns the decoded date as multiple values: day month year integer day-of-week
  • Function DURATION-REDUCE (duration precision &optional round)
  • Function DURATION= (duration-a duration-b)
  • Function DURATION< (duration-a duration-b)
  • Function DURATION<= (duration-a duration-b)
  • Function DURATION>= (x y)
  • Function DURATION> (x y)
  • Function TIME= (number &rest more-numbers)
    Returns T if all of its arguments are numerically equal, NIL otherwise.
  • Function TIME< (number &rest more-numbers)
    Returns T if its arguments are in strictly increasing order, NIL otherwise.
  • Function TIME> (number &rest more-numbers)
    Returns T if its arguments are in strictly decreasing order, NIL otherwise.
  • Function TIME<= (number &rest more-numbers)
    Returns T if arguments are in strictly non-decreasing order, NIL otherwise.
  • Function TIME>= (number &rest more-numbers)
    Returns T if arguments are in strictly non-increasing order, NIL otherwise.
  • Function TIME-MAX (number &rest more-numbers)
    Returns the greatest of its arguments.
  • Function TIME-MIN (number &rest more-numbers)
    Returns the least of its arguments.
  • Function TIME-COMPARE (time-a time-b)
  • Function DATE= (number &rest more-numbers)
  • Function DATE< (number &rest more-numbers)
  • Function DATE> (number &rest more-numbers)
  • Function DATE<= (number &rest more-numbers)
  • Function DATE>= (number &rest more-numbers)
  • Function DATE-MAX (number &rest more-numbers)
  • Function DATE-MIN (number &rest more-numbers)
  • Function DATE-COMPARE (date-a date-b)
  • Function DB-TIMESTRING (time &key stream)
    return the string to store the given time in the database
  • Function ISO-TIMESTRING (time &key stream)
  • Function DB-DATESTRING (date)
  • Function INTERVAL-START (instance)
  • Function (setf INTERVAL-START) (value instance)
  • Function INTERVAL-END (instance)
  • Function (setf INTERVAL-END) (value instance)
  • Function INTERVAL-CONTAINED (instance)
  • Function (setf INTERVAL-CONTAINED) (value instance)
  • Function INTERVAL-TYPE (instance)
  • Function (setf INTERVAL-TYPE) (value instance)
  • Function INTERVAL-DATA (instance)
  • Function (setf INTERVAL-DATA) (value instance)
  • Function MAKE-INTERVAL (&key ((start start) nil) ((end end) nil) ((name name) nil) ((contained contained) nil) ((type type) nil) ((data data) nil))
  • Function INTERVAL-RELATION (x y)
    Compare the relationship of node x to node y. Returns either :contained :contains :follows :overlaps or :precedes.
  • Function INTERVAL-PUSH (interval-list interval &optional container-rule)
  • Function INTERVAL-MATCH (list time)
    Return the index of the first interval in list containing time
  • Function INTERVAL-CLEAR (list time)
  • 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.
  • Function GREGORIAN-TO-MJD (month day year)
  • Function MJD-TO-GREGORIAN (mjd)
  • Function DURATION+ (time &rest durations)
    Add each DURATION to TIME, returning a new wall-time value.
  • Function TIME+ (time &rest durations)
    Add each DURATION to TIME, returning a new wall-time value.
  • 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.
  • Function TIME- (time &rest durations)
    Subtract each DURATION from TIME, returning a new wall-time value.
  • 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.
  • Function TIME-DIFFERENCE (time1 time2)
    Returns a DURATION representing the difference between TIME1 and TIME2.
  • Function DATE-DIFFERENCE (date1 date2)
    Returns a DURATION representing the difference between TIME1 and TIME2.
  • Function FORMAT-DATE (stream date &key format (date-separator "-") (internal-separator " "))
    produces on stream the datestring corresponding to the date with the given options
  • 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
  • Function CURRENT-YEAR
  • Function CURRENT-MONTH
  • Function CURRENT-DAY
  • Function PARSE-DATE-TIME (string)
    parses date like 08/08/01, 8.8.2001, eg
  • Function MERGED-TIME (day time-of-day)
  • Function PRINT-DATE (time &optional (style :daytime))
  • Function TIME-ELEMENT (time element)
  • Function DATE-ELEMENT (date element)
  • Function FORMAT-DURATION (stream duration &key (precision :minute))
  • Generic-Function MIDNIGHT (self)
  • Method MIDNIGHT ((self wall-time))
    truncate hours, minutes and seconds
  • Function ROLL (date &key (year 0) (month 0) (day 0) (second 0) (hour 0) (minute 0) (usec 0) (destructive nil))
  • Function ROLL-TO (date size position)
  • Function WEEK-CONTAINING (time)
  • Function PARSE-YEARSTRING (string)
  • Function EXTRACT-ROMAN (string &aux parse)
  • Function PARSE-TIMESTRING (timestring &key (start 0) 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.
  • Function PARSE-DATESTRING (datestring &key (start 0) 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).
  • 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*.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • Generic-Function DATABASE-OUTPUT-SQL-AS-TYPE (type val database db-type)
  • Generic-Function READ-SQL-VALUE (val type database db-type)
  • Generic-Function DATABASE-LAST-AUTO-INCREMENT-ID (database table column)
  • 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)
  • Variable *LOADED-DATABASE-TYPES*
    nil
    Contains a list of database types which have been defined/loaded.
  • Method DATABASE-TYPE-LOAD-FOREIGN (x)
  • Method DATABASE-TYPE-LOAD-FOREIGN (database-type)
  • Function RELOAD-DATABASE-TYPES
    Reloads any foreign code for the loaded database types after a dump.
  • Variable *DEFAULT-DATABASE-TYPE*
    nil
    Designates the default database type which is initialised by the function INITIALISE-DATABASE-TYPE.
  • Variable *INITIALIZED-DATABASE-TYPES*
    nil
    A list of database types which have currently been initialised by calling INITIALIZE-DATABASE-TYPE.
  • Function INITIALIZE-DATABASE-TYPE (&key (database-type *default-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*.
  • Variable *CONNECT-IF-EXISTS*
    :error
    Default value for the if-exists keyword argument in calls to CONNECT. Meaningful values are :new, :warn-new, :error, :warn-old and :old.
  • Function CONNECTED-DATABASES
    Returns the list of active database objects.
  • Variable *DEFAULT-DATABASE*
    nil
    Specifies the default database to be used.
  • Function IS-DATABASE-OPEN (database)
  • Function FIND-DATABASE (database &key (errorp t) (db-type nil))
    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.
  • Function CONNECT (connection-spec &key (if-exists *connect-if-exists*) (make-default t) (pool nil) (database-type *default-database-type*) (encoding *default-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.
  • Function DISCONNECT (&key (database *default-database*) (error nil))
    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.
  • 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.
  • Function RECONNECT (&key (database *default-database*) (error nil) (force t))
    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.
  • 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.
  • Function CREATE-DATABASE (connection-spec &key (database-type *default-database-type*))
    This function creates a database in the database system specified by DATABASE-TYPE.
  • Function PROBE-DATABASE (connection-spec &key (database-type *default-database-type*))
    This function tests for the existence of a database in the database system specified by DATABASE-TYPE.
  • Function DESTROY-DATABASE (connection-spec &key (database-type *default-database-type*))
    This function destroys a database in the database system specified by DATABASE-TYPE.
  • Function LIST-DATABASES (connection-spec &key (database-type *default-database-type*))
    This function returns a list of databases existing in the database system specified by DATABASE-TYPE.
  • Function ENCODING (db)
  • Function (setf ENCODING) (encoding db)
  • Macro WITH-DATABASE ((db-var connection-spec &key make-default pool (if-exists *connect-if-exists*) (database-type *default-database-type*) (encoding nil)) &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.
  • Macro WITH-DEFAULT-DATABASE ((database) &rest body)
    Perform BODY with DATABASE bound as *default-database*.
  • Function START-SQL-RECORDING (&key (type :commands) (database *default-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.
  • Function STOP-SQL-RECORDING (&key (type :commands) (database *default-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.
  • Function SQL-RECORDING-P (&key (type :commands) (database *default-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.
  • Function ADD-SQL-STREAM (stream &key (type :commands) (database *default-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.
  • Function DELETE-SQL-STREAM (stream &key (type :commands) (database *default-database*))
    Removes the supplied stream STREAM from the recording broadcast stream for the SQL recording type specified by TYPE on DATABASE which defaults to *DEFAULT-DATABASE*. TYPE must be one of :commands, :results, or :both, defaulting to :commands, depending on whether the stream is to be added for recording SQL commands, results or both.
  • Function LIST-SQL-STREAMS (&key (type :commands) (database *default-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.
  • Function SQL-STREAM (&key (type :commands) (database *default-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.
  • Variable *DB-POOL-MAX-FREE-CONNECTIONS*
    4
    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.
  • Class CONN-POOL
    CONNECTION-SPEC   Accessor: CONNECTION-SPEC
    DATABASE-TYPE   Accessor: POOL-DATABASE-TYPE
    FREE-CONNECTIONS   Accessor: FREE-CONNECTIONS
    ALL-CONNECTIONS   Accessor: ALL-CONNECTIONS
    LOCK   Accessor: CONN-POOL-LOCK
  • Method DATABASE-ACQUIRE-FROM-CONN-POOL (database)
  • Method DATABASE-RELEASE-TO-CONN-POOL (database)
  • Function DISCONNECT-POOLED (&optional clear)
    Disconnects all connections in the pool. When clear, also deletes the pool objects.
  • Class SQL  (%SQL-EXPRESSION)
    A literal SQL expression.
    TEXT
  • Class SQL-IDENT  (%SQL-EXPRESSION)
    An SQL identifer.
    NAME
  • Class SQL-IDENT-ATTRIBUTE  (SQL-IDENT)
    An SQL Attribute identifier.
    QUALIFIER
    TYPE
  • Class SQL-IDENT-TABLE  (SQL-IDENT)
    An SQL table identifier.
    ALIAS
  • Class SQL-RELATIONAL-EXP  (%SQL-EXPRESSION)
    An SQL relational expression.
    OPERATOR
    SUB-EXPRESSIONS
  • Class SQL-UPCASE-LIKE  (SQL-RELATIONAL-EXP)
    An SQL 'like' that upcases its arguments.
    No slots.
  • Class SQL-ASSIGNMENT-EXP  (SQL-RELATIONAL-EXP)
    An SQL Assignment expression.
    No slots.
  • Class SQL-VALUE-EXP  (%SQL-EXPRESSION)
    An SQL value expression.
    MODIFIER
    COMPONENTS
  • Class SQL-TYPECAST-EXP  (SQL-VALUE-EXP)
    An SQL typecast expression.
    No slots.
  • Class SQL-FUNCTION-EXP  (%SQL-EXPRESSION)
    An SQL function expression.
    NAME
    ARGS
  • Class SQL-BETWEEN-EXP  (SQL-FUNCTION-EXP)
    An SQL between expression.
    No slots.
  • Class SQL-QUERY-MODIFIER-EXP  (%SQL-EXPRESSION)
    An SQL query modifier expression.
    MODIFIER
    COMPONENTS
  • Class SQL-SET-EXP  (%SQL-EXPRESSION)
    An SQL set expression.
    OPERATOR
    SUB-EXPRESSIONS
  • Class SQL-QUERY  (%SQL-EXPRESSION)
    An SQL SELECT query.
    SELECTIONS
    ALL
    FLATP
    SET-OPERATION
    DISTINCT
    FROM
    WHERE
    GROUP-BY
    HAVING
    LIMIT
    OFFSET
    ORDER-BY
    INNER-JOIN
    ON
  • Class SQL-OBJECT-QUERY  (%SQL-EXPRESSION)
    OBJECTS
    FLATP
    EXP
    REFRESH
  • Function SQL-QUERY (&rest args)
  • Function SQL-ANY (&rest rest)
  • Function SQL-SOME (&rest rest)
  • Function SQL-ALL (&rest rest)
  • Function SQL-NOT (&rest rest)
  • Function SQL-UNION (&rest rest)
  • Function SQL-INTERSECT (&rest rest)
  • Function SQL-EXCEPT (&rest rest)
  • Function SQL-MINUS (&rest rest)
  • Function SQL-LIMIT (&rest rest)
  • Function SQL-GROUP-BY (&rest rest)
  • Function SQL-ORDER-BY (&rest rest)
  • Function SQL-HAVING (&rest rest)
  • Function SQL-NULL (&optional not-null-thing)
  • Function SQL-NOT-NULL (&optional not-null-thing)
  • Function SQL-EXISTS (&rest rest)
  • Function SQL-* (&rest rest)
  • Function SQL-+ (&rest rest)
  • Function SQL-/ (&rest rest)
  • Function SQL-- (&rest rest)
  • Function SQL-LIKE (&rest rest)
  • Function SQL-UPLIKE (&rest rest)
  • Function SQL-AND (&rest rest)
  • Function SQL-OR (&rest rest)
  • Function SQL-IN (&rest rest)
  • Function SQL-CONCAT-OP (&rest rest)
  • Function SQL-CONCAT (&rest rest)
  • Function SQL-SUBSTR (&rest rest)
  • Function SQL-SUBSTRING (&rest rest)
  • Function SQL-IS (&rest rest)
  • Function SQL-= (&rest rest)
  • Function SQL-== (&rest rest)
  • Function SQL-< (&rest rest)
  • Function SQL-> (&rest rest)
  • Function SQL-<> (&rest rest)
  • Function SQL->= (&rest rest)
  • Function SQL-<= (&rest rest)
  • Function SQL-COUNT (&rest rest)
  • Function SQL-MAX (&rest rest)
  • Function SQL-MIN (&rest rest)
  • Function SQL-AVG (&rest rest)
  • Function SQL-SUM (&rest rest)
  • Function SQL-THE (&rest rest)
  • Function SQL-FUNCTION (&rest args)
  • Function SQL-BETWEEN (&rest rest)
  • Function SQL-DISTINCT (&rest rest)
  • Function SQL-COALESCE (&rest rest)
  • Function SQL-NVL (&rest rest)
  • Function SQL-USERENV (&rest rest)
  • 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.
  • 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.
  • 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.
  • 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.
  • 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
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • Method DATABASE-QUERY-RESULT-SET ((expr %sql-expression) database &key full-set result-types)
  • Method EXECUTE-COMMAND ((sql-expression string) &key (database *default-database*))
  • Method EXECUTE-COMMAND ((expr %sql-expression) &key (database *default-database*))
  • Method QUERY ((query-expression string) &key (database *default-database*) (result-types :auto) (flatp nil) (field-names t))
  • Method QUERY ((expr %sql-expression) &key (database *default-database*) (result-types :auto) (flatp nil) (field-names t))
  • Method QUERY ((expr sql-object-query) &key (database *default-database*) (result-types :auto) (flatp nil) (field-names t))
  • Function PRINT-QUERY (query-exp &key titles (formats t) (sizes t) (stream t) (database *default-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.
  • Function INSERT-RECORDS (&key (into nil) (attributes nil) (values nil) (av-pairs nil) (query nil) (database *default-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.
  • Function DELETE-RECORDS (&key (from nil) (where nil) (database *default-database*))
    Deletes records satisfying the SQL expression WHERE from the table specified by FROM in DATABASE specifies a database which defaults to *DEFAULT-DATABASE*.
  • Function UPDATE-RECORDS (table &key (attributes nil) (values nil) (av-pairs nil) (where nil) (database *default-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.
  • Macro DO-QUERY (((&rest args) query-expression &key (database '*default-database*) (result-types :auto)) &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.
  • Function MAP-QUERY (output-type-spec function query-expression &key (database *default-database*) (result-types :auto))
    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.
  • Function CREATE-LARGE-OBJECT (&key (database *default-database*))
    Creates a new large object in the database and returns the object identifier
  • Function WRITE-LARGE-OBJECT (object-id data &key (database *default-database*))
    Writes data to the large object
  • Function READ-LARGE-OBJECT (object-id &key (database *default-database*))
    Reads the large object content
  • Function DELETE-LARGE-OBJECT (object-id &key (database *default-database*))
    Deletes the large object in the database
  • Function PREPARE-SQL (sql-stmt types &key (database *default-database*) (result-types :auto) 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)
  • Function BIND-PARAMETER (prepared-stmt position value)
    Sets the value of a parameter is in prepared statement.
  • Function RUN-PREPARED-SQL (prepared-stmt)
    Execute the prepared sql statment. All input parameters must be bound.
  • Function FREE-PREPARED-SQL (prepared-stmt)
    Delete the objects associated with a prepared statement.
  • Class TRANSACTION
    COMMIT-HOOKS   Accessor: COMMIT-HOOKS
    ROLLBACK-HOOKS   Accessor: ROLLBACK-HOOKS
    PREVIOUS-AUTOCOMMIT   Reader: PREVIOUS-AUTOCOMMIT
    STATUS   Accessor: TRANSACTION-STATUS
    nil or :committed
  • Function ADD-TRANSACTION-COMMIT-HOOK (commit-hook &key (database *default-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*.
  • Function ADD-TRANSACTION-ROLLBACK-HOOK (rollback-hook &key (database *default-database*))
    Adds ROLLBACK-HOOK, which should a designator for a function with no required arguments, to the list of hooks run when ROLLBACK is called on DATABASE which defaults to *DEFAULT-DATABASE*.
  • Macro WITH-TRANSACTION ((&key (database '*default-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.
  • Function COMMIT (&key (database *default-database*))
    If DATABASE, which defaults to *DEFAULT-DATABASE*, is currently within the scope of a transaction, commits changes made since the transaction began.
  • Function ROLLBACK (&key (database *default-database*))
    If DATABASE, which defaults to *DEFAULT-DATABASE*, is currently within the scope of a transaction, rolls back changes made since the transaction began.
  • Function START-TRANSACTION (&key (database *default-database*))
    Starts a transaction block on DATABASE which defaults to *DEFAULT-DATABASE* and which continues until ROLLBACK or COMMIT are called.
  • Function IN-TRANSACTION-P (&key (database *default-database*))
    A predicate to test whether DATABASE, which defaults to *DEFAULT-DATABASE*, is currently within the scope of a transaction.
  • Function SET-AUTOCOMMIT (value &key (database *default-database*))
    Turns autocommit off for DATABASE if VALUE is NIL, and otherwise turns it on. Returns the old value of autocommit flag. For RDBMS (such as Oracle) which don't automatically commit changes, turning autocommit on has the effect of explicitly committing changes made whenever SQL statements are executed. Autocommit is turned on by default.
  • Function TRUNCATE-DATABASE (&key (database *default-database*))
    Drops all tables, views, indexes and sequences in DATABASE which defaults to *DEFAULT-DATABASE*.
  • Function CREATE-TABLE (name description &key (database *default-database*) (constraints nil) (transactions t))
    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.
  • Function DROP-TABLE (name &key (if-does-not-exist :error) (database *default-database*) (owner nil))
    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.
  • Function LIST-TABLES (&key (owner nil) (database *default-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.
  • Function TABLE-EXISTS-P (name &key (owner nil) (database *default-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.
  • Function CREATE-VIEW (name &key as column-list (with-check-option nil) (database *default-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.
  • Function DROP-VIEW (name &key (if-does-not-exist :error) (database *default-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.
  • Function LIST-VIEWS (&key (owner nil) (database *default-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.
  • Function VIEW-EXISTS-P (name &key (owner nil) (database *default-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.
  • Function CREATE-INDEX (name &key on (unique nil) attributes (database *default-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.
  • Function DROP-INDEX (name &key (if-does-not-exist :error) (on nil) (database *default-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.
  • Function LIST-INDEXES (&key (owner nil) (database *default-database*) (on nil))
    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.
  • Function INDEX-EXISTS-P (name &key (owner nil) (database *default-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.
  • Variable *CACHE-TABLE-QUERIES-DEFAULT*
    nil
    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.
  • Function CACHE-TABLE-QUERIES (table &key (action nil) (database *default-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.
  • Function LIST-ATTRIBUTES (name &key (owner nil) (database *default-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.
  • Function ATTRIBUTE-TYPE (attribute table &key (owner nil) (database *default-database*))
    Returns a keyword representing the vendor-specific field type of the supplied attribute ATTRIBUTE in the table specified by TABLE in DATABASE which defaults to *DEFAULT-DATABASE*. OWNER is nil by default which means that the attribute specified by ATTRIBUTE, if it exists, must be user owned else nil is returned. If OWNER is a string denoting a user name, the attribute, if it exists, must be owned by OWNER else nil is returned, whereas if OWNER is :all then the attribute, if it exists, will be returned regardless of its owner.
  • Function LIST-ATTRIBUTE-TYPES (table &key (owner nil) (database *default-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.
  • Function CREATE-SEQUENCE (name &key (database *default-database*))
    Creates a sequence called NAME in DATABASE which defaults to *DEFAULT-DATABASE*.
  • Function DROP-SEQUENCE (name &key (if-does-not-exist :error) (database *default-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.
  • Function LIST-SEQUENCES (&key (owner nil) (database *default-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.
  • Function SEQUENCE-EXISTS-P (name &key (owner nil) (database *default-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.
  • Function SEQUENCE-NEXT (name &key (database *default-database*))
    Increment and return the next value in the sequence called NAME in DATABASE which defaults to *DEFAULT-DATABASE*.
  • Function SET-SEQUENCE-POSITION (name position &key (database *default-database*))
    Explicitly set the the position of the sequence called NAME in DATABASE, which defaults to *DEFAULT-DATABASE*, to POSITION which is returned.
  • Function SEQUENCE-LAST (name &key (database *default-database*))
    Return the last value allocated in the sequence called NAME in DATABASE which defaults to *DEFAULT-DATABASE*.
  • Class STANDARD-DB-OBJECT
    Superclass for all CLSQL View Classes.
    VIEW-DATABASE   Reader: VIEW-DATABASE
  • Variable *DEFAULT-STRING-LENGTH*
    255
    The length of a string which does not have a user-specified length.
  • Variable *DB-AUTO-SYNC*
    nil
    A non-nil value means that creating View Class instances or setting their slots automatically creates/updates the corresponding records in the underlying database.
  • Function CREATE-VIEW-FROM-CLASS (view-class-name &key (database *default-database*) (transactions t))
    Creates a table as defined by the View Class VIEW-CLASS-NAME in DATABASE which defaults to *DEFAULT-DATABASE*.
  • Function DROP-VIEW-FROM-CLASS (view-class-name &key (database *default-database*) (owner nil))
    Removes a table defined by the View Class VIEW-CLASS-NAME from DATABASE which defaults to *DEFAULT-DATABASE*.
  • Function LIST-CLASSES (&key (test #'identity) (root-class (find-class 'standard-db-object)) (database *default-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.
  • 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.
  • Method VIEW-TABLE ((o class-and-slots))
    get the view-table of the view-class of o
  • Method UPDATE-RECORD-FROM-SLOTS ((obj standard-db-object) slots &key (database *default-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
  • Method UPDATE-RECORD-FROM-SLOT ((obj standard-db-object) slot &key (database *default-database*))
    just call update-records-from-slots which now handles this. This function is only here to maintain backwards compatibility in the public api
  • Method UPDATE-RECORDS-FROM-INSTANCE ((obj standard-db-object) &key (database *default-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
  • 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
  • Method UPDATE-INSTANCE-FROM-RECORDS ((instance standard-db-object) &key (database *default-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?
  • Method UPDATE-SLOT-FROM-RECORD ((instance standard-db-object) slot &key (database *default-database*))
    Pulls the value of a given slot form the database and stores that in the appropriate slot on instance
  • Function SQL-SLOT-VALUE (classname slot &optional (value +no-slot-value+) (database *default-database*))
  • Function SQL-VIEW-CLASS (classname &optional (database *default-database*))
  • Type TINYINT
    An 8-bit integer, this width may vary by SQL implementation.
  • Type SMALLINT
    An integer smaller than a 32-bit integer. this width may vary by SQL implementation.
  • Type MEDIUMINT
    An integer smaller than a 32-bit integer, but may be larger than a smallint. This width may vary by SQL implementation.
  • Type BIGINT
    An integer larger than a 32-bit integer, this width may vary by SQL implementation.
  • Type VARCHAR (&optional size)
    A variable length string for the SQL varchar type.
  • Type UNIVERSAL-TIME
    A positive integer as returned by GET-UNIVERSAL-TIME.
  • Type GENERALIZED-BOOLEAN
    A type which outputs a SQL boolean value, though any lisp type can be stored in the slot.
  • Method DATABASE-GET-TYPE-SPECIFIER ((type string) args database (db-type t))
    Pass through the literal type as defined in the type string
  • Method DATABASE-GET-TYPE-SPECIFIER ((type symbol) args database db-type)
  • Method DATABASE-OUTPUT-SQL-AS-TYPE (type val database db-type &aux (*print-circle* t) (*print-array* t) (*print-length* nil) (*print-base* 10))
  • Method READ-SQL-VALUE (val type database db-type &aux *read-eval* (*read-base* 10))
  • Method READ-SQL-VALUE (val type database db-type)
    read a sql value, from :around read-eval is disabled read numbers in base 10
  • Variable *DEFAULT-UPDATE-OBJECTS-MAX-LEN*
    nil
    The default value to use for the MAX-LEN keyword argument to UPDATE-OBJECT-JOINS.
  • Function UPDATE-OBJECTS-JOINS (objects &key (slots :immediate) (force-p t) class-name (max-len *default-update-objects-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
  • 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
    VIEW-CLASS   Accessor: VIEW-CLASS
    SELECT-LIST   Accessor: SELECT-LIST
    SLOT-LIST   Accessor: SLOT-LIST
    JOINS   Accessor: JOINS
    JOIN-SLOTS   Accessor: JOIN-SLOTS
  • Method VIEW-TABLE ((o select-list))
  • Method INSTANCE-REFRESHED ((instance standard-db-object))
  • Variable *DEFAULT-CACHING*
    t
    Controls whether SELECT caches objects by default. The CommonSQL specification states caching is on by default.
  • 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.
  • 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.
  • Function READ-INSTANCE-FROM-STREAM (stream)
  • Class GENERIC-POSTGRESQL-DATABASE  (DATABASE)
    Encapsulate same behavior across postgresql and postgresql-socket backends.
    HAS-TABLE-PG_ROLES   Reader: HAS-TABLE-PG_ROLES
  • Method DATABASE-GET-TYPE-SPECIFIER ((type symbol) args database (db-type (eql :postgresql)))
    Special database types for POSTGRESQL backends
  • Method DATABASE-LIST-TABLES ((database generic-postgresql-database) &key (owner nil))
  • Method DATABASE-LIST-VIEWS ((database generic-postgresql-database) &key (owner nil))
  • Method DATABASE-LIST-INDEXES ((database generic-postgresql-database) &key (owner nil))
  • Method DATABASE-LIST-TABLE-INDEXES (table (database generic-postgresql-database) &key (owner nil))
  • Method DATABASE-LIST-ATTRIBUTES ((table %database-identifier) (database generic-postgresql-database) &key (owner nil))
  • Method DATABASE-ATTRIBUTE-TYPE ((attribute %database-identifier) (table %database-identifier) (database generic-postgresql-database) &key (owner nil) &aux (table (unescaped-database-identifier table)) (attribute (unescaped-database-identifier attribute)))
  • Method DATABASE-CREATE-SEQUENCE (sequence-name (database generic-postgresql-database))
  • Method DATABASE-DROP-SEQUENCE (sequence-name (database generic-postgresql-database))
  • Method DATABASE-LIST-SEQUENCES ((database generic-postgresql-database) &key (owner nil))
  • Method DATABASE-SET-SEQUENCE-POSITION (name (position integer) (database generic-postgresql-database))
  • Method DATABASE-SEQUENCE-NEXT (sequence-name (database generic-postgresql-database))
  • Method DATABASE-SEQUENCE-LAST (sequence-name (database generic-postgresql-database))
  • Method DATABASE-LAST-AUTO-INCREMENT-ID ((database generic-postgresql-database) table column)
  • Method DATABASE-LIST (connection-spec (type (eql :postgresql)))
  • Method DATABASE-LIST (connection-spec (type (eql :postgresql-socket)))
  • Method DATABASE-PREPARE (sql-stmt types (database generic-postgresql-database) result-types field-names)
  • Method DATABASE-BIND-PARAMETER ((stmt postgresql-stmt) position value)
  • Method DATABASE-RUN-PREPARED ((stmt postgresql-stmt))
  • Class GENERIC-ODBC-DATABASE  (DATABASE)
    Encapsulate same behavior across odbc and aodbc backends.
    DBI-PACKAGE   Reader: DBI-PACKAGE
    ODBC-CONN   Accessor: ODBC-CONN
    DISCONNECT-FN   Reader: DISCONNECT-FN
    SQL-FN   Reader: SQL-FN
    CLOSE-QUERY-FN   Reader: CLOSE-QUERY-FN
    FETCH-ROW   Reader: FETCH-ROW-FN
    LIST-ALL-DATABASE-TABLES-FN   Reader: LIST-ALL-DATABASE-TABLES-FN
    LIST-ALL-TABLE-COLUMNS-FN   Reader: LIST-ALL-TABLE-COLUMNS-FN
    ODBC-DB-TYPE   Accessor: DATABASE-ODBC-DB-TYPE
  • Method DATABASE-GET-TYPE-SPECIFIER ((type symbol) args database (db-type (eql :mssql)))
    Special database types for MSSQL backends
  • Method DB-TYPE-HAS-BOOLEAN-WHERE? ((db-type (eql :mssql)))
  • Method DB-TYPE-HAS-INTERSECT? ((db-type (eql :mssql)))
  • Method DB-TYPE-HAS-EXCEPT? ((db-type (eql :mssql)))
  • Method DATABASE-QUERY (query-expression (database generic-odbc-database) result-types field-names)
  • Method DATABASE-EXECUTE-COMMAND (sql-expression (database generic-odbc-database))
  • Method DATABASE-QUERY-RESULT-SET ((query-expression string) (database generic-odbc-database) &key full-set result-types)
  • Method DATABASE-STORE-NEXT-ROW (result-set (database generic-odbc-database) list)
  • Method DATABASE-LIST-TABLES ((database generic-odbc-database) &key (owner nil))
    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.
  • Method DATABASE-LIST-VIEWS ((database generic-odbc-database) &key (owner nil))
    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.
  • Method DATABASE-LIST-ATTRIBUTES ((table %database-identifier) (database generic-odbc-database) &key (owner nil) &aux (table (unescaped-database-identifier table)))
  • Method DATABASE-ATTRIBUTE-TYPE ((attribute %database-identifier) (table %database-identifier) (database generic-odbc-database) &key (owner nil) &aux (table (unescaped-database-identifier table)) (attribute (unescaped-database-identifier attribute)))
  • Method DATABASE-LAST-AUTO-INCREMENT-ID ((database generic-odbc-database) table column)
  • Variable *OLD-SEQUENCE-NAMES*
    nil
    Should CLSQL use its old sequence naming scheme _CLSQL_SEQ_{table} instead of the current scheme {table}_CLSQL_SEQ
  • Method DATABASE-CREATE-SEQUENCE (sequence-name database)
  • Method DATABASE-DROP-SEQUENCE (sequence-name database)
  • Method DATABASE-LIST-SEQUENCES (database &key (owner nil))
  • Method DATABASE-SEQUENCE-NEXT (sequence-name database)
  • Method DATABASE-SEQUENCE-LAST (sequence-name database)
  • Class COMMAND-OBJECT
    EXPRESSION   Accessor: EXPRESSION
    query that refers to parameters using "$1", "$2", "$n". These match positions in the parameters list.
    PARAMETERS   Accessor: PARAMETERS
    list of parameters
    PREPARED-NAME   Accessor: PREPARED-NAME
    If we want this to be a prepared statement, give it a name to identify it to this session
    HAS-BEEN-PREPARED   Accessor: HAS-BEEN-PREPARED
    Have we already prepared this command object?
  • 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)
  • Method PREPARE-SQL-PARAMETER (sql-parameter)
  • Method PREPARE-SQL-PARAMETER (sql-parameter)
  • Method PREPARE-SQL-PARAMETER (sql-parameter)
  • Method (setf PARAMETERS) (new (o command-object))
    This causes the semantics to match cl-sql instead of cl-postgresql
  • 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)
  • Function COMMAND-OBJECT (expression &optional parameters (prepared-name ""))

Also exports

  • COMMON-LISP:TIME
  • COMMON-LISP:LOOP

CLSQL

This is the user package with CLSQL symbols.
No exported symbols.

Also exports

  • CLSQL-SYS:SQL-ANY
  • CLSQL-SYS:LONGCHAR
  • CLSQL-SYS:SET-SEQUENCE-POSITION
  • CLSQL-SYS:SQL-<=
  • CLSQL-SYS:TIME>=
  • CLSQL-SYS:SQL-EXISTS
  • CLSQL-SYS:SQL--
  • CLSQL-SYS:SQL-CONDITION
  • CLSQL-SYS:TIME-COMPARE
  • CLSQL-SYS:SQL-ERROR-DATABASE-TYPE
  • CLSQL-SYS:TIME-ELEMENT
  • CLSQL-SYS:DATE-MJD
  • CLSQL-SYS:SQL-IS
  • CLSQL-SYS:DATABASE-TYPE
  • CLSQL-SYS:INTERVAL-CLEAR
  • CLSQL-SYS:*FOREIGN-LIBRARY-SEARCH-PATHS*
  • CLSQL-SYS:TIME-P
  • CLSQL-SYS:DATE<=
  • CLSQL-SYS:SQL-COALESCE
  • CLSQL-SYS:RUN-PREPARED-SQL
  • CLSQL-SYS:DISCONNECT
  • CLSQL-SYS:ROLL
  • CLSQL-SYS:TIME-BY-ADDING-DURATION
  • CLSQL-SYS:*DB-AUTO-SYNC*
  • CLSQL-SYS:JOIN-SLOTS
  • CLSQL-SYS:SQL-NULL
  • CLSQL-SYS:LOCALLY-DISABLE-SQL-READER-SYNTAX
  • CLSQL-SYS:SEQUENCE-EXISTS-P
  • CLSQL-SYS:INDEX-EXISTS-P
  • CLSQL-SYS:PARSE-YEARSTRING
  • CLSQL-SYS:SQL-EXCEPT
  • CLSQL-SYS:UPDATE-INSTANCE-FROM-RECORDS
  • CLSQL-SYS:SQL-TEMPORARY-ERROR
  • CLSQL-SYS:SQL-SUBSTR
  • CLSQL-SYS:*DEFAULT-STRING-LENGTH*
  • CLSQL-SYS:INTERVAL-EDIT
  • CLSQL-SYS:SMALLINT
  • CLSQL-SYS:SLOT-LIST
  • CLSQL-SYS:DURATION=
  • CLSQL-SYS:LIST-SEQUENCES
  • CLSQL-SYS:INTERVAL-PUSH
  • CLSQL-SYS:TIMEZONE
  • CLSQL-SYS:SQL-MINUS
  • CLSQL-SYS:DATE-DOW
  • CLSQL-SYS:LIST-ATTRIBUTE-TYPES
  • CLSQL-SYS:INSTANCE-REFRESHED
  • CLSQL-SYS:TIME-MJD
  • CLSQL-SYS:SQL-SUM
  • CLSQL-SYS:DELETE-INSTANCE-RECORDS
  • CLSQL-SYS:SET-AUTOCOMMIT
  • CLSQL-SYS:DROP-VIEW-FROM-CLASS
  • CLSQL-SYS:ROLL-TO
  • CLSQL-SYS:MONTH-NAME
  • CLSQL-SYS:DATABASE-NAME-FROM-SPEC
  • CLSQL-SYS:FILTER-SELECT-LIST
  • CLSQL-SYS:CONNECTED-DATABASES
  • CLSQL-SYS:BIGINT
  • CLSQL-SYS:DECODE-DATE
  • CLSQL-SYS:SQL-INTERSECT
  • CLSQL-SYS:DATE-P
  • CLSQL-SYS:SQL-GROUP-BY
  • CLSQL-SYS:TIME+
  • CLSQL-SYS:TIME-MAX
  • CLSQL-SYS:SQL-OPERATION
  • CLSQL-SYS:TIME-MSEC
  • CLSQL-SYS:DECODE-TIME
  • CLSQL-SYS:GREGORIAN-TO-MJD
  • CLSQL-SYS:TIME-WELL-FORMED
  • CLSQL-SYS:SQL-CONCAT
  • CLSQL-SYS:DECODE-DURATION
  • CLSQL-SYS:SQL-ERROR-CONNECTION-SPEC
  • CLSQL-SYS:WITH-DATABASE
  • CLSQL-SYS:*CACHE-TABLE-QUERIES-DEFAULT*
  • CLSQL-SYS:READ-INSTANCE-FROM-STREAM
  • CLSQL-SYS:RECONNECT
  • CLSQL-SYS:SQL-NVL
  • CLSQL-SYS:PUSH-LIBRARY-PATH
  • CLSQL-SYS:SQL-UNION
  • CLSQL-SYS:DATE
  • CLSQL-SYS:CREATE-DATABASE
  • CLSQL-SYS:SQL-HAVING
  • CLSQL-SYS:WITH-DEFAULT-DATABASE
  • CLSQL-SYS:SQL-<
  • CLSQL-SYS:MAKE-INTERVAL
  • CLSQL-SYS:SQL-CONNECTION-ERROR
  • CLSQL-SYS:PREPARE-SQL
  • CLSQL-SYS:DATE-
  • CLSQL-SYS:GENERALIZED-BOOLEAN
  • CLSQL-SYS:SQL-IN
  • CLSQL-SYS:SQL-DATABASE-DATA-ERROR
  • CLSQL-SYS:PARSE-TIMESTRING
  • CLSQL-SYS:LIST-ATTRIBUTES
  • CLSQL-SYS:MEDIUMINT
  • CLSQL-SYS:DROP-SEQUENCE
  • CLSQL-SYS:MAKE-DATE
  • CLSQL-SYS:SQL-MIN
  • CLSQL-SYS:BIND-PARAMETER
  • CLSQL-SYS:WALL-TIMESTRING
  • CLSQL-SYS:SQL-WARNING
  • CLSQL-SYS:SQL-ERROR-DATABASE
  • CLSQL-SYS:UPDATE-SLOT-FROM-RECORD
  • CLSQL-SYS:SQL-VIEW-CLASS
  • CLSQL-SYS:WEEK-CONTAINING
  • CLSQL-SYS:*INITIALIZED-DATABASE-TYPES*
  • CLSQL-SYS:STATUS
  • CLSQL-SYS:DELETE-RECORDS
  • CLSQL-SYS:SQL-LIMIT
  • CLSQL-SYS:SQL-==
  • CLSQL-SYS:DURATION-REDUCE
  • CLSQL-SYS:TIME-YMD
  • CLSQL-SYS:DURATION-TIMESTRING
  • CLSQL-SYS:VIEW-EXISTS-P
  • CLSQL-SYS:SQL-DISTINCT
  • CLSQL-SYS:DATE=
  • CLSQL-SYS:CURRENT-YEAR
  • CLSQL-SYS:DURATION-SECOND
  • CLSQL-SYS:DURATION>=
  • CLSQL-SYS:FORMAT-DURATION
  • CLSQL-SYS:*DEFAULT-DATABASE-TYPE*
  • CLSQL-SYS:SQL-SUBSTRING
  • CLSQL-SYS:ATTRIBUTE-TYPE
  • CLSQL-SYS:SQL-ERROR-DATABASE-MESSAGE
  • CLSQL-SYS:EXECUTE-COMMAND
  • CLSQL-SYS:MAKE-TIME
  • CLSQL-SYS:DROP-VIEW
  • CLSQL-SYS:TIME-DIFFERENCE
  • CLSQL-SYS:PARSE-DATESTRING
  • CLSQL-SYS:MIDNIGHT
  • CLSQL-SYS:INSERT-RECORDS
  • CLSQL-SYS:SQL-EXPRESSION
  • CLSQL-SYS:DURATION<=
  • CLSQL-SYS:DATE-MIN
  • CLSQL-SYS:CREATE-VIEW
  • CLSQL-SYS:DURATION-HOUR
  • CLSQL-SYS:ROLLBACK
  • CLSQL-SYS:CACHE-TABLE-QUERIES
  • CLSQL-SYS:DATE>=
  • CLSQL-SYS:STOP-SQL-RECORDING
  • CLSQL-SYS:*BACKEND-WARNING-BEHAVIOR*
  • CLSQL-SYS:SQL-LIKE
  • CLSQL-SYS:WRITE-INSTANCE-TO-STREAM
  • CLSQL-SYS:DATE-MAX
  • CLSQL-SYS:LIST-TABLES
  • CLSQL-SYS:CREATE-VIEW-FROM-CLASS
  • CLSQL-SYS:SQL-FUNCTION
  • CLSQL-SYS:DURATION-MINUTE
  • CLSQL-SYS:SQL-WARNING-DATABASE
  • CLSQL-SYS:WITH-TRANSACTION
  • CLSQL-SYS:DURATION-YEAR
  • CLSQL-SYS:DATE-COMPARE
  • CLSQL-SYS:DISABLE-SQL-READER-SYNTAX
  • CLSQL-SYS:LOCALLY-ENABLE-SQL-READER-SYNTAX
  • CLSQL-SYS:SEQUENCE-LAST
  • CLSQL-SYS:PARSE-DATE-TIME
  • CLSQL-SYS:DEF-VIEW-CLASS
  • CLSQL-SYS:PRINT-DATE
  • CLSQL-SYS:SQL-DATABASE-WARNING
  • CLSQL-SYS:TABLE-EXISTS-P
  • CLSQL-SYS:UTIME->TIME
  • CLSQL-SYS:SQL-ERROR-ERROR-ID
  • CLSQL-SYS:UPDATE-RECORDS
  • CLSQL-SYS:SQL-THE
  • CLSQL-SYS:SQL-NOT-NULL
  • CLSQL-SYS:SQL-FATAL-ERROR
  • CLSQL-SYS:INTERVAL-CONTAINED
  • CLSQL-SYS:*DEFAULT-CACHING*
  • CLSQL-SYS:FREE-PREPARED-SQL
  • CLSQL-SYS:COMMIT
  • CLSQL-SYS:SQL-SLOT-VALUE
  • CLSQL-SYS:DATE-YMD
  • CLSQL-SYS:TIME>
  • COMMON-LISP:LOOP
  • CLSQL-SYS:SQL-AVG
  • CLSQL-SYS:DESTROY-DATABASE
  • CLSQL-SYS:START-TRANSACTION
  • CLSQL-SYS:TIME<=
  • CLSQL-SYS:SQL-OR
  • CLSQL-SYS:DATABASE-NAME
  • CLSQL-SYS:DISCONNECT-POOLED
  • CLSQL-SYS:SELECT
  • CLSQL-SYS:*OLD-SEQUENCE-NAMES*
  • CLSQL-SYS:SQL-NOT
  • CLSQL-SYS:SQL-ERROR
  • CLSQL-SYS:LIST-DATABASES
  • CLSQL-SYS:DELETE-SQL-STREAM
  • CLSQL-SYS:ENABLE-SQL-READER-SYNTAX
  • CLSQL-SYS:*DEFAULT-DATABASE*
  • CLSQL-SYS:UPDATE-RECORD-FROM-SLOT
  • CLSQL-SYS:UNIVERSAL-TIME
  • CLSQL-SYS:INITIALIZE-DATABASE-TYPE
  • CLSQL-SYS:UPDATE-RECORDS-FROM-INSTANCE
  • CLSQL-SYS:SQL-TIMEOUT-ERROR
  • CLSQL-SYS:DAY-DURATION
  • CLSQL-SYS:DURATION-MONTH
  • CLSQL-SYS:JOINS
  • CLSQL-SYS:DATE-DIFFERENCE
  • CLSQL-SYS:INTERVAL-TYPE
  • CLSQL-SYS:DURATION+
  • CLSQL-SYS:VARCHAR
  • CLSQL-SYS:TRUNCATE-DATABASE
  • CLSQL-SYS:IN-TRANSACTION-P
  • CLSQL-SYS:DATE<
  • CLSQL-SYS:UPDATE-OBJECTS-JOINS
  • CLSQL-SYS:CURRENT-MONTH
  • COMMON-LISP:TIME
  • CLSQL-SYS:SELECT-LIST
  • CLSQL-SYS:SEQUENCE-NEXT
  • CLSQL-SYS:LIST-VIEWS
  • CLSQL-SYS:DB-DATESTRING
  • CLSQL-SYS:SQL-SOME
  • CLSQL-SYS:SQL-MAX
  • CLSQL-SYS:TIME-SEC
  • CLSQL-SYS:DURATION
  • CLSQL-SYS:SQL-OPERATOR
  • CLSQL-SYS:SQL-UPLIKE
  • CLSQL-SYS:SQL-USER-ERROR-MESSAGE
  • CLSQL-SYS:RESTORE-SQL-READER-SYNTAX-STATE
  • CLSQL-SYS:LIST-SQL-STREAMS
  • CLSQL-SYS:TIME-DOW
  • CLSQL-SYS:DATE+
  • CLSQL-SYS:TIME-
  • CLSQL-SYS:SQL-ALL
  • CLSQL-SYS:TIME<
  • CLSQL-SYS:SQL-<>
  • CLSQL-SYS:MJD-TO-GREGORIAN
  • CLSQL-SYS:FORMAT-DATE
  • CLSQL-SYS:MAP-QUERY
  • CLSQL-SYS:DATE>
  • CLSQL-SYS:CREATE-TABLE
  • CLSQL-SYS:TEXT
  • CLSQL-SYS:DO-QUERY
  • CLSQL-SYS:CURRENT-DAY
  • CLSQL-SYS:MAKE-DURATION
  • CLSQL-SYS:SQL-ERROR-SECONDARY-ERROR-ID
  • CLSQL-SYS:ADD-TRANSACTION-COMMIT-HOOK
  • CLSQL-SYS:SQL
  • CLSQL-SYS:START-SQL-RECORDING
  • CLSQL-SYS:SQL-QUERY
  • CLSQL-SYS:SQL-USER-ERROR
  • CLSQL-SYS:SQL->
  • CLSQL-SYS:LIST-CLASSES
  • CLSQL-SYS:SQL-AND
  • CLSQL-SYS:FILE-ENABLE-SQL-READER-SYNTAX
  • CLSQL-SYS:DURATION<
  • CLSQL-SYS:SQL-COUNT
  • CLSQL-SYS:MERGED-TIME
  • CLSQL-SYS:INTERVAL-DATA
  • CLSQL-SYS:DB-TIMESTRING
  • CLSQL-SYS:*CONNECT-IF-EXISTS*
  • CLSQL-SYS:WALL-TIME
  • CLSQL-SYS:QUERY
  • CLSQL-SYS:VIEW-TABLE
  • CLSQL-SYS:SQL-OBJECT-QUERY
  • CLSQL-SYS:DURATION-DAY
  • CLSQL-SYS:FORMAT-TIME
  • CLSQL-SYS:CONNECT
  • CLSQL-SYS:TIME=
  • CLSQL-SYS:SQL-DATABASE-ERROR
  • CLSQL-SYS:INTERVAL-END
  • CLSQL-SYS:DATABASE
  • CLSQL-SYS:BAD-COMPONENT
  • CLSQL-SYS:ADD-TRANSACTION-ROLLBACK-HOOK
  • CLSQL-SYS:PRINT-QUERY
  • CLSQL-SYS:FIND-DATABASE
  • CLSQL-SYS:DURATION>
  • CLSQL-SYS:ADD-SQL-STREAM
  • CLSQL-SYS:SQL-CONCAT-OP
  • CLSQL-SYS:STANDARD-DB-OBJECT
  • CLSQL-SYS:EXTRACT-ROMAN
  • CLSQL-SYS:ISO-TIMESTRING
  • CLSQL-SYS:SQL-=
  • CLSQL-SYS:TINYINT
  • CLSQL-SYS:SQL-/
  • CLSQL-SYS:DROP-TABLE
  • CLSQL-SYS:SQL-*
  • CLSQL-SYS:SQL-BETWEEN
  • CLSQL-SYS:GET-TIME
  • CLSQL-SYS:UPDATE-RECORD-FROM-SLOTS
  • CLSQL-SYS:DROP-INDEX
  • CLSQL-SYS:CREATE-SEQUENCE
  • CLSQL-SYS:INTERVAL-MATCH
  • CLSQL-SYS:SQL-STREAM
  • CLSQL-SYS:SQL-USERENV
  • CLSQL-SYS:LIST-INDEXES
  • CLSQL-SYS:PROBE-DATABASE
  • CLSQL-SYS:INTERVAL-RELATION
  • CLSQL-SYS:SQL-RECORDING-P
  • CLSQL-SYS:SQL-+
  • CLSQL-SYS:GET-DATE
  • CLSQL-SYS:SQL->=
  • CLSQL-SYS:SQL-ERROR-EXPRESSION
  • CLSQL-SYS:TIME-MIN
  • CLSQL-SYS:DATE-ELEMENT
  • CLSQL-SYS:INTERVAL-START
  • CLSQL-SYS:CREATE-INDEX
  • CLSQL-SYS:*DEFAULT-UPDATE-OBJECTS-MAX-LEN*
  • CLSQL-SYS:SQL-ORDER-BY

CLSQL-USER

This is the user package with CLSQL symbols.
No exported symbols.

Also exports

  • CLSQL-SYS:SQL-ANY
  • CLSQL-SYS:LONGCHAR
  • CLSQL-SYS:SET-SEQUENCE-POSITION
  • CLSQL-SYS:SQL-<=
  • CLSQL-SYS:TIME>=
  • CLSQL-SYS:SQL-EXISTS
  • CLSQL-SYS:SQL--
  • CLSQL-SYS:SQL-CONDITION
  • CLSQL-SYS:TIME-COMPARE
  • CLSQL-SYS:SQL-ERROR-DATABASE-TYPE
  • CLSQL-SYS:TIME-ELEMENT
  • CLSQL-SYS:DATE-MJD
  • CLSQL-SYS:SQL-IS
  • CLSQL-SYS:DATABASE-TYPE
  • CLSQL-SYS:INTERVAL-CLEAR
  • CLSQL-SYS:*FOREIGN-LIBRARY-SEARCH-PATHS*
  • CLSQL-SYS:TIME-P
  • CLSQL-SYS:DATE<=
  • CLSQL-SYS:SQL-COALESCE
  • CLSQL-SYS:RUN-PREPARED-SQL
  • CLSQL-SYS:DISCONNECT
  • CLSQL-SYS:ROLL
  • CLSQL-SYS:TIME-BY-ADDING-DURATION
  • CLSQL-SYS:*DB-AUTO-SYNC*
  • CLSQL-SYS:JOIN-SLOTS
  • CLSQL-SYS:SQL-NULL
  • CLSQL-SYS:LOCALLY-DISABLE-SQL-READER-SYNTAX
  • CLSQL-SYS:SEQUENCE-EXISTS-P
  • CLSQL-SYS:INDEX-EXISTS-P
  • CLSQL-SYS:PARSE-YEARSTRING
  • CLSQL-SYS:SQL-EXCEPT
  • CLSQL-SYS:UPDATE-INSTANCE-FROM-RECORDS
  • CLSQL-SYS:SQL-TEMPORARY-ERROR
  • CLSQL-SYS:SQL-SUBSTR
  • CLSQL-SYS:*DEFAULT-STRING-LENGTH*
  • CLSQL-SYS:INTERVAL-EDIT
  • CLSQL-SYS:SMALLINT
  • CLSQL-SYS:SLOT-LIST
  • CLSQL-SYS:DURATION=
  • CLSQL-SYS:LIST-SEQUENCES
  • CLSQL-SYS:INTERVAL-PUSH
  • CLSQL-SYS:TIMEZONE
  • CLSQL-SYS:SQL-MINUS
  • CLSQL-SYS:DATE-DOW
  • CLSQL-SYS:LIST-ATTRIBUTE-TYPES
  • CLSQL-SYS:INSTANCE-REFRESHED
  • CLSQL-SYS:TIME-MJD
  • CLSQL-SYS:SQL-SUM
  • CLSQL-SYS:DELETE-INSTANCE-RECORDS
  • CLSQL-SYS:SET-AUTOCOMMIT
  • CLSQL-SYS:DROP-VIEW-FROM-CLASS
  • CLSQL-SYS:ROLL-TO
  • CLSQL-SYS:MONTH-NAME
  • CLSQL-SYS:DATABASE-NAME-FROM-SPEC
  • CLSQL-SYS:FILTER-SELECT-LIST
  • CLSQL-SYS:CONNECTED-DATABASES
  • CLSQL-SYS:BIGINT
  • CLSQL-SYS:DECODE-DATE
  • CLSQL-SYS:SQL-INTERSECT
  • CLSQL-SYS:DATE-P
  • CLSQL-SYS:SQL-GROUP-BY
  • CLSQL-SYS:TIME+
  • CLSQL-SYS:TIME-MAX
  • CLSQL-SYS:SQL-OPERATION
  • CLSQL-SYS:TIME-MSEC
  • CLSQL-SYS:DECODE-TIME
  • CLSQL-SYS:GREGORIAN-TO-MJD
  • CLSQL-SYS:TIME-WELL-FORMED
  • CLSQL-SYS:SQL-CONCAT
  • CLSQL-SYS:DECODE-DURATION
  • CLSQL-SYS:SQL-ERROR-CONNECTION-SPEC
  • CLSQL-SYS:WITH-DATABASE
  • CLSQL-SYS:*CACHE-TABLE-QUERIES-DEFAULT*
  • CLSQL-SYS:READ-INSTANCE-FROM-STREAM
  • CLSQL-SYS:RECONNECT
  • CLSQL-SYS:SQL-NVL
  • CLSQL-SYS:PUSH-LIBRARY-PATH
  • CLSQL-SYS:SQL-UNION
  • CLSQL-SYS:DATE
  • CLSQL-SYS:CREATE-DATABASE
  • CLSQL-SYS:SQL-HAVING
  • CLSQL-SYS:WITH-DEFAULT-DATABASE
  • CLSQL-SYS:SQL-<
  • CLSQL-SYS:MAKE-INTERVAL
  • CLSQL-SYS:SQL-CONNECTION-ERROR
  • CLSQL-SYS:PREPARE-SQL
  • CLSQL-SYS:DATE-
  • CLSQL-SYS:GENERALIZED-BOOLEAN
  • CLSQL-SYS:SQL-IN
  • CLSQL-SYS:SQL-DATABASE-DATA-ERROR
  • CLSQL-SYS:PARSE-TIMESTRING
  • CLSQL-SYS:LIST-ATTRIBUTES
  • CLSQL-SYS:MEDIUMINT
  • CLSQL-SYS:DROP-SEQUENCE
  • CLSQL-SYS:MAKE-DATE
  • CLSQL-SYS:SQL-MIN
  • CLSQL-SYS:BIND-PARAMETER
  • CLSQL-SYS:WALL-TIMESTRING
  • CLSQL-SYS:SQL-WARNING
  • CLSQL-SYS:SQL-ERROR-DATABASE
  • CLSQL-SYS:UPDATE-SLOT-FROM-RECORD
  • CLSQL-SYS:SQL-VIEW-CLASS
  • CLSQL-SYS:WEEK-CONTAINING
  • CLSQL-SYS:*INITIALIZED-DATABASE-TYPES*
  • CLSQL-SYS:STATUS
  • CLSQL-SYS:DELETE-RECORDS
  • CLSQL-SYS:SQL-LIMIT
  • CLSQL-SYS:SQL-==
  • CLSQL-SYS:DURATION-REDUCE
  • CLSQL-SYS:TIME-YMD
  • CLSQL-SYS:DURATION-TIMESTRING
  • CLSQL-SYS:VIEW-EXISTS-P
  • CLSQL-SYS:SQL-DISTINCT
  • CLSQL-SYS:DATE=
  • CLSQL-SYS:CURRENT-YEAR
  • CLSQL-SYS:DURATION-SECOND
  • CLSQL-SYS:DURATION>=
  • CLSQL-SYS:FORMAT-DURATION
  • CLSQL-SYS:*DEFAULT-DATABASE-TYPE*
  • CLSQL-SYS:SQL-SUBSTRING
  • CLSQL-SYS:ATTRIBUTE-TYPE
  • CLSQL-SYS:SQL-ERROR-DATABASE-MESSAGE
  • CLSQL-SYS:EXECUTE-COMMAND
  • CLSQL-SYS:MAKE-TIME
  • CLSQL-SYS:DROP-VIEW
  • CLSQL-SYS:TIME-DIFFERENCE
  • CLSQL-SYS:PARSE-DATESTRING
  • CLSQL-SYS:MIDNIGHT
  • CLSQL-SYS:INSERT-RECORDS
  • CLSQL-SYS:SQL-EXPRESSION
  • CLSQL-SYS:DURATION<=
  • CLSQL-SYS:DATE-MIN
  • CLSQL-SYS:CREATE-VIEW
  • CLSQL-SYS:DURATION-HOUR
  • CLSQL-SYS:ROLLBACK
  • CLSQL-SYS:CACHE-TABLE-QUERIES
  • CLSQL-SYS:DATE>=
  • CLSQL-SYS:STOP-SQL-RECORDING
  • CLSQL-SYS:*BACKEND-WARNING-BEHAVIOR*
  • CLSQL-SYS:SQL-LIKE
  • CLSQL-SYS:WRITE-INSTANCE-TO-STREAM
  • CLSQL-SYS:DATE-MAX
  • CLSQL-SYS:LIST-TABLES
  • CLSQL-SYS:CREATE-VIEW-FROM-CLASS
  • CLSQL-SYS:SQL-FUNCTION
  • CLSQL-SYS:DURATION-MINUTE
  • CLSQL-SYS:SQL-WARNING-DATABASE
  • CLSQL-SYS:WITH-TRANSACTION
  • CLSQL-SYS:DURATION-YEAR
  • CLSQL-SYS:DATE-COMPARE
  • CLSQL-SYS:DISABLE-SQL-READER-SYNTAX
  • CLSQL-SYS:LOCALLY-ENABLE-SQL-READER-SYNTAX
  • CLSQL-SYS:SEQUENCE-LAST
  • CLSQL-SYS:PARSE-DATE-TIME
  • CLSQL-SYS:DEF-VIEW-CLASS
  • CLSQL-SYS:PRINT-DATE
  • CLSQL-SYS:SQL-DATABASE-WARNING
  • CLSQL-SYS:TABLE-EXISTS-P
  • CLSQL-SYS:UTIME->TIME
  • CLSQL-SYS:SQL-ERROR-ERROR-ID
  • CLSQL-SYS:UPDATE-RECORDS
  • CLSQL-SYS:SQL-THE
  • CLSQL-SYS:SQL-NOT-NULL
  • CLSQL-SYS:SQL-FATAL-ERROR
  • CLSQL-SYS:INTERVAL-CONTAINED
  • CLSQL-SYS:*DEFAULT-CACHING*
  • CLSQL-SYS:FREE-PREPARED-SQL
  • CLSQL-SYS:COMMIT
  • CLSQL-SYS:SQL-SLOT-VALUE
  • CLSQL-SYS:DATE-YMD
  • CLSQL-SYS:TIME>
  • COMMON-LISP:LOOP
  • CLSQL-SYS:SQL-AVG
  • CLSQL-SYS:DESTROY-DATABASE
  • CLSQL-SYS:START-TRANSACTION
  • CLSQL-SYS:TIME<=
  • CLSQL-SYS:SQL-OR
  • CLSQL-SYS:DATABASE-NAME
  • CLSQL-SYS:DISCONNECT-POOLED
  • CLSQL-SYS:SELECT
  • CLSQL-SYS:*OLD-SEQUENCE-NAMES*
  • CLSQL-SYS:SQL-NOT
  • CLSQL-SYS:SQL-ERROR
  • CLSQL-SYS:LIST-DATABASES
  • CLSQL-SYS:DELETE-SQL-STREAM
  • CLSQL-SYS:ENABLE-SQL-READER-SYNTAX
  • CLSQL-SYS:*DEFAULT-DATABASE*
  • CLSQL-SYS:UPDATE-RECORD-FROM-SLOT
  • CLSQL-SYS:UNIVERSAL-TIME
  • CLSQL-SYS:INITIALIZE-DATABASE-TYPE
  • CLSQL-SYS:UPDATE-RECORDS-FROM-INSTANCE
  • CLSQL-SYS:SQL-TIMEOUT-ERROR
  • CLSQL-SYS:DAY-DURATION
  • CLSQL-SYS:DURATION-MONTH
  • CLSQL-SYS:JOINS
  • CLSQL-SYS:DATE-DIFFERENCE
  • CLSQL-SYS:INTERVAL-TYPE
  • CLSQL-SYS:DURATION+
  • CLSQL-SYS:VARCHAR
  • CLSQL-SYS:TRUNCATE-DATABASE
  • CLSQL-SYS:IN-TRANSACTION-P
  • CLSQL-SYS:DATE<
  • CLSQL-SYS:UPDATE-OBJECTS-JOINS
  • CLSQL-SYS:CURRENT-MONTH
  • COMMON-LISP:TIME
  • CLSQL-SYS:SELECT-LIST
  • CLSQL-SYS:SEQUENCE-NEXT
  • CLSQL-SYS:LIST-VIEWS
  • CLSQL-SYS:DB-DATESTRING
  • CLSQL-SYS:SQL-SOME
  • CLSQL-SYS:SQL-MAX
  • CLSQL-SYS:TIME-SEC
  • CLSQL-SYS:DURATION
  • CLSQL-SYS:SQL-OPERATOR
  • CLSQL-SYS:SQL-UPLIKE
  • CLSQL-SYS:SQL-USER-ERROR-MESSAGE
  • CLSQL-SYS:RESTORE-SQL-READER-SYNTAX-STATE
  • CLSQL-SYS:LIST-SQL-STREAMS
  • CLSQL-SYS:TIME-DOW
  • CLSQL-SYS:DATE+
  • CLSQL-SYS:TIME-
  • CLSQL-SYS:SQL-ALL
  • CLSQL-SYS:TIME<
  • CLSQL-SYS:SQL-<>
  • CLSQL-SYS:MJD-TO-GREGORIAN
  • CLSQL-SYS:FORMAT-DATE
  • CLSQL-SYS:MAP-QUERY
  • CLSQL-SYS:DATE>
  • CLSQL-SYS:CREATE-TABLE
  • CLSQL-SYS:TEXT
  • CLSQL-SYS:DO-QUERY
  • CLSQL-SYS:CURRENT-DAY
  • CLSQL-SYS:MAKE-DURATION
  • CLSQL-SYS:SQL-ERROR-SECONDARY-ERROR-ID
  • CLSQL-SYS:ADD-TRANSACTION-COMMIT-HOOK
  • CLSQL-SYS:SQL
  • CLSQL-SYS:START-SQL-RECORDING
  • CLSQL-SYS:SQL-QUERY
  • CLSQL-SYS:SQL-USER-ERROR
  • CLSQL-SYS:SQL->
  • CLSQL-SYS:LIST-CLASSES
  • CLSQL-SYS:SQL-AND
  • CLSQL-SYS:FILE-ENABLE-SQL-READER-SYNTAX
  • CLSQL-SYS:DURATION<
  • CLSQL-SYS:SQL-COUNT
  • CLSQL-SYS:MERGED-TIME
  • CLSQL-SYS:INTERVAL-DATA
  • CLSQL-SYS:DB-TIMESTRING
  • CLSQL-SYS:*CONNECT-IF-EXISTS*
  • CLSQL-SYS:WALL-TIME
  • CLSQL-SYS:QUERY
  • CLSQL-SYS:VIEW-TABLE
  • CLSQL-SYS:SQL-OBJECT-QUERY
  • CLSQL-SYS:DURATION-DAY
  • CLSQL-SYS:FORMAT-TIME
  • CLSQL-SYS:CONNECT
  • CLSQL-SYS:TIME=
  • CLSQL-SYS:SQL-DATABASE-ERROR
  • CLSQL-SYS:INTERVAL-END
  • CLSQL-SYS:DATABASE
  • CLSQL-SYS:BAD-COMPONENT
  • CLSQL-SYS:ADD-TRANSACTION-ROLLBACK-HOOK
  • CLSQL-SYS:PRINT-QUERY
  • CLSQL-SYS:FIND-DATABASE
  • CLSQL-SYS:DURATION>
  • CLSQL-SYS:ADD-SQL-STREAM
  • CLSQL-SYS:SQL-CONCAT-OP
  • CLSQL-SYS:STANDARD-DB-OBJECT
  • CLSQL-SYS:EXTRACT-ROMAN
  • CLSQL-SYS:ISO-TIMESTRING
  • CLSQL-SYS:SQL-=
  • CLSQL-SYS:TINYINT
  • CLSQL-SYS:SQL-/
  • CLSQL-SYS:DROP-TABLE
  • CLSQL-SYS:SQL-*
  • CLSQL-SYS:SQL-BETWEEN
  • CLSQL-SYS:GET-TIME
  • CLSQL-SYS:UPDATE-RECORD-FROM-SLOTS
  • CLSQL-SYS:DROP-INDEX
  • CLSQL-SYS:CREATE-SEQUENCE
  • CLSQL-SYS:INTERVAL-MATCH
  • CLSQL-SYS:SQL-STREAM
  • CLSQL-SYS:SQL-USERENV
  • CLSQL-SYS:LIST-INDEXES
  • CLSQL-SYS:PROBE-DATABASE
  • CLSQL-SYS:INTERVAL-RELATION
  • CLSQL-SYS:SQL-RECORDING-P
  • CLSQL-SYS:SQL-+
  • CLSQL-SYS:GET-DATE
  • CLSQL-SYS:SQL->=
  • CLSQL-SYS:SQL-ERROR-EXPRESSION
  • CLSQL-SYS:TIME-MIN
  • CLSQL-SYS:DATE-ELEMENT
  • CLSQL-SYS:INTERVAL-START
  • CLSQL-SYS:CREATE-INDEX
  • CLSQL-SYS:*DEFAULT-UPDATE-OBJECTS-MAX-LEN*
  • CLSQL-SYS:SQL-ORDER-BY

DECIMALS

  • Function ROUND-HALF-AWAY-FROM-ZERO (number &optional (divisor 1))
    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
  • Function FORMAT-DECIMAL-NUMBER (number &key (round-magnitude 0) (rounder #'round-half-away-from-zero) (decimal-separator #\.) (integer-group-separator nil) (integer-group-digits 3) (integer-minimum-width 0) (integer-pad-char #\ ) (fractional-group-separator nil) (fractional-group-digits 3) (fractional-minimum-width 0) (fractional-pad-char #\ ) (show-trailing-zeros nil) (positive-sign nil) (negative-sign #\-) (zero-sign nil))
    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.
  • 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 "
  • Condition DECIMAL-PARSE-ERROR  (PARSE-ERROR)
    Function `parse-decimal-number` signals this condition when it couldn't parse a decimal number from string.
  • Function PARSE-DECIMAL-NUMBER (string &key (decimal-separator #\.) (positive-sign #\+) (negative-sign #\-) (start 0) (end nil))
    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

ANSI-LOOP

No exported symbols.

clsql-aodbc

No packages.

clsql-cffi

CLSQL using CFFI-UFFI-COMPAT interface

No packages.

clsql-mysql

Common Lisp SQL MySQL Driver

MYSQL

This is the low-level interface MySQL.
  • Function MYSQL-GET-CLIENT-INFO
  • Variable MYSQL-NET-TYPE#TCP-IP
    0
  • Variable MYSQL-NET-TYPE#SOCKET
    1
  • Variable MYSQL-NET-TYPE#NAMED-PIPE
    2
  • Variable MYSQL-FIELD-TYPES#DECIMAL
    0
  • Variable MYSQL-FIELD-TYPES#TINY
    1
  • Variable MYSQL-FIELD-TYPES#SHORT
    2
  • Variable MYSQL-FIELD-TYPES#LONG
    3
  • Variable MYSQL-FIELD-TYPES#FLOAT
    4
  • Variable MYSQL-FIELD-TYPES#DOUBLE
    5
  • Variable MYSQL-FIELD-TYPES#NULL
    6
  • Variable MYSQL-FIELD-TYPES#TIMESTAMP
    7
  • Variable MYSQL-FIELD-TYPES#LONGLONG
    8
  • Variable MYSQL-FIELD-TYPES#INT24
    9
  • Variable MYSQL-FIELD-TYPES#DATE
    10
  • Variable MYSQL-FIELD-TYPES#TIME
    11
  • Variable MYSQL-FIELD-TYPES#DATETIME
    12
  • Variable MYSQL-FIELD-TYPES#YEAR
    13
  • Variable MYSQL-FIELD-TYPES#NEWDATE
    14
  • Variable MYSQL-FIELD-TYPES#ENUM
    247
  • Variable MYSQL-FIELD-TYPES#TINY-BLOB
    249
  • Variable MYSQL-FIELD-TYPES#MEDIUM-BLOB
    250
  • Variable MYSQL-FIELD-TYPES#LONG-BLOB
    251
  • Variable MYSQL-FIELD-TYPES#BLOB
    252
  • Variable MYSQL-FIELD-TYPES#VAR-STRING
    253
  • Variable MYSQL-FIELD-TYPES#STRING
    254
  • Variable +MYSQL-OPTION-PARAMETER-MAP+
    '((:connect-timeout . :uint-ptr) (:compress . :none) (:named-pipe . :none)
      (:init-command . :char-ptr) (:read-default-file . :char-ptr)
      (:read-default-group . :char-ptr) (:set-charset-dir . :char-ptr)
      (:set-charset-name . :char-ptr) (:local-infile . :uint-ptr)
      (:protocol . :uint-ptr) (:shared-memory-base-name . :char-ptr)
      (:read-timeout . :uint-ptr) (:write-timeout . :uint-ptr)
      (:use-result . :none) (:use-remote-connection . :none)
      (:use-embedded-connection . :none) (:guess-connection . :none)
      (:set-client-ip . :char-ptr) (:secure-auth . :boolean-ptr)
      (:report-data-truncation . :boolean-ptr) (:reconnect . :boolean-ptr)
      (:ssl-verify-server-cert . :boolean-ptr))
  • Variable MYSQL-STATUS#READY
    0
  • Variable MYSQL-STATUS#USE-RESULT
    2
  • Function MYSQL-INIT (mysql)
  • Function MYSQL-REAL-CONNECT (mysql host user passwd db port unix-socket clientflag)
  • Function MYSQL-CLOSE (sock)
  • Function MYSQL-SELECT-DB (mysql db)
  • Function MYSQL-QUERY (mysql query)
  • Function MYSQL-REAL-QUERY (mysql query length)
  • Function MYSQL-SHUTDOWN (mysql)
  • Function MYSQL-DUMP-DEBUG-INFO (mysql)
  • Function MYSQL-REFRESH (mysql refresh-options)
  • Function MYSQL-KILL (mysql pid)
  • Function MYSQL-PING (mysql)
  • Function MYSQL-STAT (mysql)
  • Function MYSQL-GET-SERVER-INFO (mysql)
  • Function MYSQL-GET-HOST-INFO (mysql)
  • Function MYSQL-GET-PROTO-INFO (mysql)
  • Function MYSQL-LIST-DBS (mysql wild)
  • Function MYSQL-LIST-TABLES (mysql wild)
  • Function MYSQL-LIST-FIELDS (mysql table wild)
  • Function MYSQL-LIST-PROCESSES (mysql)
  • Function MYSQL-STORE-RESULT (mysql)
  • Function MYSQL-USE-RESULT (mysql)
  • Function MYSQL-OPTIONS (mysql option arg)
  • Function MYSQL-FREE-RESULT (res)
  • Function MYSQL-NEXT-RESULT (mysql)
  • Function MYSQL-FETCH-ROW (res)
  • Function MYSQL-FETCH-LENGTHS (res)
  • Function MYSQL-FETCH-FIELD (res)
  • Function MYSQL-FIELD-SEEK (res offset)
  • Function MYSQL-FETCH-FIELDS (res)
  • Function MYSQL-FETCH-FIELD-DIRECT (res field-num)
  • Function MYSQL-ESCAPE-STRING (to from length)
  • Function MYSQL-DEBUG (debug)
  • Function MYSQL-STMT-INIT (res)
  • Function MYSQL-STMT-PREPARE (stmt query length)
  • Function MYSQL-STMT-PARAM-COUNT (stmt)
  • Function MYSQL-STMT-BIND-PARAM (stmt bind)
  • Function MYSQL-STMT-BIND-RESULT (stmt bind)
  • Function MYSQL-STMT-RESULT-METADATA (stmt)
  • Function MYSQL-STMT-EXECUTE (stmt)
  • Function MYSQL-STMT-STORE-RESULT (stmt)
  • Function MYSQL-STMT-FETCH (stmt)
  • Function MYSQL-STMT-FREE-RESULT (stmt)
  • Function MYSQL-STMT-CLOSE (stmt)
  • Function MYSQL-STMT-ERRNO (stmt)
  • Function MYSQL-STMT-ERROR (stmt)
  • Function MYSQL-NUM-ROWS (res)
  • Function MYSQL-AFFECTED-ROWS (mysql)
  • Function MYSQL-INSERT-ID (mysql)
  • Function MYSQL-NUM-FIELDS (res)
  • Function MYSQL-EOF (res)
  • Function MYSQL-ERROR (mysql)
  • Function MYSQL-ERROR-STRING (mysql)
  • Function MYSQL-ERRNO (mysql)
  • Function MYSQL-INFO (mysql)
  • Function MYSQL-INFO-STRING (mysql)
  • Function CLSQL-MYSQL-FIELD-NAME (res)
  • Function CLSQL-MYSQL-FIELD-FLAGS (res)
  • Function CLSQL-MYSQL-FIELD-TYPE (res)
  • Function MYSQL-DATA-SEEK (res offset)
  • Class MYSQL-STMT
    DATABASE   Reader: DATABASE
    STMT   Accessor: STMT
    INPUT-BIND   Reader: INPUT-BIND
    OUTPUT-BIND   Reader: OUTPUT-BIND
    TYPES   Reader: TYPES
    RESULT-SET   Reader: RESULT-SET
    NUM-FIELDS   Reader: NUM-FIELDS
    FIELD-NAMES   Accessor: STMT-FIELD-NAMES
    LENGTH-PTR   Reader: LENGTH-PTR
    IS-NULL-PTR   Reader: IS-NULL-PTR
    RESULT-TYPES   Reader: RESULT-TYPES

Also exports

  • CLSQL-UFFI:MAKE-64-BIT-INTEGER

CLSQL-MYSQL

This is the CLSQL interface to MySQL.
  • Class MYSQL-DATABASE  (DATABASE)
    MYSQL-PTR   Accessor: DATABASE-MYSQL-PTR
    SERVER-INFO   Accessor: DATABASE-SERVER-INFO

clsql-odbc

Common Lisp SQL ODBC Driver

ODBC

This is the low-level interface ODBC.
  • Function SQLFETCH (hstmt)
  • Variable *NULL*
    nil
    Lisp representation of SQL Null value, default = nil. May be locally bound to something else if a certain type is necessary.
  • Variable *TIME-FORMAT*
    (lambda (time) (clsql-sys:format-time nil time :format :iso))
    Bound to a function that converts from a clsql:wall-time to the desired representation of date/time/timestamp. By default, returns an iso-timestring.
  • Variable +NULL-PTR+
    (uffi:make-null-pointer :byte)
  • Variable *INFO-OUTPUT*
    nil
    Stream to send SUCCESS_WITH_INFO messages.
  • Macro %PUT-STR (ptr string &optional max-length)
  • Function %NEW-ENVIRONMENT-HANDLE
  • Function %SQL-FREE-ENVIRONMENT (henv)
  • Function %NEW-DB-CONNECTION-HANDLE (henv)
  • Function %FREE-STATEMENT (hstmt option)
  • Function %SQL-CONNECT (hdbc server uid pwd)
  • Function %SQL-DRIVER-CONNECT (hdbc connection-string completion window-handle)
  • Function %DISCONNECT (hdbc)
  • Function %COMMIT (henv hdbc)
  • Function %ROLLBACK (henv hdbc)
  • Function %BIND-COLUMN (hstmt column-nr c-type data-ptr precision out-len-ptr)
  • Function %SQL-BIND-PARAMETER (hstmt parameter-nr parameter-type c-type sql-type precision scale data-ptr max-value out-len-ptr)
  • Function %SQL-FETCH (hstmt)
  • Function %NEW-STATEMENT-HANDLE (hdbc)
  • Function %SQL-GET-INFO (hdbc info-type)
  • Function %SQL-EXEC-DIRECT (sql hstmt henv hdbc)
  • Function %SQL-CANCEL (hstmt)
  • Function %SQL-EXECUTE (hstmt)
  • Function RESULT-COLUMNS-COUNT (hstmt)
  • Function RESULT-ROWS-COUNT (hstmt)
  • Function %DESCRIBE-COLUMN (hstmt column-nr)
  • Function %DESCRIBE-COLUMNS (hdbc table-qualifier table-owner table-name column-name)
  • Function %SQL-DATA-SOURCES (henv &key (direction :first))
  • Function SQL-TO-C-TYPE (sql-type)
  • Function GET-CAST-LONG (ptr)
  • Function READ-DATA (data-ptr c-type sql-type out-len-ptr result-type)
  • Variable +MAX-PRECISION+
    4001
  • Function %ALLOCATE-BINDINGS (sql-type precision)
  • Function %SQL-PREPARE (hstmt sql)
  • Function DISABLE-AUTOCOMMIT (hdbc)
  • Function ENABLE-AUTOCOMMIT (hdbc)
  • Function %SQL-PARAM-DATA (hstmt param-ptr)
  • Function READ-DATA-IN-CHUNKS (hstmt column-nr data-ptr c-type sql-type out-len-ptr result-type)
  • Function %LIST-TABLES (hstmt)
  • Function %TABLE-STATISTICS (table hstmt &key unique (ensure t) &aux (table (princ-to-string (clsql-sys::unescaped-database-identifier table))))
  • Function %LIST-DATA-SOURCES (henv)

ODBC-DBI

This is the mid-level interface ODBC.
  • Function CONNECT (&key data-source-name user password connection-string completion window-handle (autocommit t))
  • Function DISCONNECT (database)
    This is set in the generic-odbc-database disconnect-fn slot so xref fails but this does get called on generic ODBC connections
  • Function SQL (expr &key db result-types row-count (column-names t) query hstmt width)
  • Function FETCH-ROW (query &optional (eof-errorp t) eof-value)
  • Function CLOSE-QUERY (query)
  • Function LIST-ALL-DATABASE-TABLES (&key db hstmt)
  • Function LIST-TABLE-INDEXES (table &key db unique hstmt &aux (table (princ-to-string (clsql-sys::unescaped-database-identifier table))))
  • Function LIST-ALL-TABLE-COLUMNS (table &key db hstmt &aux (table (princ-to-string (clsql-sys::unescaped-database-identifier table))))
  • Function LIST-ALL-DATA-SOURCES
  • Function RR-SQL (hstmt sql-statement &key db)

CLSQL-ODBC

This is the CLSQL interface to ODBC.
  • Class ODBC-DATABASE  (GENERIC-ODBC-DATABASE)
    No slots.

clsql-postgresql

No packages.

clsql-postgresql-socket

Common Lisp SQL PostgreSQL Socket Driver

POSTGRESQL-SOCKET

  • Variable PGSQL-FTYPE#BYTEA
    17
  • Variable PGSQL-FTYPE#INT2
    21
  • Variable PGSQL-FTYPE#INT4
    23
  • Variable PGSQL-FTYPE#INT8
    20
  • Variable PGSQL-FTYPE#FLOAT4
    700
  • Variable PGSQL-FTYPE#FLOAT8
    701
  • Condition POSTGRESQL-CONDITION  (CONDITION)
  • Condition POSTGRESQL-ERROR  (ERROR, POSTGRESQL-CONDITION)
  • Condition POSTGRESQL-FATAL-ERROR  (POSTGRESQL-ERROR)
  • Condition POSTGRESQL-LOGIN-ERROR  (POSTGRESQL-FATAL-ERROR)
  • Condition POSTGRESQL-WARNING  (WARNING, POSTGRESQL-CONDITION)
  • Condition POSTGRESQL-NOTIFICATION  (POSTGRESQL-CONDITION)
  • Struct POSTGRESQL-CONNECTION
    HOST
    PORT
    DATABASE
    USER
    PASSWORD
    OPTIONS
    TTY
    SOCKET
    PID
    KEY
  • Function POSTGRESQL-CONNECTION-P (object)
  • Struct POSTGRESQL-CURSOR
    CONNECTION
    NAME
    FIELDS
  • Function POSTGRESQL-CURSOR-P (object)
  • Function POSTGRESQL-CURSOR-CONNECTION (instance)
  • Function (setf POSTGRESQL-CURSOR-CONNECTION) (value instance)
  • Function POSTGRESQL-CURSOR-NAME (instance)
  • Function (setf POSTGRESQL-CURSOR-NAME) (value instance)
  • Function POSTGRESQL-CURSOR-FIELDS (instance)
  • Function (setf POSTGRESQL-CURSOR-FIELDS) (value instance)
  • Variable +POSTGRESQL-SERVER-DEFAULT-PORT+
    5432
    Default port of PostgreSQL server.
  • Function OPEN-POSTGRESQL-CONNECTION (&key (host (cmucl-compat:required-argument)) (port +postgresql-server-default-port+) (database (cmucl-compat:required-argument)) (user (cmucl-compat:required-argument)) options tty password)
    Open a connection to a PostgreSQL server with the given parameters. Note that host, database and user arguments must be supplied. If host is a pathname, it is assumed to name a directory containing the local unix-domain sockets of the server, with port selecting which of those sockets to open. If host is a string, it is assumed to be the name of the host running the PostgreSQL server. In that case a TCP connection to the given port on that host is opened in order to communicate with the server. In either case the port argument defaults to `+postgresql-server-default-port+'. Password is the clear-text password to be passed in the authentication phase to the server. Depending on the server set-up, it is either passed in the clear, or encrypted via crypt and a server-supplied salt. In that case the alien function specified by `*crypt-library*' and `*crypt-function-name*' is used for encryption. Note that all the arguments (including the clear-text password argument) are stored in the `postgresql-connection' structure, in order to facilitate automatic reconnection in case of communication troubles.
  • Function REOPEN-POSTGRESQL-CONNECTION (connection)
    Reopen the given PostgreSQL connection. Closes any existing connection, if it is still open.
  • Function CLOSE-POSTGRESQL-CONNECTION (connection &optional abort)
  • Function POSTGRESQL-CONNECTION-OPEN-P (connection)
  • Function ENSURE-OPEN-POSTGRESQL-CONNECTION (connection)
  • Function START-QUERY-EXECUTION (connection query)
  • Function WAIT-FOR-QUERY-RESULTS (connection)
  • Function READ-CURSOR-ROW (cursor types)
  • Function COPY-CURSOR-ROW (cursor sequence types)
  • Function SKIP-CURSOR-ROW (cursor)

CLSQL-POSTGRESQL-SOCKET

This is the CLSQL socket interface to PostgreSQL.
  • Class POSTGRESQL-SOCKET-DATABASE  (GENERIC-POSTGRESQL-DATABASE)
    CONNECTION   Accessor: DATABASE-CONNECTION

clsql-postgresql-socket3

No packages.

clsql-sqlite

No packages.

clsql-sqlite3

Common Lisp Sqlite3 Driver

CLSQL-SQLITE3

  • Class SQLITE3-DATABASE  (DATABASE)
    SQLITE3-DB   Accessor: SQLITE3-DB

SQLITE3

  • Variable SQLITE-INTEGER
    1
  • Variable SQLITE-FLOAT
    2
  • Variable SQLITE-TEXT
    3
  • Variable SQLITE-BLOB
    4
  • Variable SQLITE-NULL
    5
  • Type SQLITE3-DB-TYPE
  • Type SQLITE3-STMT-TYPE
  • Type UNSIGNED-CHAR-PTR-TYPE
  • Variable NULL-STMT
    (uffi:make-null-pointer :void)
  • Condition SQLITE3-ERROR
  • Function SQLITE3-COLUMN-COUNT (stmt)
  • Function SQLITE3-COLUMN-TYPE (stmt n-col)
  • Function SQLITE3-COLUMN-TEXT (stmt n-col)
  • Function SQLITE3-COLUMN-BYTES (stmt n-col)
  • Function SQLITE3-COLUMN-BLOB (stmt n-col)
  • Function SQLITE3-OPEN (db &optional (mode 0) &aux (db-name (etypecase db (pathname (namestring db)) (string db))))
  • Function SQLITE3-CLOSE (db)
  • Function SQLITE3-PREPARE (db sql)
  • Function SQLITE3-STEP (stmt)
  • Function SQLITE3-FINALIZE (stmt)
  • Function SQLITE3-COLUMN-NAME (stmt n)

clsql-tests

A regression test suite for CLSQL.

CLSQL-TESTS

Regression tests for CLSQL.
  • Function SUMMARIZE-TEST-REPORT (sexp &optional (output *standard-output*))
  • Function TEST-CONNECT (&key (db-type *test-database-type* db-type-p) position pool spec)
  • Function TEST-SETUP-DATABASE (db-type &key (spec (find-test-connection-spec db-type)))
  • Function RUN-TESTS-APPEND-REPORT-FILE (report-file)
  • Function RUN-TESTS (&key (report-stream *standard-output*) (sexp-report-stream nil) (suites (append (internal-suites) (default-suites))))
  • Function RUN-BENCHMARKS-APPEND-REPORT-FILE (report-file)
  • Function RUN-BENCHMARKS (&key (report-stream *standard-output*) (sexp-report-stream nil) (count 10000))

clsql-uffi

Common UFFI Helper functions for Common Lisp SQL Interface Library

CLSQL-UFFI

Common functions for interfaces using UFFI
  • Function FIND-AND-LOAD-FOREIGN-LIBRARY (filenames &key module supporting-libraries (errorp t))
    Attempt to load a foreign library. This will search for any of the filenames, as well as any of the filenames in any of the clsql:*foreign-library-search-paths*
  • Function CANONICALIZE-TYPE-LIST (types auto-list)
    Ensure a field type list meets expectations
  • Function ATOI (str)
  • Function ATOL (str)
  • Function ATOF (str)
  • Macro MAKE-64-BIT-INTEGER (high32 low32)
  • Macro MAKE-128-BIT-INTEGER (a b c d)
  • Macro SPLIT-64-BIT-INTEGER (int64)
  • Function CONVERT-RAW-FIELD (char-ptr type &key length encoding)