Package advene :: Package model :: Package backends :: Module sqlite :: Class _Query
[hide private]
[frames] | no frames]

Class _Query

source code

object --+
         |
        _Query

I provide useful functionalities for building SQL queries to the backend schema.

Instance Methods [hide private]
 
__init__(self, select, from_, where='WHERE 1', args=(), pid='e.package', eid='e.id')
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
add_package_filter(self, pid) source code
 
add_packages_filter(self, pids) source code
 
add_id_filter(self, id) source code
 
add_column_filter(self, column, value) source code
 
add_content_columns(self) source code
 
add_media_filter(self, media) source code
 
add_member_filter(self, member, ord=None) source code
 
add_item_filter(self, item, ord=None) source code
 
add_meta_filter(self, meta)
The meta parameter, is an iterable of triples of the form (key, value, uriref_flag).
source code
 
append(self, txt, *args)
Append something at the end of the query.
source code
 
wrap_in_count(self) source code
 
exe(self)
Return a list of arguments suitable to the ``execute`` methods.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, select, from_, where='WHERE 1', args=(), pid='e.package', eid='e.id')
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

add_meta_filter(self, meta)

source code 

The meta parameter, is an iterable of triples of the form (key, value, uriref_flag). If uriref_flag is false, the value is interpreted as a string; if it is true, the value is interpreted as the uri-ref of an element. Note that value can also be None. This parameter is used to filter elements that have the given (key, value) pair in their metadata (value set to None filtering elements having no value for the given key).

append(self, txt, *args)

source code 

Append something at the end of the query.

This should be used with care, and preferably just before call to exe, since it may break other methods (e.g. appending an ORDER BY statement).