Package grassyknoll :: Package backend :: Package litesql :: Module SqliteCollection :: Class SqliteCollectionReader
[hide private]

Class SqliteCollectionReader

source code


Instance Methods [hide private]
 
__init__(self, filename, table, cache_size=None, synchronous=None, cached_statements=100)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
list(self) source code
 
retrieve(self, ids, fields=None) source code
CollectionResultSet
andQuery(self, **kwargs)
find results where all fields match.
source code

Inherited from SqliteBase: __len__, close

Inherited from SqliteBase (private): _config_connection, _make_connection

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

Class Methods [hide private]

Inherited from lib.meta.FactoryMixin: factory

Class Variables [hide private]

Inherited from SqliteBase: logger

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, filename, table, cache_size=None, synchronous=None, cached_statements=100)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Parameters:
  • create (bool) - create the sqlite file if it doesn't exist
Overrides: SqliteBase.__init__

list(self)

source code 
Decorators:
  • @Collection.addMetaData
  • @rollback
Overrides: collection.DelegateCollection.CollectionReader.list

retrieve(self, ids, fields=None)

source code 
Decorators:
  • @Collection.addMetaData
  • @rollback
Overrides: collection.DelegateCollection.CollectionReader.retrieve

andQuery(self, **kwargs)

source code 

find results where all fields match.

kwargs is interepreted as field name => value to search for.

XXX this docstring sucks. I'm tired.

XXX injection attack!?! Maybe not, as the only unsafe SQL construction is from keyword arg names. Convienently, Python should disallow any possible injections.
Returns: CollectionResultSet
matching results
Decorators:
  • @Collection.addMetaData
  • @rollback