Class SqliteStore
In: lib/storage/sqlitestore.rb
Parent: Store
SqliteStore
Store
TopLevel

The SqliteStore class manages access to all object storage.

db
is a handle to the database.
dbtop
stores the highest id used in the database.
cache
is a handle to the cache

Methods

check   close   delete   each   get   inspect   makenoswap   makeswap   mark   new   put   save   stats  

Public Class methods

Public Instance methods

Check if an object is in the database by its id.

oid
is the id to use in the search.
return
true or false

Close the database

return
Undefined.

Deletes an object from the database.

oid
is the id to to be deleted.
return
Undefined.

Iterate through all objects This needs to have all the possible keys first. So we need to fetch them from the cache and from the database and and produce a list of unique keys.

yield
Each object in database to block of caller.

Finds an object in the database by its id.

oid
is the id to use in the search.
return
Handle to the object or nil.

inspect the store cache (only for caches)

return
string

Marks an object nonswappable

oid
is the object id
return
undefined

Marks an object swappable

oid
is the object id
return
undefined

Marks an object dirty

oid
is the id to use in the search.
return
undefined

Adds a new object to the database.

obj
is a reference to object to be added
return
Undefined.

Save the world

return
Undefined.

produces a statistical report of the database

return
a string containing the report

[Validate]