Other api/dybdbi/dbictx

Table Of Contents

Previous topic

DybDbi.Ctx

Next topic

DybDbi.vld.versiondate

This Page

Daya Bay Links

Content Skeleton

DybDbi.DbiCtx

DbiCtx is a C++ class designed to facilitate DBI usage from python the DbiRpt and DbiWrt classes each contain an instance of DbiCtx

The DbiCtx instances have constituents corresponding to all possible arguments of all DBI reader and writer constructors:

  1. readers DbiResultPtr<T>, see databaseinterface:DbiResultPtr.h
  2. writers DbiWriter<T> see databaseinterface:DbiWriter.h

The precise constructor used is determined by the attribute settings made in the DbiCtx instance The attributes are divided into tables below according to recommended usage

When reading from DB

Attribute type notes
context DybDbi.Context composite setting
timestamp DybDbi.TimeStamp constituent of context
simflag   constituent of context
site   constituent of context
detectorid   constituent of context
subsite    
task    
dbno    
logcomment    
tablename   Expert Usage Only leave at default
aborttest   Expert Usage Only
findfulltimewindow   Expert Usage Only
sqlcontext   sqlcontext eg wideopen 1=1
datasql   datasql

sqlcontext

Replaces the validity context with the provided SQL where clause applied to the Validity table, for example the wideopen 1=1 caution this can be very memory expensive.

datasql

Applies the provided SQL where clause to the payload table

Expert Usage Only

Familiarity with the DBI implementation is required.

Use when writing to the DB

Attribute type notes
contextrange DybDbi.ContextRange  
timestart DybDbi.TimeStamp constituent of contextrange
timeend DybDbi.TimeStamp constituent of contextrange
sitemask   constituent of contextrange
simmask   constituent of contextrange
aggno   leave as default -1
task    
dbno    
logcomment    

Use with caution when reading from DB:

Attribute notes
datasql a payload where clause
tablename genDbi default usually ok
versiondate  

Usage only advised for experts familiar with DbiWriter<T> and DbiResultPtr<T> ctors

Attribute notes
seqno  
validityrec  
datafillopts  
dbname