Other api/dybdbi/ilookup

Previous topic

DybDbi.IRunLookup

Next topic

DybDbi.AdLogicalPhysical

This Page

Daya Bay Links

Content Skeleton

DybDbi.ILookup

class DybDbi.ILookup(*args, **kwa)

Bases: dict

Example of use:

il = ILookup( 10,100,1000, kls='GDaqRunInfo', ifield="runNo", iattr="RunNo" )
   #  corresponds to datasql WHERE clause :   runNo in (10,100,1000)
print il[10]

The positional arguments are used in datasql IN list, the query must result in the same number of entries as positional arguments. The iattr is needed as DybDbi attribute names are often different from fieldnames, this is used after the query with in memory lookup to arrange the results of the query by the argument values.

Effectively the positional arguments must behave like primary keys with each arg corresponding to one row.