This is the weblocks-stores Reference Manual, version 0.5.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 08:05:28 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
weblocks-stores
A base for weblocks stores
Olexiy Zamkoviy, Scott L. Burson
Olexiy Zamkoviy
LLGPL
0.5.1
closer-mop
(system).
metatilities
(system).
weblocks-util
(system).
src
(module).
Modules are listed depth-first from the system components tree.
weblocks-stores/src
weblocks-stores
(system).
package.lisp
(file).
store
(module).
weblocks-stores/src/store
package.lisp
(file).
src
(module).
store-api.lisp
(file).
store-utils.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
weblocks-stores/weblocks-stores.asd
weblocks-stores/src/package.lisp
weblocks-stores/src/store/store-api.lisp
weblocks-stores/src/store/store-utils.lisp
weblocks-stores/weblocks-stores.asd
weblocks-stores
(system).
weblocks-stores/src/store/store-api.lisp
store
(module).
*debug-stores*
(special variable).
*default-serialization-format*
(special variable).
*default-store*
(special variable).
begin-transaction
(generic function).
class-visible-slots
(function).
class-visible-slots-impl
(generic function).
clean-store
(generic function).
close-store
(generic function).
commit-transaction
(generic function).
count-persistent-objects
(generic function).
delete-model-class
(generic function).
delete-persistent-object
(generic function).
delete-persistent-object-by-id
(generic function).
dynamic-transaction
(generic function).
find-persistent-object-by-id
(generic function).
find-persistent-objects
(generic function).
list-model-classes
(generic function).
open-store
(generic function).
persist-object
(generic function).
replace-on-redefine-p
(generic function).
rollback-transaction
(generic function).
serialize
(generic function).
store-type
(generic function).
unserialize
(generic function).
use-dynamic-transaction-p
(generic function).
weblocks-stores/src/store/store-utils.lisp
store
(module).
*store-names*
(special variable).
class-id-slot-name
(generic function).
class-store
(generic function).
close-stores
(function).
defstore
(macro).
list-store-types
(function).
mapstores
(function).
object-id
(generic function).
(setf object-id)
(generic function).
object-id-slot-name
(function).
object-store
(function).
open-stores
(function).
persist-objects
(function).
register-store-type
(function).
%defstore-postdefine
(function).
%defstore-predefine
(function).
*store-types*
(special variable).
*stores*
(special variable).
copy-store-info
(function).
make-store-info
(function).
maybe-replace-store
(function).
store-info
(structure).
store-info-args
(reader).
(setf store-info-args)
(writer).
store-info-p
(function).
store-info-type
(reader).
(setf store-info-type)
(writer).
Packages are listed by definition order.
weblocks-stores
Base for weblocks store drivers
anaphora
.
common-lisp
.
metabang.utilities
.
weblocks-util
.
*debug-stores*
(special variable).
*default-serialization-format*
(special variable).
*default-store*
(special variable).
*store-names*
(special variable).
begin-transaction
(generic function).
class-id-slot-name
(generic function).
class-store
(generic function).
class-visible-slots
(function).
class-visible-slots-impl
(generic function).
clean-store
(generic function).
close-store
(generic function).
close-stores
(function).
commit-transaction
(generic function).
count-persistent-objects
(generic function).
defstore
(macro).
delete-model-class
(generic function).
delete-persistent-object
(generic function).
delete-persistent-object-by-id
(generic function).
dynamic-transaction
(generic function).
find-persistent-object-by-id
(generic function).
find-persistent-objects
(generic function).
list-model-classes
(generic function).
list-store-types
(function).
mapstores
(function).
object-id
(generic function).
(setf object-id)
(generic function).
object-id-slot-name
(function).
object-store
(function).
open-store
(generic function).
open-stores
(function).
persist-object
(generic function).
persist-objects
(function).
register-store-type
(function).
replace-on-redefine-p
(generic function).
rollback-transaction
(generic function).
serialize
(generic function).
store-type
(generic function).
unserialize
(generic function).
use-dynamic-transaction-p
(generic function).
%defstore-postdefine
(function).
%defstore-predefine
(function).
*store-types*
(special variable).
*stores*
(special variable).
copy-store-info
(function).
make-store-info
(function).
maybe-replace-store
(function).
store-info
(structure).
store-info-args
(reader).
(setf store-info-args)
(writer).
store-info-p
(function).
store-info-type
(reader).
(setf store-info-type)
(writer).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Debugging flag, set ’T’ to see record ids in repl, set ’NIL’ to have usual objects behavior.
Debugging flag, set ’T’ to see record ids in repl, set ’NIL’ to have usual objects behavior.
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.
A list of store names in the order in which they were defined.
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.
Converts ’cls’ to class object if it is a name, and calls ’class-visible-slots-impl’.
Closes all stores.
Maps a function over existing stores in the order in which they were defined. Returns NIL.
Returns the slot name of the slot that holds the unique identifier of ’obj’. This information is obtained via calling ’class-id-slot-name’.
Returns the store for the object by calling ’class-store’.
Opens and binds all stores.
Persists all objects in ’objects’ sequence into ’store’.
Begins a transaction on ’store’. Note, if the given
store does not have transaction support, this function should return
NIL without signalling errors.
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.
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*.
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.
Cleans all the data in the store. This function
should erase data, but not necessarily any schema information (like
tables, etc.)
Closes a connection to the store. If the value of
*default-store* is equal to ’store’, *default-store* must be set to
NIL.
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.
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.
Completely removes model class. ‘list-model-classes‘ should not contain class after calling this method.
Deletes the persistent object from ’store’. After
deleting the persistent object, set unique ID of ’object’ to
NIL (see ’(setf object-id)’).
Similar to ’delete-persistent-object’, but instead deletes object with the specified ’object-id’.
Call PROC, a thunk, while in a transaction of STORE. See ‘use-dynamic-transaction-p’ for details.
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.
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.
Returns list with symbols - models class names
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.
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.
standard-object
)) ¶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.
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’.
When true replaces existing store on reexecuting (defstore ...) block.
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.
Method for serialization of objects, objects sets for specific model and stores.
Should return keyword type of store
Method for deserialization of objects, objects sets for specific model and stores.
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.
A hashmap of stores, where each item has store name as key, and structure of type ’store-info’ as value.
Helper for ‘defstore’.
Helper for ‘defstore’.
Replaces store on (defstore ...) call repeating.
Works only for those stores for which (replace-on-redefine-p ...) is true
args
.
type
.
Jump to: | %
(
B C D F G L M O P R S U |
---|
Jump to: | %
(
B C D F G L M O P R S U |
---|
Jump to: | *
A S T |
---|
Jump to: | *
A S T |
---|
Jump to: | F M P S W |
---|
Jump to: | F M P S W |
---|