The cl-ohm Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-ohm Reference Manual

This is the cl-ohm Reference Manual, version 0.2.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 03:55:09 2022 GMT+0.

Table of Contents


1 Introduction

#+title: CL-OHM
#+date: [2016-01-30 Sat]
#+language: en
#+startup: showall

[[http://quickdocs.org/cl-ohm/][file:http://quickdocs.org/badge/cl-ohm.svg]]
[[https://opensource.org/licenses/MIT][file:https://img.shields.io/badge/License-MIT-yellow.svg]]
[[https://travis-ci.org/rudolfochrist/cl-ohm][file:https://travis-ci.org/rudolfochrist/cl-ohm.svg?branch=master]]
[[https://coveralls.io/github/rudolfochrist/cl-ohm?branch=master][file:https://coveralls.io/repos/github/rudolfochrist/cl-ohm/badge.svg?branch=master]]

This is an implementation of [[http://ohm.keyvalue.org/][Ohm]] in Common Lisp with some inspiration from [[http://eudoxia.me/crane/][Crane]] and [[https://github.com/fukamachi/datafly][datafly]].

Ohm is an object-hash mapping for [[http://redis.io/][Redis]].

* Usage

** Starting and connecting Redis

First of all, Redis must be up and running. You can start Redis with the command line

: $ redis-server

Then load =CL-OHM=:

: (ql:quickload :cl-ohm)

Without configuration Redis runs on =localhost:6379=. If you're using a different host or port you have to
configure =CL-OHM=. For example, if Redis is running on =198.162.55.12= on port =12455= than you must setup
CL-OHM like this:

#+BEGIN_SRC lisp
(ohm:setup-redis-connection :host #(198 162 55 12) :port 12455)
#+END_SRC

** Mapping objects to Redis

Use =ohm:define-ohm-model= to specify your models.

#+BEGIN_SRC lisp :export code
(ohm:define-ohm-model person ()
  :attributes ((first-name :indexp t)
               (last-name :indexp t)
               (email :uniquep t)))
#+END_SRC

You can create new persisted objects with =CREATE=:

#+BEGIN_SRC lisp
(ohm:create 'person :first-name "John" :last-name "McCarthy")
#+END_SRC

Attributes are setfable like ordinary objects slots (Note: if you don't provide readers or writers
for an attribute, an accessor will be created) but has to be *explicitly saved to be persisted*.

#+BEGIN_SRC lisp
(ohm:create 'person :first-name "Bill")
(setf (first-name *) "William")
(ohm:save **)
#+END_SRC

** Loading objects from the data store

When you know an object's ID then you can load it with =filter-id=

#+BEGIN_SRC lisp
(ohm:filter-id 'person "5")
;;; or
(ohm:filter-id 'person 5)
#+END_SRC

*** Indexes

For each attribute marked with =:INDEXP= and index gets created. With this index it is possible to load
objects by their values.

#+BEGIN_SRC lisp
(ohm:filter 'person :first-name "Bill")
#+END_SRC

This load all objects with =first-name=Bill=. Indexed attributes can be combined in =FILTER=.

#+BEGIN_SRC lisp
(ohm:filter 'person :first-name "Bill" :last-name "Miller")
#+END_SRC

If you omit any attribute specifiers from =FILTER= than all objects for the given type are retrieved.

#+BEGIN_SRC lisp
(ohm:filter 'person)
#+END_SRC

** Unique values

Each attribute marked as =:UNIQUEP= must be unique for all instances of a given model. Considering the
=person= model from above this means two instances cannot have the same =email=. =:UNIQUEP= also creates an
index, query-able with =FILTER-WITH=.

#+BEGIN_SRC lisp
(ohm:filter-with 'person :email "e@example.org")
#+END_SRC

This load the =person= object with =email=e@example.org=

** Counters

Counters let you count atomically.

#+BEGIN_SRC lisp
(ohm:define-ohm-model candidate (person)
  :counters (votes))

(let ((candidate (create 'candidate :first-name "Bill")))
  (ohm:incr (votes candidate))
  (ohm:incr (votes candidate))

  (ohm:counter (votes candidate))       ;=> 2

  (ohm:decr (votes candidate) 2)

  (ohm:counter (votes candidate)))      ;=> 0
#+END_SRC

** Sets and Lists

Each model can define sets or lists as attributes. Sets and lists can hold other persisted objects defined by
=DEFINE-OHM-MODEL=. Therefore you most provide the set's or list's element-type.

#+BEGIN_SRC lisp
(ohm:define-ohm-model tag ()
  :attributes ((name :indexp t)))

(ohm:define-ohm-model post ()
  :lists ((authors :element-type person))
  :sets ((tags :element-type tag)))
#+END_SRC

=CL-OHM= persisted objects are internally stored in sets.
#+BEGIN_SRC lisp
(ohm:create 'person :first-name "Donald" :last-name "Duck")
(ohm:filter 'person) ;=> #
#+END_SRC

This lets you combine the =FITLER= function with set operations.

*** Set operations

Creating some test data:

#+BEGIN_SRC lisp :results silent
(ohm:create 'person :first-name "Donald" :last-name "Duck")
(ohm:create 'person :first-name "Daisy" :last-name "Duck")
(ohm:create 'person :first-name "Gladstone" :last-name "Gander")
#+END_SRC

Creating the union of persons named *Duck* and persons named *Gander*:

#+BEGIN_SRC lisp
(ohm:elements (ohm:union (ohm:filter 'person :last-name "Duck")
                         (ohm:filter 'person :last-name "Gander")))
#+END_SRC

#+RESULTS:
: (#
:  #
:  #)

Use =EXCEPT= to exclude objects with specific properties. Say, exclude persons named *Gander* from all persons:

#+BEGIN_SRC lisp
(ohm:elements (ohm:except (ohm:filter 'person) ; all persons
                          (ohm:filter 'person :last-name "Gander")))
#+END_SRC

#+RESULTS:
: (#
:  #)

Use =COMBINE= to limit the resulting set. Say, all persons with last name *Duck* and first name *Donald*:

#+BEGIN_SRC lisp
(ohm:elements (ohm:combine (ohm:filter 'person :last-name "Duck")
                           (ohm:filter 'person :first-name "Donald")))
#+END_SRC

#+RESULTS:
: (#)

** Persistence Strategy

Sets, lists and counters are stored implicitly after their mutation. If you change normal attributes (with
=SETF=) then those objects have to be persisted with =SAVE=.

* API Documentation

See [[https://htmlpreview.github.io/?https://github.com/rudolfochrist/cl-ohm/blob/master/docs/cl-ohm-0.2.1.html#CL-OHM][CL-OHM HTML Documentation]].

* Running the tests

CL-OHM uses [[https://common-lisp.net/project/fiveam/docs/index.html][FiveAM]] for testing. Please installed it with

: (ql:quickload :fiveam)

Then you can run the test through ASDF:

: (asdf:test-system :cl-ohm)

* License

[[file:LICENSE][MIT Copyright (c) 2016 Sebastian Christ]]


2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 cl-ohm

An object-hash mapping for Redis in Common Lisp

Author

Sebastian Christ <rudolfo.christ@gmail.com>

Contact

rudolfo.christ@gmail.com

Home Page

https://github.com/rudolfochrist/cl-ohm

Source Control

(GIT git@github.com:rudolfochrist/cl-ohm.git)

Bug Tracker

https://github.com/rudolfochrist/cl-ohm/issues

License

MIT

Version

0.2.1

Dependencies
  • alexandria (system).
  • closer-mop (system).
  • cl-redis (system).
Source

cl-ohm.asd.

Child Components

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 cl-ohm/cl-ohm.asd

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

ASDF Systems

cl-ohm.


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.2 cl-ohm/package.lisp

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Packages

cl-ohm.


3.1.3 cl-ohm/utils.lisp

Dependency

package.lisp (file).

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Internals

onep (function).


3.1.4 cl-ohm/connection.lisp

Dependency

utils.lisp (file).

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Public Interface
Internals

3.1.5 cl-ohm/conditions.lisp

Dependency

connection.lisp (file).

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Public Interface
Internals

3.1.6 cl-ohm/mop.lisp

Dependency

conditions.lisp (file).

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Public Interface
Internals

3.1.7 cl-ohm/ohm-object.lisp

Dependency

mop.lisp (file).

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Public Interface
Internals

3.1.8 cl-ohm/ohm-counter.lisp

Dependency

ohm-object.lisp (file).

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Public Interface
  • counter (generic function).
  • decr (generic function).
  • incr (generic function).
Internals

3.1.9 cl-ohm/ohm-collection.lisp

Dependency

ohm-counter.lisp (file).

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Public Interface
Internals

3.1.10 cl-ohm/ohm-list.lisp

Dependency

ohm-collection.lisp (file).

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Public Interface
Internals

3.1.11 cl-ohm/ohm-set-algebra.lisp

Dependency

ohm-list.lisp (file).

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Internals

3.1.12 cl-ohm/ohm-set.lisp

Dependency

ohm-set-algebra.lisp (file).

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Public Interface
Internals

Previous: , Up: Lisp   [Contents][Index]

3.1.13 cl-ohm/cl-ohm.lisp

Dependency

ohm-set.lisp (file).

Source

cl-ohm.asd.

Parent Component

cl-ohm (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 cl-ohm

Object-hash mapping for Redis.

Source

package.lisp.

Nickname

ohm

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Macros

Macro: define-ohm-model (name superclasses &key attributes counters lists sets)
Package

cl-ohm.

Source

ohm-object.lisp.

Macro: with-connection (() &body body)
Package

cl-ohm.

Source

connection.lisp.

Macro: with-transaction (&body body)
Package

cl-ohm.

Source

connection.lisp.


5.1.2 Ordinary functions

Function: create (name &rest initargs)

Creates a persisted instance of NAME.

Package

cl-ohm.

Source

cl-ohm.lisp.

Function: filter (class-name &rest kwargs)

Find objects in the data store.
If no keyword arguments are given, all objects of CLASS-NAME fetched.

Package

cl-ohm.

Source

cl-ohm.lisp.

Function: filter-with (class-name attribute value)

Find an object with unique value. e.g. (find-one ’user :email "foo@foo.com")

Package

cl-ohm.

Source

cl-ohm.lisp.

Function: flush-db ()

Erase the data store.

Package

cl-ohm.

Source

connection.lisp.

Function: setup-redis-connection (&key host port auth)

Configure Redis backend.

Package

cl-ohm.

Source

connection.lisp.


5.1.3 Generic functions

Generic Function: add (collection element)

Adds a ELEMENT to the COLLECTION. ELEMENT must be a persistable object.

Package

cl-ohm.

Source

ohm-collection.lisp.

Methods
Method: add ((set ohm-set) (element ohm-object))
Source

ohm-set.lisp.

Method: add ((list ohm-list) (element ohm-object))
Source

ohm-list.lisp.

Method: add :before ((collection ohm-collection) (element ohm-object))
Generic Function: add-left (list element)

Add ELEMENT to the left side of LIST.

Package

cl-ohm.

Source

ohm-list.lisp.

Methods
Method: add-left :before ((list ohm-list) (element ohm-object))
Method: add-left ((list ohm-list) (element ohm-object))
Generic Function: class-key (object &rest segments)

Creates a persistence key for class of OBJECT.

Package

cl-ohm.

Source

cl-ohm.lisp.

Methods
Method: class-key ((object ohm-object) &rest segments)
Generic Function: combine (set1 set2)

Combines SET1 and SET2. Some would say intersection.

Package

cl-ohm.

Source

ohm-set.lisp.

Methods
Method: combine ((set1 ohm-set) (set2 ohm-set))
Generic Function: counter (counter)

Retrieves the value of the counter COUNTER/

Package

cl-ohm.

Source

ohm-counter.lisp.

Methods
Method: counter ((counter ohm-counter))
Generic Function: decr (counter &optional decrement)

Decrements COUNTER by DECREMENT.

Package

cl-ohm.

Source

ohm-counter.lisp.

Methods
Method: decr ((counter ohm-counter) &optional decrement)
Generic Function: del (object)

Removes OBJECT from the data store.

Package

cl-ohm.

Source

cl-ohm.lisp.

Methods
Method: del :before ((object ohm-object))
Method: del ((object ohm-object))
Generic Function: elements (collection)

Returns all elements in COLLECTION.

Package

cl-ohm.

Source

ohm-collection.lisp.

Methods
Method: elements ((set ohm-set))
Source

ohm-set.lisp.

Method: elements ((list ohm-list))
Source

ohm-list.lisp.

Generic Function: except (set1 set2)

Removes elements from SET1 that are also in SET2. Same people would say set-difference.

Package

cl-ohm.

Source

ohm-set.lisp.

Methods
Method: except ((set1 ohm-set) (set2 ohm-set))
Generic Function: filter-id (class-name id)

Retrieves an object by id from the data store.

Package

cl-ohm.

Source

cl-ohm.lisp.

Methods
Method: filter-id (class-name (id integer))
Method: filter-id (class-name (id string))
Generic Function: find-id (set id)

Checks if ID is a member of SET.

Package

cl-ohm.

Source

ohm-set.lisp.

Methods
Method: find-id ((set ohm-set) (id integer))
Method: find-id ((set ohm-set) (id string))
Generic Function: first (list)

Returns the first element of the LIST.

Package

cl-ohm.

Source

ohm-list.lisp.

Methods
Method: first ((list ohm-list))
Generic Function: incr (counter &optional increment)

Increments COUNTER by INCREMENT.

Package

cl-ohm.

Source

ohm-counter.lisp.

Methods
Method: incr ((counter ohm-counter) &optional increment)
Generic Function: index (list index)

Returns the element with INDEX from LIST.

Package

cl-ohm.

Source

ohm-list.lisp.

Methods
Method: index ((list ohm-list) (index integer))
Generic Function: last (list)

Returns the last element of the LIST.

Package

cl-ohm.

Source

ohm-list.lisp.

Methods
Method: last ((list ohm-list))
Generic Function: list-ids (collection &optional start stop)

Returns the IDs stored in COLLECTION.

Package

cl-ohm.

Source

ohm-list.lisp.

Methods
Method: list-ids ((list ohm-list) &optional start stop)
Generic Function: member (collection element)

Checks if ELEMENT is a member of COLLECTION.

Package

cl-ohm.

Source

ohm-collection.lisp.

Methods
Method: member ((set ohm-set) (element ohm-object))
Source

ohm-set.lisp.

Method: member ((list ohm-list) (element ohm-object))
Source

ohm-list.lisp.

Method: member :before ((collection ohm-collection) (element ohm-object))
Generic Function: object-key (object &rest segments)

Creates a persistence key for OBJECT.

Package

cl-ohm.

Source

cl-ohm.lisp.

Methods
Method: object-key :before ((object ohm-object) &rest segments)
Method: object-key ((object ohm-object) &rest segments)
Generic Reader: ohm-id (object)
Package

cl-ohm.

Methods
Reader Method: ohm-id ((ohm-object ohm-object))

automatically generated reader method

Source

ohm-object.lisp.

Target Slot

id.

Generic Function: pop (list)

Removes and returns an the right outermost element from the LIST.

Package

cl-ohm.

Source

ohm-list.lisp.

Methods
Method: pop ((list ohm-list))
Generic Function: pop-left (list)

Removes and returns the left outermost element of the LIST.

Package

cl-ohm.

Source

ohm-list.lisp.

Methods
Method: pop-left ((list ohm-list))
Generic Function: range (list start stop)

Returns a sublist of LIST from START to STOP.

Package

cl-ohm.

Source

ohm-list.lisp.

Methods
Method: range ((list ohm-list) (start integer) (stop integer))
Generic Function: remove (collection element)

Removes ELEMENT from the COLLECTION.

Package

cl-ohm.

Source

ohm-collection.lisp.

Methods
Method: remove ((set ohm-set) (element ohm-object))
Source

ohm-set.lisp.

Method: remove ((list ohm-list) (element ohm-object))
Source

ohm-list.lisp.

Method: remove :before ((collection ohm-collection) (element ohm-object))
Generic Function: replace (collection new-elements)

Replaces the COLLECTION’s elements with NEW-ELEMENTS.

Package

cl-ohm.

Source

ohm-collection.lisp.

Methods
Method: replace ((set ohm-set) new-elements)
Source

ohm-set.lisp.

Method: replace ((list ohm-list) new-elements)
Source

ohm-list.lisp.

Method: replace :before ((collection ohm-collection) new-elements)
Generic Function: save (object)

Saves an object into the data store.

Package

cl-ohm.

Source

cl-ohm.lisp.

Methods
Method: save :before ((object ohm-object))
Method: save ((object ohm-object))
Generic Function: set-ids (set)

Returns the IDs contained in SET.

Package

cl-ohm.

Source

ohm-set.lisp.

Methods
Method: set-ids ((set ohm-set))
Generic Function: size (collection)

Returns the number of elements in the COLLECTION.

Package

cl-ohm.

Source

ohm-collection.lisp.

Methods
Method: size ((set ohm-set))
Source

ohm-set.lisp.

Method: size ((list ohm-list))
Source

ohm-list.lisp.

Generic Function: sort (set &key desc alpha start end by get store)

Sorts the SET.

Package

cl-ohm.

Source

ohm-set.lisp.

Methods
Method: sort ((set ohm-set) &key desc alpha start end by get store)
Generic Function: sort-by (set key &key desc alpha start end get store)

Sorts the objects in SET by it’s property KEY.

Package

cl-ohm.

Source

ohm-set.lisp.

Methods
Method: sort-by ((set ohm-set) key &key desc alpha start end get store)
Generic Function: union (set1 set2)

Union two sets. ARGS are used for FILTER.

Package

cl-ohm.

Source

ohm-set.lisp.

Methods
Method: union ((set1 ohm-set) (set2 ohm-set))

5.1.4 Standalone methods

Method: compute-effective-slot-definition ((class ohm-class) name dslotds)
Package

sb-mop.

Source

mop.lisp.

Method: direct-slot-definition-class ((class ohm-class) &rest initargs)
Package

sb-mop.

Source

mop.lisp.

Method: effective-slot-definition-class ((class ohm-class) &rest initargs)
Package

sb-mop.

Source

mop.lisp.

Method: initialize-instance :after ((instance ohm-object) &key)
Source

ohm-object.lisp.

Method: print-object ((object ohm-object) stream)
Source

ohm-object.lisp.

Method: validate-superclass ((class ohm-class) (superclass standard-class))
Package

sb-mop.

Source

mop.lisp.


5.1.5 Conditions

Condition: ohm-missing-id-error
Package

cl-ohm.

Source

conditions.lisp.

Direct superclasses

ohm-error.

Condition: ohm-no-index-found-error
Package

cl-ohm.

Source

conditions.lisp.

Direct superclasses

ohm-error.

Direct methods

attribute.

Direct slots
Slot: attribute
Initargs

:attribute

Readers

attribute.

Writers

This slot is read-only.

Condition: ohm-unique-constraint-violation
Package

cl-ohm.

Source

conditions.lisp.

Direct superclasses

ohm-error.

Direct methods

value.

Direct slots
Slot: value
Initargs

:value

Readers

value.

Writers

This slot is read-only.


5.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.1 Special variables

Special Variable: *class-indices*

Mapping of which class defined which indices.

Package

cl-ohm.

Source

cl-ohm.lisp.

Special Variable: *commands*

Command mappings.

Package

cl-ohm.

Source

ohm-set-algebra.lisp.

Special Variable: *connection-parameters*
Package

cl-ohm.

Source

connection.lisp.

Special Variable: *default-connection-parameters*
Package

cl-ohm.

Source

connection.lisp.

Special Variable: *global-object-counter*
Package

cl-ohm.

Source

cl-ohm.lisp.


5.2.2 Macros

Macro: assert-same-type (type1 type2)
Package

cl-ohm.

Source

ohm-set.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.3 Ordinary functions

Function: access (list pop-func &rest args)

Returns an object if pop-func delivers an id.

Package

cl-ohm.

Source

ohm-list.lisp.

Function: check-uniques (object)

Checks for constraints on object properties.

Package

cl-ohm.

Source

cl-ohm.lisp.

Function: command (expr)
Package

cl-ohm.

Source

ohm-set-algebra.lisp.

Function: compile-expr (expr)
Package

cl-ohm.

Source

ohm-set-algebra.lisp.

Function: convert-expr (expr)
Package

cl-ohm.

Source

ohm-set-algebra.lisp.

Function: create-indices (object)

Create indices for attributes with :indexp t.

Package

cl-ohm.

Source

cl-ohm.lisp.

Function: ensure-id (object)
Package

cl-ohm.

Source

cl-ohm.lisp.

Function: execute (expr)
Package

cl-ohm.

Source

ohm-set-algebra.lisp.

Function: explain (expr)
Package

cl-ohm.

Source

ohm-set-algebra.lisp.

Function: fetch (namespace ids)

Loads objects from the data store.

Package

cl-ohm.

Source

ohm-object.lisp.

Function: fetch-one (namespace id)

Load one object from the data store.

Package

cl-ohm.

Source

ohm-object.lisp.

Function: generic-set-operation (set1 set2 op)
Package

cl-ohm.

Source

ohm-set.lisp.

Function: keys (namespace ids)

Makes a list of keys for the given NAMESPACE and IDS.

Package

cl-ohm.

Source

ohm-object.lisp.

Function: make-key (&rest segments)
Package

cl-ohm.

Source

cl-ohm.lisp.

Function: make-sort-key (set attribute)

Creates a sort key for the element type of SET. ATTRIBUTE can either be a keyword, symbol or string.

Package

cl-ohm.

Source

ohm-set.lisp.

Function: map-attributes (class-name attributes)

Generates as list of index keys from ATTRIBUTES.

Package

cl-ohm.

Source

cl-ohm.lisp.

Function: map-indices (class-name attribute value)

Creates a list of index key for ATTRIBUTE and VALUE.

Package

cl-ohm.

Source

cl-ohm.lisp.

Function: normalize-plist (plist)

Creates a proper plist of the given TUPLE.

Package

cl-ohm.

Source

ohm-object.lisp.

Function: object->plist (object)

Creates a plist of OBJECT’s attributes.

Package

cl-ohm.

Source

ohm-object.lisp.

Function: onep (number)

Checks if NUMBER is equal to 1.

Package

cl-ohm.

Source

utils.lisp.

Function: plist->object (class-name plist)

Creates an instance of CLASS-NAME with initargs found in plist.

Package

cl-ohm.

Source

ohm-object.lisp.

Function: remove-uniques (object)
Package

cl-ohm.

Source

cl-ohm.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.4 Generic functions

Generic Reader: attribute (condition)
Package

cl-ohm.

Methods
Reader Method: attribute ((condition ohm-no-index-found-error))
Source

conditions.lisp.

Target Slot

attribute.

Generic Reader: counter-key (object)
Package

cl-ohm.

Methods
Reader Method: counter-key ((ohm-counter ohm-counter))

automatically generated reader method

Source

ohm-counter.lisp.

Target Slot

key.

Generic Reader: counter-name (object)
Package

cl-ohm.

Methods
Reader Method: counter-name ((ohm-counter ohm-counter))

automatically generated reader method

Source

ohm-counter.lisp.

Target Slot

name.

Generic Reader: counterp (object)
Generic Writer: (setf counterp) (object)
Package

cl-ohm.

Methods
Reader Method: counterp ((ohm-slot-definition-mixin ohm-slot-definition-mixin))
Writer Method: (setf counterp) ((ohm-slot-definition-mixin ohm-slot-definition-mixin))

Defines an attribute as counter.

Source

mop.lisp.

Target Slot

counterp.

Generic Reader: element-type (object)
Generic Writer: (setf element-type) (object)
Package

cl-ohm.

Methods
Reader Method: element-type ((ohm-slot-definition-mixin ohm-slot-definition-mixin))
Writer Method: (setf element-type) ((ohm-slot-definition-mixin ohm-slot-definition-mixin))

Specifies the element type for lists or sets.

Source

mop.lisp.

Target Slot

element-type.

Reader Method: element-type ((ohm-collection ohm-collection))

automatically generated reader method

Source

ohm-collection.lisp.

Target Slot

element-type.

Generic Reader: indexp (object)
Generic Writer: (setf indexp) (object)
Package

cl-ohm.

Methods
Reader Method: indexp ((ohm-slot-definition-mixin ohm-slot-definition-mixin))
Writer Method: (setf indexp) ((ohm-slot-definition-mixin ohm-slot-definition-mixin))

Creates an index for this slot if indexp is T.

Source

mop.lisp.

Target Slot

indexp.

Generic Reader: key (object)
Package

cl-ohm.

Methods
Reader Method: key ((ohm-collection ohm-collection))

automatically generated reader method

Source

ohm-collection.lisp.

Target Slot

key.

Generic Reader: list-attr-p (object)
Generic Writer: (setf list-attr-p) (object)
Package

cl-ohm.

Methods
Reader Method: list-attr-p ((ohm-slot-definition-mixin ohm-slot-definition-mixin))
Writer Method: (setf list-attr-p) ((ohm-slot-definition-mixin ohm-slot-definition-mixin))

Defines an attribute as list.

Source

mop.lisp.

Target Slot

list-attr-p.

Generic Reader: set-attr-p (object)
Generic Writer: (setf set-attr-p) (object)
Package

cl-ohm.

Methods
Reader Method: set-attr-p ((ohm-slot-definition-mixin ohm-slot-definition-mixin))
Writer Method: (setf set-attr-p) ((ohm-slot-definition-mixin ohm-slot-definition-mixin))

Defines an attribute as set.

Source

mop.lisp.

Target Slot

set-attr-p.

Generic Reader: uniquep (object)
Generic Writer: (setf uniquep) (object)
Package

cl-ohm.

Methods
Reader Method: uniquep ((ohm-slot-definition-mixin ohm-slot-definition-mixin))
Writer Method: (setf uniquep) ((ohm-slot-definition-mixin ohm-slot-definition-mixin))

Indicates that values stored in this attribute must be unique between all instances.

Source

mop.lisp.

Target Slot

uniquep.

Generic Reader: value (condition)
Package

cl-ohm.

Methods
Reader Method: value ((condition ohm-unique-constraint-violation))
Source

conditions.lisp.

Target Slot

value.


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.5 Conditions

Condition: ohm-error
Package

cl-ohm.

Source

conditions.lisp.

Direct superclasses

error.

Direct subclasses

Previous: , Up: Internals   [Contents][Index]

5.2.6 Classes

Class: ohm-class
Package

cl-ohm.

Source

mop.lisp.

Direct superclasses

standard-class.

Direct methods
Class: ohm-collection
Package

cl-ohm.

Source

ohm-collection.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: key
Initargs

:key

Readers

key.

Writers

This slot is read-only.

Slot: element-type
Initargs

:element-type

Readers

element-type.

Writers

This slot is read-only.

Class: ohm-counter
Package

cl-ohm.

Source

ohm-counter.lisp.

Direct methods
Direct slots
Slot: name
Initargs

:name

Readers

counter-name.

Writers

This slot is read-only.

Slot: key
Initargs

:key

Readers

counter-key.

Writers

This slot is read-only.

Class: ohm-direct-slot-definition
Package

cl-ohm.

Source

mop.lisp.

Direct superclasses
Class: ohm-effective-slot-definition
Package

cl-ohm.

Source

mop.lisp.

Direct superclasses
Class: ohm-list
Package

cl-ohm.

Source

ohm-list.lisp.

Direct superclasses

ohm-collection.

Direct methods
Class: ohm-object
Package

cl-ohm.

Source

ohm-object.lisp.

Direct methods
Direct slots
Slot: id
Initargs

:id

Readers

ohm-id.

Writers

This slot is read-only.

Class: ohm-set
Package

cl-ohm.

Source

ohm-set.lisp.

Direct superclasses

ohm-collection.

Direct methods
Class: ohm-slot-definition-mixin
Package

cl-ohm.

Source

mop.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: indexp

Creates an index for this slot if indexp is T.

Initargs

:indexp

Readers

indexp.

Writers

(setf indexp).

Slot: uniquep

Indicates that values stored in this attribute must be unique between all instances.

Initargs

:uniquep

Readers

uniquep.

Writers

(setf uniquep).

Slot: counterp

Defines an attribute as counter.

Initargs

:counterp

Readers

counterp.

Writers

(setf counterp).

Slot: list-attr-p

Defines an attribute as list.

Initargs

:list-attr-p

Readers

list-attr-p.

Writers

(setf list-attr-p).

Slot: set-attr-p

Defines an attribute as set.

Initargs

:set-attr-p

Readers

set-attr-p.

Writers

(setf set-attr-p).

Slot: element-type

Specifies the element type for lists or sets.

Initargs

:element-type

Readers

element-type.

Writers

(setf element-type).


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   C   D   E   F   G   I   K   L   M   N   O   P   R   S   U   V   W  
Index Entry  Section

(
(setf counterp): Private generic functions
(setf counterp): Private generic functions
(setf element-type): Private generic functions
(setf element-type): Private generic functions
(setf indexp): Private generic functions
(setf indexp): Private generic functions
(setf list-attr-p): Private generic functions
(setf list-attr-p): Private generic functions
(setf set-attr-p): Private generic functions
(setf set-attr-p): Private generic functions
(setf uniquep): Private generic functions
(setf uniquep): Private generic functions

A
access: Private ordinary functions
add: Public generic functions
add: Public generic functions
add: Public generic functions
add: Public generic functions
add-left: Public generic functions
add-left: Public generic functions
add-left: Public generic functions
assert-same-type: Private macros
attribute: Private generic functions
attribute: Private generic functions

C
check-uniques: Private ordinary functions
class-key: Public generic functions
class-key: Public generic functions
combine: Public generic functions
combine: Public generic functions
command: Private ordinary functions
compile-expr: Private ordinary functions
compute-effective-slot-definition: Public standalone methods
convert-expr: Private ordinary functions
counter: Public generic functions
counter: Public generic functions
counter-key: Private generic functions
counter-key: Private generic functions
counter-name: Private generic functions
counter-name: Private generic functions
counterp: Private generic functions
counterp: Private generic functions
create: Public ordinary functions
create-indices: Private ordinary functions

D
decr: Public generic functions
decr: Public generic functions
define-ohm-model: Public macros
del: Public generic functions
del: Public generic functions
del: Public generic functions
direct-slot-definition-class: Public standalone methods

E
effective-slot-definition-class: Public standalone methods
element-type: Private generic functions
element-type: Private generic functions
element-type: Private generic functions
elements: Public generic functions
elements: Public generic functions
elements: Public generic functions
ensure-id: Private ordinary functions
except: Public generic functions
except: Public generic functions
execute: Private ordinary functions
explain: Private ordinary functions

F
fetch: Private ordinary functions
fetch-one: Private ordinary functions
filter: Public ordinary functions
filter-id: Public generic functions
filter-id: Public generic functions
filter-id: Public generic functions
filter-with: Public ordinary functions
find-id: Public generic functions
find-id: Public generic functions
find-id: Public generic functions
first: Public generic functions
first: Public generic functions
flush-db: Public ordinary functions
Function, access: Private ordinary functions
Function, check-uniques: Private ordinary functions
Function, command: Private ordinary functions
Function, compile-expr: Private ordinary functions
Function, convert-expr: Private ordinary functions
Function, create: Public ordinary functions
Function, create-indices: Private ordinary functions
Function, ensure-id: Private ordinary functions
Function, execute: Private ordinary functions
Function, explain: Private ordinary functions
Function, fetch: Private ordinary functions
Function, fetch-one: Private ordinary functions
Function, filter: Public ordinary functions
Function, filter-with: Public ordinary functions
Function, flush-db: Public ordinary functions
Function, generic-set-operation: Private ordinary functions
Function, keys: Private ordinary functions
Function, make-key: Private ordinary functions
Function, make-sort-key: Private ordinary functions
Function, map-attributes: Private ordinary functions
Function, map-indices: Private ordinary functions
Function, normalize-plist: Private ordinary functions
Function, object->plist: Private ordinary functions
Function, onep: Private ordinary functions
Function, plist->object: Private ordinary functions
Function, remove-uniques: Private ordinary functions
Function, setup-redis-connection: Public ordinary functions

G
Generic Function, (setf counterp): Private generic functions
Generic Function, (setf element-type): Private generic functions
Generic Function, (setf indexp): Private generic functions
Generic Function, (setf list-attr-p): Private generic functions
Generic Function, (setf set-attr-p): Private generic functions
Generic Function, (setf uniquep): Private generic functions
Generic Function, add: Public generic functions
Generic Function, add-left: Public generic functions
Generic Function, attribute: Private generic functions
Generic Function, class-key: Public generic functions
Generic Function, combine: Public generic functions
Generic Function, counter: Public generic functions
Generic Function, counter-key: Private generic functions
Generic Function, counter-name: Private generic functions
Generic Function, counterp: Private generic functions
Generic Function, decr: Public generic functions
Generic Function, del: Public generic functions
Generic Function, element-type: Private generic functions
Generic Function, elements: Public generic functions
Generic Function, except: Public generic functions
Generic Function, filter-id: Public generic functions
Generic Function, find-id: Public generic functions
Generic Function, first: Public generic functions
Generic Function, incr: Public generic functions
Generic Function, index: Public generic functions
Generic Function, indexp: Private generic functions
Generic Function, key: Private generic functions
Generic Function, last: Public generic functions
Generic Function, list-attr-p: Private generic functions
Generic Function, list-ids: Public generic functions
Generic Function, member: Public generic functions
Generic Function, object-key: Public generic functions
Generic Function, ohm-id: Public generic functions
Generic Function, pop: Public generic functions
Generic Function, pop-left: Public generic functions
Generic Function, range: Public generic functions
Generic Function, remove: Public generic functions
Generic Function, replace: Public generic functions
Generic Function, save: Public generic functions
Generic Function, set-attr-p: Private generic functions
Generic Function, set-ids: Public generic functions
Generic Function, size: Public generic functions
Generic Function, sort: Public generic functions
Generic Function, sort-by: Public generic functions
Generic Function, union: Public generic functions
Generic Function, uniquep: Private generic functions
Generic Function, value: Private generic functions
generic-set-operation: Private ordinary functions

I
incr: Public generic functions
incr: Public generic functions
index: Public generic functions
index: Public generic functions
indexp: Private generic functions
indexp: Private generic functions
initialize-instance: Public standalone methods

K
key: Private generic functions
key: Private generic functions
keys: Private ordinary functions

L
last: Public generic functions
last: Public generic functions
list-attr-p: Private generic functions
list-attr-p: Private generic functions
list-ids: Public generic functions
list-ids: Public generic functions

M
Macro, assert-same-type: Private macros
Macro, define-ohm-model: Public macros
Macro, with-connection: Public macros
Macro, with-transaction: Public macros
make-key: Private ordinary functions
make-sort-key: Private ordinary functions
map-attributes: Private ordinary functions
map-indices: Private ordinary functions
member: Public generic functions
member: Public generic functions
member: Public generic functions
member: Public generic functions
Method, (setf counterp): Private generic functions
Method, (setf element-type): Private generic functions
Method, (setf indexp): Private generic functions
Method, (setf list-attr-p): Private generic functions
Method, (setf set-attr-p): Private generic functions
Method, (setf uniquep): Private generic functions
Method, add: Public generic functions
Method, add: Public generic functions
Method, add: Public generic functions
Method, add-left: Public generic functions
Method, add-left: Public generic functions
Method, attribute: Private generic functions
Method, class-key: Public generic functions
Method, combine: Public generic functions
Method, compute-effective-slot-definition: Public standalone methods
Method, counter: Public generic functions
Method, counter-key: Private generic functions
Method, counter-name: Private generic functions
Method, counterp: Private generic functions
Method, decr: Public generic functions
Method, del: Public generic functions
Method, del: Public generic functions
Method, direct-slot-definition-class: Public standalone methods
Method, effective-slot-definition-class: Public standalone methods
Method, element-type: Private generic functions
Method, element-type: Private generic functions
Method, elements: Public generic functions
Method, elements: Public generic functions
Method, except: Public generic functions
Method, filter-id: Public generic functions
Method, filter-id: Public generic functions
Method, find-id: Public generic functions
Method, find-id: Public generic functions
Method, first: Public generic functions
Method, incr: Public generic functions
Method, index: Public generic functions
Method, indexp: Private generic functions
Method, initialize-instance: Public standalone methods
Method, key: Private generic functions
Method, last: Public generic functions
Method, list-attr-p: Private generic functions
Method, list-ids: Public generic functions
Method, member: Public generic functions
Method, member: Public generic functions
Method, member: Public generic functions
Method, object-key: Public generic functions
Method, object-key: Public generic functions
Method, ohm-id: Public generic functions
Method, pop: Public generic functions
Method, pop-left: Public generic functions
Method, print-object: Public standalone methods
Method, range: Public generic functions
Method, remove: Public generic functions
Method, remove: Public generic functions
Method, remove: Public generic functions
Method, replace: Public generic functions
Method, replace: Public generic functions
Method, replace: Public generic functions
Method, save: Public generic functions
Method, save: Public generic functions
Method, set-attr-p: Private generic functions
Method, set-ids: Public generic functions
Method, size: Public generic functions
Method, size: Public generic functions
Method, sort: Public generic functions
Method, sort-by: Public generic functions
Method, union: Public generic functions
Method, uniquep: Private generic functions
Method, validate-superclass: Public standalone methods
Method, value: Private generic functions

N
normalize-plist: Private ordinary functions

O
object->plist: Private ordinary functions
object-key: Public generic functions
object-key: Public generic functions
object-key: Public generic functions
ohm-id: Public generic functions
ohm-id: Public generic functions
onep: Private ordinary functions

P
plist->object: Private ordinary functions
pop: Public generic functions
pop: Public generic functions
pop-left: Public generic functions
pop-left: Public generic functions
print-object: Public standalone methods

R
range: Public generic functions
range: Public generic functions
remove: Public generic functions
remove: Public generic functions
remove: Public generic functions
remove: Public generic functions
remove-uniques: Private ordinary functions
replace: Public generic functions
replace: Public generic functions
replace: Public generic functions
replace: Public generic functions

S
save: Public generic functions
save: Public generic functions
save: Public generic functions
set-attr-p: Private generic functions
set-attr-p: Private generic functions
set-ids: Public generic functions
set-ids: Public generic functions
setup-redis-connection: Public ordinary functions
size: Public generic functions
size: Public generic functions
size: Public generic functions
sort: Public generic functions
sort: Public generic functions
sort-by: Public generic functions
sort-by: Public generic functions

U
union: Public generic functions
union: Public generic functions
uniquep: Private generic functions
uniquep: Private generic functions

V
validate-superclass: Public standalone methods
value: Private generic functions
value: Private generic functions

W
with-connection: Public macros
with-transaction: Public macros

Jump to:   (  
A   C   D   E   F   G   I   K   L   M   N   O   P   R   S   U   V   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
A   C   E   I   K   L   N   S   U   V  
Index Entry  Section

*
*class-indices*: Private special variables
*commands*: Private special variables
*connection-parameters*: Private special variables
*default-connection-parameters*: Private special variables
*global-object-counter*: Private special variables

A
attribute: Public conditions

C
counterp: Private classes

E
element-type: Private classes
element-type: Private classes

I
id: Private classes
indexp: Private classes

K
key: Private classes
key: Private classes

L
list-attr-p: Private classes

N
name: Private classes

S
set-attr-p: Private classes
Slot, attribute: Public conditions
Slot, counterp: Private classes
Slot, element-type: Private classes
Slot, element-type: Private classes
Slot, id: Private classes
Slot, indexp: Private classes
Slot, key: Private classes
Slot, key: Private classes
Slot, list-attr-p: Private classes
Slot, name: Private classes
Slot, set-attr-p: Private classes
Slot, uniquep: Private classes
Slot, value: Public conditions
Special Variable, *class-indices*: Private special variables
Special Variable, *commands*: Private special variables
Special Variable, *connection-parameters*: Private special variables
Special Variable, *default-connection-parameters*: Private special variables
Special Variable, *global-object-counter*: Private special variables

U
uniquep: Private classes

V
value: Public conditions

Jump to:   *  
A   C   E   I   K   L   N   S   U   V  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   F   M   O   P   S   U  
Index Entry  Section

C
cl-ohm: The cl-ohm system
cl-ohm: The cl-ohm package
cl-ohm.asd: The cl-ohm/cl-ohm․asd file
cl-ohm.lisp: The cl-ohm/cl-ohm․lisp file
Class, ohm-class: Private classes
Class, ohm-collection: Private classes
Class, ohm-counter: Private classes
Class, ohm-direct-slot-definition: Private classes
Class, ohm-effective-slot-definition: Private classes
Class, ohm-list: Private classes
Class, ohm-object: Private classes
Class, ohm-set: Private classes
Class, ohm-slot-definition-mixin: Private classes
Condition, ohm-error: Private conditions
Condition, ohm-missing-id-error: Public conditions
Condition, ohm-no-index-found-error: Public conditions
Condition, ohm-unique-constraint-violation: Public conditions
conditions.lisp: The cl-ohm/conditions․lisp file
connection.lisp: The cl-ohm/connection․lisp file

F
File, cl-ohm.asd: The cl-ohm/cl-ohm․asd file
File, cl-ohm.lisp: The cl-ohm/cl-ohm․lisp file
File, conditions.lisp: The cl-ohm/conditions․lisp file
File, connection.lisp: The cl-ohm/connection․lisp file
File, mop.lisp: The cl-ohm/mop․lisp file
File, ohm-collection.lisp: The cl-ohm/ohm-collection․lisp file
File, ohm-counter.lisp: The cl-ohm/ohm-counter․lisp file
File, ohm-list.lisp: The cl-ohm/ohm-list․lisp file
File, ohm-object.lisp: The cl-ohm/ohm-object․lisp file
File, ohm-set-algebra.lisp: The cl-ohm/ohm-set-algebra․lisp file
File, ohm-set.lisp: The cl-ohm/ohm-set․lisp file
File, package.lisp: The cl-ohm/package․lisp file
File, utils.lisp: The cl-ohm/utils․lisp file

M
mop.lisp: The cl-ohm/mop․lisp file

O
ohm-class: Private classes
ohm-collection: Private classes
ohm-collection.lisp: The cl-ohm/ohm-collection․lisp file
ohm-counter: Private classes
ohm-counter.lisp: The cl-ohm/ohm-counter․lisp file
ohm-direct-slot-definition: Private classes
ohm-effective-slot-definition: Private classes
ohm-error: Private conditions
ohm-list: Private classes
ohm-list.lisp: The cl-ohm/ohm-list․lisp file
ohm-missing-id-error: Public conditions
ohm-no-index-found-error: Public conditions
ohm-object: Private classes
ohm-object.lisp: The cl-ohm/ohm-object․lisp file
ohm-set: Private classes
ohm-set-algebra.lisp: The cl-ohm/ohm-set-algebra․lisp file
ohm-set.lisp: The cl-ohm/ohm-set․lisp file
ohm-slot-definition-mixin: Private classes
ohm-unique-constraint-violation: Public conditions

P
Package, cl-ohm: The cl-ohm package
package.lisp: The cl-ohm/package․lisp file

S
System, cl-ohm: The cl-ohm system

U
utils.lisp: The cl-ohm/utils․lisp file

Jump to:   C   F   M   O   P   S   U