Package Pyblio :: Package Stores :: Package bsddbstore :: Class Database
[hide private]
[frames] | no frames]

Class Database

source code

        object --+    
                 |    
   Query.Queryable --+
                     |
        object --+   |
                 |   |
    Store.Database --+
                     |
        object --+   |
                 |   |
Callback.Publisher --+
                     |
                    Database

A Pyblio database stored in a Berkeley DB engine

Instance Methods [hide private]
 
__init__(self, path, schema=None, create=False, args={})
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_header_get(self) source code
 
_header_set(self, header, txn=None) source code
 
_schema_get(self) source code
 
_schema_set(self, schema, txn=None) source code
 
save(self) source code
 
add(self, val, key=None)
Insert a new entry in the database.
source code
 
__setitem__(self, key, val)
Update a record.
source code
 
__delitem__(self, key) source code
 
has_key(self, k)
Check for the existence of a key.
source code
 
_idxadd(self, id, val, txn) source code
 
_insert(self, key, val, txn) source code
 
_q_all(self) source code
 
_q_anyword(self, query) source code
 
_q_to_rs(self, res) source code
 
__getitem__(self, key)
Get a record by key.
source code
 
_entries_get(self)
Return the result set that contains _all_ the entries.
source code
 
index(self) source code

Inherited from Query.Queryable: count, query

Inherited from Query.Queryable (private): _q_check, _q_hasfield, _q_txo

Inherited from Store.Database: collate, validate, xmlread, xmlwrite

Inherited from Store.Database (private): _txo_get, _txo_warn

Inherited from Callback.Publisher: emit, register, unregister

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]

Inherited from Store.Database: rs

Properties [hide private]
  header
  schema
  entries
a resultset containing all the records of the database.

Inherited from Store.Database: txo

Inherited from object: __class__

Method Details [hide private]

__init__(self, path, schema=None, create=False, args={})
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: Store.Database.__init__

save(self)

source code 
Overrides: Store.Database.save

add(self, val, key=None)

source code 

Insert a new entry in the database.

New entries MUST be added with this method, not via an update with a hand-made Key.
Overrides: Store.Database.add
(inherited documentation)

__setitem__(self, key, val)
(Index assignment operator)

source code 

Update a record.

Updates a record with a new value.
Overrides: Store.Database.__setitem__
(inherited documentation)

has_key(self, k)

source code 
Check for the existence of a key.
Overrides: Store.Database.has_key
(inherited documentation)

_q_all(self)

source code 
Overrides: Query.Queryable._q_all

_q_anyword(self, query)

source code 
Overrides: Query.Queryable._q_anyword

_q_to_rs(self, res)

source code 
Overrides: Query.Queryable._q_to_rs

__getitem__(self, key)
(Indexing operator)

source code 
Get a record by key.
Overrides: Store.Database.__getitem__
(inherited documentation)

_entries_get(self)

source code 
Return the result set that contains _all_ the entries.
Overrides: Store.Database._entries_get
(inherited documentation)

Property Details [hide private]

header

Get Method:
Pyblio.Stores.bsddbstore.Database._header_get(self)
Set Method:
Pyblio.Stores.bsddbstore.Database._header_set(self, header, txn=None)

schema

Get Method:
Pyblio.Stores.bsddbstore.Database._schema_get(self)
Set Method:
Pyblio.Stores.bsddbstore.Database._schema_set(self, schema, txn=None)

entries

a resultset containing all the records of the database.
Get Method:
Pyblio.Stores.bsddbstore.Database._entries_get(self) - Return the result set that contains _all_ the entries.