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

Class Database

source code

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

Instance Methods [hide private]
 
__init__(self, schema=None, file=None, create=False)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_entries_get(self)
Return the result set that contains all the entries.
source code
 
add(self, record, key=None)
Insert a new entry in the database.
source code
 
__delitem__(self, k) source code
 
has_key(self, k)
Check for the existence of a key.
source code
 
__setitem__(self, key, value)
Update a record.
source code
 
__getitem__(self, key)
Get a record by key.
source code
 
save(self) source code
 
_idxadd(self, key, val) source code
 
_idxdel(self, key) source code
 
index(self)
Turn on indexing of the db content.
source code
 
_q_anyword(self, query) source code

Inherited from Query.Queryable: count, query

Inherited from Query.Queryable (private): _q_all, _q_check, _q_hasfield, _q_to_rs, _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]
  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, schema=None, file=None, create=False)
(Constructor)

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

_entries_get(self)

source code 
Return the result set that contains all the entries.
Overrides: Store.Database._entries_get

add(self, record, 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.

key is only useful for importing an existing database, by proposing a key choice.
Overrides: Store.Database.add

has_key(self, k)

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

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

source code 

Update a record.

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

__getitem__(self, key)
(Indexing operator)

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

save(self)

source code 
Overrides: Store.Database.save

_q_anyword(self, query)

source code 
Overrides: Query.Queryable._q_anyword

Property Details [hide private]

entries

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