Base class for representing a database source.
This is the class to inherit from when you want to create
a general class to represent a specific type of database source
(ie. CGI scripts). When deriving, you must implement the
_rawget() function which takes a list of parameters and returns
results. These results might be a handle or any other kind of
result. You can optionally derive from _post_process() to do
any sort of clean-up on the data.
(XXX This should return a SeqFeature
object, me thinks, and only a handle if you don't know how to
parse the results that come back. Or something like that.)
Methods
|
|
|
|
__call_rawget
|
__call_rawget ( self, params )
|
|
__call_rawget_forked
|
__call_rawget_forked ( self, params )
|
|
__check_for_errors
|
__check_for_errors (
self,
handle,
more_failure_cases,
)
|
|
__do_post_processing
|
__do_post_processing ( self, results )
|
|
__init__
|
__init__ (
self,
name,
delay,
timeout,
doc,
failure_cases,
)
|
|
__serialize_rawget
|
__serialize_rawget ( self, params )
|
|
_post_process
|
_post_process ( self, results )
Can be hooked into by a derived class. Does nothing by default.
|
|
_rawget
|
_rawget ( self, params )
Exceptions
|
|
NotImplementedError, "Please implement in a derived class."
|
|
|
_rawset
|
_rawset (
self,
key,
handle,
)
Exceptions
|
|
NotImplementedError, "Caching not supported here."
|
|
|
get
|
get (
self,
params,
failure_cases=[],
)
|
|
set
|
set (
self,
key,
handle,
)
|
|