postmodernity

API Reference

postmodernity

Utility library for the Common Lisp Postmodern library

POSTMODERNITY

  • Macro DEFPGSTRUCT (structure-name &body slot-specs)
    Defines a structured type, named /structure-type/, with named slots as specified by /slot-specs/ and defines a Postmodern row reader named /structure-name/-ROW-READER. DEFPGSTRUCT creates and adds to POSTMODERN::*RESULT-STYLES* the keywords named structure-name and by concatenating with S and !. Those keywords can be used as result format arguments to POSTMODERN:QUERY, POSTMODERN:PREPARE, POSTMODERN:DEFPREPARED, and POSTMODERN:DEFPREPARED-WITH-NAMES. Note that, in doing so, DEFPGSTRUCT accesses unexported symbols from the POSTMODERN package. /structure-name/ must be a symbol, like a Common Lisp structure /structure-name/ rather than a Common Lisp structure /name-and-options/. Each /slot-spec/ must be either a symbol specifying the slot name or a list of a symbol specifying the slot name and a desginator for a function to read and convert the PostgreSQL string value when initializing the slot value. If /slot-spec/ is a symbol, the slot value will be initialized to the PostgreSQL string value.