dbfun Package¶
dbfun
Package¶
dbfun
Module¶
Abstract API for getting functions of data in a database
API define one attribute (input_names) and one method (evaluate)
dbfun_compute
Module¶
Created on Mon Oct 14 16:59:27 2013
@author: Thomas Schatz
Class for defining and computing efficiently functions of the columns of a database. Implements the DBfun API
-
class
ABXpy.dbfun.dbfun_compute.
DBfun_Compute
(definition, columns)[source]¶ Bases:
ABXpy.dbfun.dbfun.DBfun
dbfun_lookuptable
Module¶
Created on Mon Nov 25 00:24:42 2013
@author: Thomas Schatz
Implements the DBfun API Basic implementation of database function in lookup tables. Allows on-the-fly computation by storing script for DBfun_compute alongside the table. Allows to store outputs with h5 compatible dtypes either directly or under an indexed format Do not implement variable length outputs and requires that the entire lookup table fits in RAM memory.
-
class
ABXpy.dbfun.dbfun_lookuptable.
DBfun_LookupTable
(filename, synopsis=None, db=None, code=None, indexed=True)[source]¶ Bases:
ABXpy.dbfun.dbfun.DBfun
lookuptable_connector
Module¶
AST visitor class for finding calls to lookup table (.dbfun) files in a script and make the script ready for execution.
There is a restriction: when in a lookup table calling node, check that the node.code_nodes concatened of the children is empty: i.e. hierarchical calls to auxiliary h5 file are not allowed with a depth larger than 1. We could allow deeper calls, but would there be any practical benefit ? Probably not because the input to a lookup table call can only be of the type of a column of the database (at least with the current system).