The piggyback-parameters Reference Manual

This is the piggyback-parameters Reference Manual, version 0.1.7, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 17:34:01 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 piggyback-parameters

This is a configuration system that supports local file and database based parameter storage.

Author

Eric Diethelm <>

License

MIT

Version

0.1.7

Dependencies
  • trivial-pooled-database (system).
  • trivial-hashtable-serialize (system).
  • trivial-json-codec (system).
Source

piggyback-parameters.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 piggyback-parameters/piggyback-parameters.asd

Source

piggyback-parameters.asd.

Parent Component

piggyback-parameters (system).

ASDF Systems

piggyback-parameters.


3.1.2 piggyback-parameters/package.lisp

Source

piggyback-parameters.asd.

Parent Component

piggyback-parameters (system).

Packages

piggyback-parameters.


3.1.3 piggyback-parameters/piggyback-parameters.lisp

Source

piggyback-parameters.asd.

Parent Component

piggyback-parameters (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 piggyback-parameters

piggyback-parameters is a parameter system that supports local file and database parameter storage.

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: clear-parameter (parameter)

Remove the parameter from memory (aka unload).

Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Function: delete-parameter (parameter from)

Delete the *parameter* *from* the indicated source. Also removes it from memory. **:file** - Delete the *parameter* from the configuration file; **:database** - Delete the *parameter* from the database;
**:everywhere** - Delete the *parameter* from both file and database

Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Function: get-value (parameter &optional strategy force)

Read the value of paramter *PARAM*. The source of the value can be defined by *STRATEGY*, which accepts following values
**nil** Reuse the same strategy as in the previous get/set of this parameter;
**:file-first** Load the value first from the local configuration and, if it does not exist, from the database;
**:db-first** Load the value first from the database and, if it does not exist, from the local configuration;
**:try-append** Load the values both from database and from local configuration and try to append them (valid types are only *list* and *string*); **:file-only** Load the value only from the local configuration file;
**:db-only** Load the value only from the database.

Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Function: (setf get-value) (parameter &optional strategy)

Save the parameter *PARAMETER* with value *VALUE* into storage. The storage destination is defined by the parameter *STRATEGY* with possible values being **nil** Reuse the same strategy as in the previous get/set of this parameter;
**:local-only** Save the parameter/value pair only in the local configuration file;
**:database-only** Save the parameter/value pair only in the database.

Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Function: reset ()
Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Function: set-configuration-file (path)

Define the path of the configuration file to be used in combination with the :file-only and :file-first strategies.

Package

piggyback-parameters.

Source

piggyback-parameters.lisp.


5.1.2 Conditions

Condition: file-not-found-error
Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Direct superclasses

error.

Direct methods

path.

Direct slots
Slot: path
Initargs

:path

Readers

path.

Writers

This slot is read-only.


5.2 Internals


5.2.1 Special variables

Special Variable: *config-file*
Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Special Variable: *parameters*
Package

piggyback-parameters.

Source

piggyback-parameters.lisp.


5.2.2 Ordinary functions

Function: find-parameter (key)
Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Function: load-file (path)
Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Function: save-file (path)
Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Function: try-merge (fval sval)
Package

piggyback-parameters.

Source

piggyback-parameters.lisp.


5.2.3 Generic functions

Generic Reader: get-key (object)
Package

piggyback-parameters.

Methods
Reader Method: get-key ((config-parameter config-parameter))

automatically generated reader method

Source

piggyback-parameters.lisp.

Target Slot

key.

Generic Function: load-value (parameter strategy)
Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Methods
Method: load-value (parameter (strategy (eql :database-first)))
Method: load-value (parameter (strategy (eql :file-first)))
Method: load-value (parameter (strategy (eql :memory-only)))
Method: load-value (parameter (strategy (eql :file-only)))
Method: load-value (parameter (strategy (eql :database-only)))
Generic Reader: path (condition)
Package

piggyback-parameters.

Methods
Reader Method: path ((condition file-not-found-error))
Source

piggyback-parameters.lisp.

Target Slot

path.

Generic Function: save-value (parameter strategy value)
Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Methods
Method: save-value (parameter (strategy (eql :database-first)) value)
Method: save-value (parameter (strategy (eql :file-first)) value)
Method: save-value (parameter (strategy (eql :memory-only)) value)
Method: save-value (parameter (strategy (eql :file-only)) value)
Method: save-value (parameter (strategy (eql :database-only)) value)
Generic Reader: strategy (object)
Package

piggyback-parameters.

Methods
Reader Method: strategy ((config-parameter config-parameter))

automatically generated reader method

Source

piggyback-parameters.lisp.

Target Slot

read-strategy.


5.2.4 Classes

Class: config-parameter
Package

piggyback-parameters.

Source

piggyback-parameters.lisp.

Direct methods
Direct slots
Slot: key
Initform

(function (lambda nil (error "the configuration parameter must have a key (the parameter name).")))

Initargs

:key

Readers

get-key.

Writers

This slot is read-only.

Slot: value
Initargs

:value

Slot: read-strategy
Type

(member :memory-only :file-first :database-first :file-only :database-only)

Initform

:file-first

Initargs

:strategy

Readers

strategy.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   D   F   G   L   M   P   R   S   T  
Index Entry  Section

(
(setf get-value): Public ordinary functions

C
clear-parameter: Public ordinary functions

D
delete-parameter: Public ordinary functions

F
find-parameter: Private ordinary functions
Function, (setf get-value): Public ordinary functions
Function, clear-parameter: Public ordinary functions
Function, delete-parameter: Public ordinary functions
Function, find-parameter: Private ordinary functions
Function, get-value: Public ordinary functions
Function, load-file: Private ordinary functions
Function, reset: Public ordinary functions
Function, save-file: Private ordinary functions
Function, set-configuration-file: Public ordinary functions
Function, try-merge: Private ordinary functions

G
Generic Function, get-key: Private generic functions
Generic Function, load-value: Private generic functions
Generic Function, path: Private generic functions
Generic Function, save-value: Private generic functions
Generic Function, strategy: Private generic functions
get-key: Private generic functions
get-key: Private generic functions
get-value: Public ordinary functions

L
load-file: Private ordinary functions
load-value: Private generic functions
load-value: Private generic functions
load-value: Private generic functions
load-value: Private generic functions
load-value: Private generic functions
load-value: Private generic functions

M
Method, get-key: Private generic functions
Method, load-value: Private generic functions
Method, load-value: Private generic functions
Method, load-value: Private generic functions
Method, load-value: Private generic functions
Method, load-value: Private generic functions
Method, path: Private generic functions
Method, save-value: Private generic functions
Method, save-value: Private generic functions
Method, save-value: Private generic functions
Method, save-value: Private generic functions
Method, save-value: Private generic functions
Method, strategy: Private generic functions

P
path: Private generic functions
path: Private generic functions

R
reset: Public ordinary functions

S
save-file: Private ordinary functions
save-value: Private generic functions
save-value: Private generic functions
save-value: Private generic functions
save-value: Private generic functions
save-value: Private generic functions
save-value: Private generic functions
set-configuration-file: Public ordinary functions
strategy: Private generic functions
strategy: Private generic functions

T
try-merge: Private ordinary functions