postmodern

API Reference

cl-postgres

No packages.

postmodern

No packages.

s-sql

S-SQL

  • Condition SQL-ERROR  (SIMPLE-ERROR)
  • Function SQL-ERROR (control &rest args)
  • Variable *ESCAPE-SQL-NAMES-P*
    :auto
    Setting this to T will make S-SQL add double quotes around identifiers in queries. Setting it :auto will turn on this behaviour only for reserved words.
  • Variable *DOWNCASE-SYMBOLS*
    t
  • Function TO-SQL-NAME (name &optional (escape-p *escape-sql-names-p*))
    Convert a symbol or string into a name that can be a sql table, column, or operation name. Add quotes when escape-p is true, or escape-p is :auto and the name contains reserved words. Quoted or delimited identifiers can be used by passing :literal as the value of escape-p. If escape-p is :literal, and the name is a string then the string is still escaped but the symbol or string is not downcased, regardless of the setting for *downcase-symbols* and the hyphen and forward slash characters are not replaced with underscores.
  • Function FROM-SQL-NAME (str)
    Convert a string to something that might have been its original lisp name. Does not work if this name contains non-alphanumeric characters other than #-
  • Type SMALLINT
  • Type BIGINT
  • Type NUMERIC (&optional precision/scale scale)
  • Type DOUBLE-PRECISION
  • Type BYTEA
  • Type TEXT
  • Type VARCHAR (length)
  • Type DB-NULL
    Type for representing NULL values. Use like (or integer db-null) for declaring a type to be an integer that may be null.
  • Generic-Function SQL-TYPE-NAME (lisp-type &rest args)
    Transform a lisp type into a string containing something SQL understands. Default is to just use the type symbol's name.
  • Method SQL-TYPE-NAME ((lisp-type (eql 'db-null)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'db-null)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'db-null)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'array)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'array)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'array)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'serial8)) &rest args)
    SERIAL8
  • Method SQL-TYPE-NAME ((lisp-type (eql 'serial8)) &rest args)
    SERIAL8
  • Method SQL-TYPE-NAME ((lisp-type (eql 'serial8)) &rest args)
    SERIAL8
  • Method SQL-TYPE-NAME ((lisp-type (eql 'serial)) &rest args)
    SERIAL
  • Method SQL-TYPE-NAME ((lisp-type (eql 'serial)) &rest args)
    SERIAL
  • Method SQL-TYPE-NAME ((lisp-type (eql 'serial)) &rest args)
    SERIAL
  • Method SQL-TYPE-NAME ((lisp-type (eql 'double-precision)) &rest args)
    DOUBLE PRECISION
  • Method SQL-TYPE-NAME ((lisp-type (eql 'double-precision)) &rest args)
    DOUBLE PRECISION
  • Method SQL-TYPE-NAME ((lisp-type (eql 'double-precision)) &rest args)
    DOUBLE PRECISION
  • Method SQL-TYPE-NAME ((lisp-type (eql 'double-float)) &rest args)
    DOUBLE PRECISION
  • Method SQL-TYPE-NAME ((lisp-type (eql 'double-float)) &rest args)
    DOUBLE PRECISION
  • Method SQL-TYPE-NAME ((lisp-type (eql 'double-float)) &rest args)
    DOUBLE PRECISION
  • Method SQL-TYPE-NAME ((lisp-type (eql 'float)) &rest args)
    REAL
  • Method SQL-TYPE-NAME ((lisp-type (eql 'float)) &rest args)
    REAL
  • Method SQL-TYPE-NAME ((lisp-type (eql 'float)) &rest args)
    REAL
  • Method SQL-TYPE-NAME ((lisp-type (eql 'numeric)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'numeric)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'numeric)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'varchar)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'varchar)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'varchar)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'string)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'string)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type (eql 'string)) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type symbol) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type symbol) &rest args)
  • Method SQL-TYPE-NAME ((lisp-type symbol) &rest args)
  • Variable *STANDARD-SQL-STRINGS*
    nil
    Indicate whether S-SQL will use standard SQL strings (just use '' for #'), or backslash-style escaping. Setting this to NIL is always safe, but when the server is configured to allow standard strings (parameter 'standard_conforming_strings' is 'on'), the noise in queries can be reduced by setting this to T.
  • Function SQL-ESCAPE-STRING (string &optional prefix)
    Escape string data so it can be used in a query.
  • Generic-Function SQL-ESCAPE (arg)
    Get the representation of a Lisp value so that it can be used in a query.
  • Method SQL-ESCAPE ((arg t))
  • Method SQL-ESCAPE ((arg t))
  • Method SQL-ESCAPE ((arg t))
  • Method SQL-ESCAPE ((arg vector))
  • Method SQL-ESCAPE ((arg vector))
  • Method SQL-ESCAPE ((arg vector))
  • Method SQL-ESCAPE ((arg symbol))
  • Method SQL-ESCAPE ((arg symbol))
  • Method SQL-ESCAPE ((arg symbol))
  • Macro SQL (form)
    Compile form to a sql expression as far as possible.
  • Function SQL-COMPILE (form)
  • Function SQL-TEMPLATE (form)
  • Function ENABLE-S-SQL-SYNTAX (&optional (char #\q))
    Enable a syntactic shortcut #Q(...) for (sql (...)). Optionally takes a character to use instead of #\Q.
  • Macro REGISTER-SQL-OPERATORS (arity &rest names)
    Define simple operators. Arity is one of :unary (like 'not'), :unary-postfix (the operator comes after the operand), :n-ary (like '+': the operator falls away when there is only one operand), :2+-ary (like '=', which is meaningless for one operand), or :n-or-unary (like '-', where the operator is kept in the unary case). After the arity follow any number of operators, either just a keyword, in which case the downcased symbol name is used as the operator, or a two-element list containing a keyword and a name string.

Also exports

  • COMMON-LISP:REAL

simple-date

SIMPLE-DATE

  • Class DATE
    This class is used to represent dates where the time of day is not important.
    DAYS   Accessor: DAYS
  • Function ENCODE-DATE (year month day)
    Create a date object.
  • Function DECODE-DATE (date)
    Get the date elements from a date object.
  • Function DAY-OF-WEEK (date)
    Returns the weekday of the given date as a number between 0 and 6, 0 being Sunday and 6 being Saturday.
  • Class TIME-OF-DAY
    This class is used to represent time of day in hours, minutes, seconds and microseconds.
    HOURS   Accessor: HOURS
    MINUTES   Accessor: MINUTES
    SECONDS   Accessor: SECONDS
    MICROSECONDS   Accessor: MICROSECONDS
  • Function ENCODE-TIME-OF-DAY (hour minute &optional (second 0) (microsecond 0))
    Create a timestamp object.
  • Function DECODE-TIME-OF-DAY (time)
  • Class TIMESTAMP  (DATE)
    A timestamp specifies a time with a precision up to milliseconds.
    MILLISECS   Accessor: MILLISECS
  • Function ENCODE-TIMESTAMP (year month day &optional (hour 0) (minute 0) (second 0) (millisecond 0))
    Create a timestamp object.
  • Function DECODE-TIMESTAMP (timestamp)
    Extract the date and time from a timestamp object.
  • Function TIMESTAMP-TO-UNIVERSAL-TIME (timestamp)
    Convert a timestamp to a Lisp universal time.
  • Function UNIVERSAL-TIME-TO-TIMESTAMP (utime)
    Convert a Lisp universal time to a timestamp.
  • Class INTERVAL
    Intervals can be added to date and timestamp units to get relative times. The amount of time added for the month part of a timestamp depends on the time it is being added to.
    MILLISECS   Accessor: MILLISECS
    MONTHS   Accessor: MONTHS
  • Function ENCODE-INTERVAL (&key (year 0) (month 0) (week 0) (day 0) (hour 0) (minute 0) (second 0) (millisecond 0))
    Create an interval object. Parameters may be negative.
  • Function DECODE-INTERVAL (interval)
  • Generic-Function TIME-ADD (a b)
    Generic function for combining datetime objects. Adding an interval to a date or timestamp will return a new date or timestamp, increased by the value of the interval. Adding two intervals returns a new interval with the sum of the two arguments. Integers can be used in place of intervals, and will be interpreted as an amount of milliseconds.
  • Method TIME-ADD ((stamp timestamp) (interval interval))
  • Method TIME-ADD ((interval interval) (stamp timestamp))
  • Method TIME-ADD ((date date) (interval interval))
  • Method TIME-ADD ((interval interval) (date date))
  • Method TIME-ADD ((a interval) (b interval))
  • Method TIME-ADD ((interval interval) (millisecs integer))
  • Method TIME-ADD ((millisecs integer) (interval interval))
  • Method TIME-ADD ((stamp timestamp) (millisecs integer))
  • Method TIME-ADD ((millisecs integer) (stamp timestamp))
  • Method TIME-ADD ((a integer) (b integer))
  • Generic-Function TIME-SUBTRACT (a b)
    Subtracts datetime objects from each other. Subtracting two dates or timestamps results in an interval that represents the difference between them. Similarly subtracting two intervals gives their difference.
  • Method TIME-SUBTRACT ((a date) (b date))
  • Method TIME-SUBTRACT ((a timestamp) (b date))
  • Method TIME-SUBTRACT ((a timestamp) (b timestamp))
  • Method TIME-SUBTRACT ((date date) (interval interval))
  • Method TIME-SUBTRACT ((stamp timestamp) (millisecs integer))
  • Method TIME-SUBTRACT ((a interval) (b interval))
  • Method TIME-SUBTRACT ((interval interval) (millisecs integer))
  • Method TIME-SUBTRACT ((millisecs integer) (interval interval))
  • Generic-Function TIME= (a b)
    Compare two time-related values, returns a boolean indicating whether they denote the same time or period.
  • Method TIME= ((a date) (b date))
  • Method TIME= ((a date) (b timestamp))
  • Method TIME= ((a timestamp) (b date))
  • Method TIME= ((a timestamp) (b timestamp))
  • Method TIME= ((a interval) (b interval))
  • Method TIME= ((a time-of-day) (b time-of-day))
  • Generic-Function TIME< (a b)
    Compare two time-related values, returns a boolean indicating whether the first is less than the second.
  • Method TIME< ((a date) (b date))
  • Method TIME< ((a date) (b timestamp))
  • Method TIME< ((a timestamp) (b date))
  • Method TIME< ((a timestamp) (b timestamp))
  • Method TIME< ((a interval) (b interval))
  • Generic-Function TIME> (a b)
    Compare two time-related values, returns a boolean indicating whether the first is greater than the second.
  • Method TIME> ((a date) (b date))
  • Method TIME> ((a date) (b timestamp))
  • Method TIME> ((a timestamp) (b date))
  • Method TIME> ((a timestamp) (b timestamp))
  • Method TIME> ((a interval) (b interval))
  • Function TIME<= (a b)
    Compare two time-related values, returns a boolean indicating whether the first is less or equal than the second.
  • Function TIME>= (a b)
    Compare two time-related values, returns a boolean indicating whether the first is greater or equal than the second.