weblocks-stores

API Reference

weblocks-clsql

No packages.

weblocks-custom

No packages.

weblocks-memory

No packages.

weblocks-montezuma

No packages.

weblocks-perec

A weblocks backend for cl-perec.

WEBLOCKS-PEREC

A driver for weblocks backend store API that connects to cl-perec.
No exported symbols.

weblocks-postmodern

A weblocks backend for PostgreSQL using postmodern.

WEBLOCKS-POSTMODERN

A driver for weblocks backend store API that connects to Postmodern.
No exported symbols.

weblocks-prevalence

A weblocks backend for cl-prevalence.

WEBLOCKS-PREVALENCE

A driver for weblocks backend store API that connects to CL-Prevalence.
  • Function MAKE-PERSISTENT-INSTANCE (store class &rest initargs)

weblocks-store-test

No packages.

weblocks-stores

A base for weblocks stores

WEBLOCKS-STORES

Base for weblocks store drivers
  • Variable *DEBUG-STORES*
    t
  • Generic-Function OPEN-STORE (store-type &rest args)
    Opens a connection to a store specified by 'store-type'. This function must return the instance of the connection to the store. Methods can accept any number of custom keyword parameters. Additionally, the function must set *default-store* to the value of newly created store.
  • Generic-Function CLOSE-STORE (store)
    Closes a connection to the store. If the value of *default-store* is equal to 'store', *default-store* must be set to NIL.
  • Generic-Function CLEAN-STORE (store)
    Cleans all the data in the store. This function should erase data, but not necessarily any schema information (like tables, etc.)
  • Variable *DEFAULT-STORE*
    nil
    The default store to which objects are persisted. Bound while a webapp is handling a request to the value of its `webapp-default-store-name'. By using `defstore' after the relevant `defwebapp' in the same package, barring an explicit setting, the webapp will be set to use the defined store automatically.
  • Generic-Function BEGIN-TRANSACTION (store)
    Begins a transaction on 'store'. Note, if the given store does not have transaction support, this function should return NIL without signalling errors.
  • Generic-Function COMMIT-TRANSACTION (store)
    Commits a transaction started on 'store'. Note, if the given store does not have transaction support, or the store isn't in a transaction, this function should return NIL without signalling errors.
  • Generic-Function ROLLBACK-TRANSACTION (store)
    Rolls back a transaction started on 'store'. Note, if the given store does not have transaction support, or the store isn't in a transaction, this function should return NIL without signalling errors.
  • Generic-Function DYNAMIC-TRANSACTION (store proc)
    Call PROC, a thunk, while in a transaction of STORE. See `use-dynamic-transaction-p' for details.
  • Method DYNAMIC-TRANSACTION (store proc)
  • Method DYNAMIC-TRANSACTION (store proc)
  • Method DYNAMIC-TRANSACTION (store proc)
  • Generic-Function USE-DYNAMIC-TRANSACTION-P (store)
    Answer whether `action-txn-hook' and equivalents should use GF `dynamic-transaction' for transaction control rather than the `begin-transaction', `commit-transaction', and `rollback-transaction' GFs. Be warned that non-local exit behavior for stores that answer true for this may have unique non-local exit unwind behavior.
  • Method USE-DYNAMIC-TRANSACTION-P (store)
  • Method USE-DYNAMIC-TRANSACTION-P (store)
  • Method USE-DYNAMIC-TRANSACTION-P (store)
  • Generic-Function PERSIST-OBJECT (store object &key)
    Persists 'object' into 'store', answering 'object'. If the object does not have a unique ID (see 'object-id'), persist 'object' into store and set its unique ID via (see '(setf object-id)'). If the object has a unique ID, find relevant entry in the store and update it with 'object'.
  • Generic-Function DELETE-PERSISTENT-OBJECT (store object)
    Deletes the persistent object from 'store'. After deleting the persistent object, set unique ID of 'object' to NIL (see '(setf object-id)').
  • Generic-Function DELETE-PERSISTENT-OBJECT-BY-ID (store class-name object-id)
    Similar to 'delete-persistent-object', but instead deletes object with the specified 'object-id'.
  • Generic-Function FIND-PERSISTENT-OBJECT-BY-ID (store class-name object-id)
    Finds and returns a persistent object of a given class name in a given store by its unique id. If the object isn't found, returns NIL.
  • Generic-Function FIND-PERSISTENT-OBJECTS (store class-name &key order-by range &allow-other-keys)
    Looks up and returns objects of appropriate 'class-name' in the 'store' bound by the given keyword parameters. If 'order-by' is specified, orders the returned objects by the given slot in the given order. If 'order-by' is not NIL, it is expected to be a cons cell with slot name as 'car' and :asc or :desc as 'cdr'. If 'range' is specified, returns only the specified range of objects. The CAR of 'range' is the index of the initial object (inclusive) and CDR is the index past the last object. Note, the range should be applied after the objects have been filtered and ordered if necessary. Other implementation dependent keys may be defined by a given store.
  • Generic-Function COUNT-PERSISTENT-OBJECTS (store class-name &key &allow-other-keys)
    Returns the number of persistent objects stored in 'store' of 'class-name', bound by the given keyword parameters. For documentation of keyword parameters, see 'find-persistent-objects'. Other implementation dependent keys may be defined by a given store.
  • Generic-Function REPLACE-ON-REDEFINE-P (store-type)
    When true replaces existing store on reexecuting (defstore ...) block.
  • Method REPLACE-ON-REDEFINE-P (store-type)
  • Method REPLACE-ON-REDEFINE-P (store-type)
  • Method REPLACE-ON-REDEFINE-P (store-type)
  • Generic-Function LIST-MODEL-CLASSES (store)
    Returns list with symbols - models class names
  • Function CLASS-VISIBLE-SLOTS (cls &key readablep writablep)
    Converts 'cls' to class object if it is a name, and calls 'class-visible-slots-impl'.
  • Generic-Function CLASS-VISIBLE-SLOTS-IMPL (cls &key readablep writablep)
    Returns a list of 'standard-direct-slot-definition' objects for a class and its subclasses. Slots objects for slots that do not have reader accessors are filtered out and not returned. If 'readablep' is true, filters out the slots that don't have a reader (or accessor) defined. If 'writablep' is true, filters out the slots that don't have a writer (or accessor) defined.
  • Method CLASS-VISIBLE-SLOTS-IMPL (cls &key readablep writablep)
  • Method CLASS-VISIBLE-SLOTS-IMPL (cls &key readablep writablep)
  • Method CLASS-VISIBLE-SLOTS-IMPL (cls &key readablep writablep)
  • Generic-Function DELETE-MODEL-CLASS (store cls)
    Completely removes model class. `list-model-classes` should not contain class after calling this method.
  • Method DELETE-MODEL-CLASS (store cls)
  • Method DELETE-MODEL-CLASS (store cls)
  • Method DELETE-MODEL-CLASS (store cls)
  • Variable *DEFAULT-SERIALIZATION-FORMAT*
    nil
  • Generic-Function SERIALIZE (obj &key format)
    Method for serialization of objects, objects sets for specific model and stores.
  • Generic-Function UNSERIALIZE (obj &key format)
    Method for deserialization of objects, objects sets for specific model and stores.
  • Generic-Function STORE-TYPE (store)
    Should return keyword type of store
  • Method STORE-TYPE (store)
  • Method STORE-TYPE (store)
  • Method STORE-TYPE (store)
  • Method STORE-TYPE ((store null))
  • Method STORE-TYPE ((store null))
  • Method STORE-TYPE ((store null))
  • Generic-Function CLASS-ID-SLOT-NAME (class)
    Must return the symbol that identifies the slot name which represents the unique ID of the class named 'class'. Default implementation returns 'ID'. Specialize this function if you want to name the slot that holds the class' unique ID differently.
  • Method CLASS-ID-SLOT-NAME ((class t))
  • Function OBJECT-ID-SLOT-NAME (obj)
    Returns the slot name of the slot that holds the unique identifier of 'obj'. This information is obtained via calling 'class-id-slot-name'.
  • Generic-Function OBJECT-ID (obj)
    Returns a value that uniquely identifies an object in memory or in a backend store. The default implementation looks for an 'id' slot via 'slot-value'. If such slot is not present, signals an error. Specialize this function for various back end stores and other object identification schemes.
  • Method OBJECT-ID ((obj standard-object))
  • Method OBJECT-ID ((obj standard-object))
  • Method OBJECT-ID ((obj standard-object))
  • Method OBJECT-ID ((obj null))
  • Method OBJECT-ID ((obj null))
  • Method OBJECT-ID ((obj null))
  • Generic-Function (setf OBJECT-ID) (id obj)
    Sets the value that uniquely identifies an object in memory or in a backend store. The default implementation tries to set an 'id' slot via 'slot-value'. If such slot is not present, signals an error. Specialize this function for various back end stores and other object identification schemes.
  • Method (setf OBJECT-ID) (id (obj standard-object))
  • Generic-Function CLASS-STORE (class-name)
    Returns the store where objects of class name should be persisted. This function should be used by widgets to persist objects. Default implementation returns *default-store*.
  • Function OBJECT-STORE (obj)
    Returns the store for the object by calling 'class-store'.
  • Variable *STORE-NAMES*
    nil
    A list of store names in the order in which they were defined.
  • Macro DEFSTORE (name type &rest store-args)
    A macro that helps define a store. A global variable 'name' is defined, and 'open-store' is called with appropriate store type and arguments. Note that the last store will also be the default (see *default-store*). All stores defined via 'defstore' will be opened and bound when 'start-weblocks' is called, and closed when 'stop-weblocks' is called. If `store-args' contains a keyword 'load-store-system-p' with a value of NIL following it then the store's ASDF system (`weblocks-STORENAME') will not be loaded afterwards. Turning this off is useful for binary images.
  • Function OPEN-STORES
    Opens and binds all stores.
  • Function CLOSE-STORES
    Closes all stores.
  • Function MAPSTORES (fn)
    Maps a function over existing stores in the order in which they were defined. Returns NIL.
  • Function PERSIST-OBJECTS (store objects &rest keys)
    Persists all objects in 'objects' sequence into 'store'.
  • Function REGISTER-STORE-TYPE (store-type)
  • Function LIST-STORE-TYPES