Package glue :: Package ligolw :: Module dbtables :: Class TimeSlideTable
[hide private]
[frames] | no frames]

Class TimeSlideTable

source code

     object --+                    
              |                    
 ligolw.Element --+                
                  |                
ligolw.EmptyElement --+            
                      |            
           ligolw.Table --+        
                          |        
             object --+   |        
                      |   |        
                   list --+        
                          |        
                table.Table --+    
                              |    
                        DBTable --+
                                  |
                                 TimeSlideTable

Nested Classes [hide private]
  RowType
Helpful parent class for row objects.

Inherited from table.Table: TableName

Instance Methods [hide private]
 
as_dict(self)
Return a ditionary mapping time slide IDs to offset dictionaries.
source code
 
get_time_slide_id(self, offsetdict, create_new=None, superset_ok=False, nonunique_ok=False)
Return the time_slide_id corresponding to the offset vector described by offsetdict, a dictionary of instrument/offset pairs.
source code

Inherited from DBTable: __init__, __iter__, __len__, append, applyKeyMapping, copy, maxrowid, row_from_cols, sync_next_id, unlink

Inherited from table.Table: appendColumn, appendRow, endElement, getColumnByName, removeChild, updateKeyMapping

Inherited from table.Table (private): _update_column_info, _verifyChildren

Inherited from ligolw.EmptyElement: appendData

Inherited from ligolw.Element: appendChild, end_tag, getAttribute, getChildrenByAttributes, getElements, getElementsByTagName, hasAttribute, insertBefore, removeAttribute, replaceChild, setAttribute, start_tag, write

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __le__, __lt__, __mul__, __ne__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, count, extend, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from table.Table: CheckElement, CheckProperties, getTablesByName, get_next_id, get_table, reset_next_id, set_next_id

Inherited from ligolw.Element: validattributes

Static Methods [hide private]

Inherited from DBTable: __new__

Class Variables [hide private]
  constraints = 'PRIMARY KEY (time_slide_id, instrument)'
hash(x)
  how_to_index = None
hash(x)
  next_id = <glue.ligolw.ilwd.time_slide_time_slide_id_class obj...
hash(x)
  tableName = 'time_slide'
  validcolumns = {'instrument': 'lstring', 'offset': 'real_8', '...
hash(x)

Inherited from table.Table: interncolumns, loadcolumns

Inherited from ligolw.Table: tagName, validchildren

Inherited from list: __hash__

Properties [hide private]

Inherited from table.Table: Name

Inherited from ligolw.Table: Type

Inherited from object: __class__

Method Details [hide private]

get_time_slide_id(self, offsetdict, create_new=None, superset_ok=False, nonunique_ok=False)

source code 

Return the time_slide_id corresponding to the offset vector described by offsetdict, a dictionary of instrument/offset pairs.

If the optional create_new argument is None (the default), then the table must contain a matching offset vector. The return value is the ID of that vector. If the table does not contain a matching offset vector then KeyError is raised.

If the optional create_new argument is set to a Process object (or any other object with a process_id attribute), then if the table does not contain a matching offset vector a new one will be added to the table and marked as having been created by the given process. The return value is the ID of the (possibly newly created) matching offset vector.

If the optional superset_ok argument is False (the default) then an offset vector in the table is considered to "match" the requested offset vector only if they contain the exact same set of instruments. If the superset_ok argument is True, then an offset vector in the table is considered to match the requested offset vector as long as it provides the same offsets for the same instruments as the requested vector, even if it provides offsets for other instruments as well.

More than one offset vector in the table might match the requested vector. If the optional nonunique_ok argument is False (the default), then KeyError will be raised if more than one offset vector in the table is found to match the requested vector. If the optional nonunique_ok is True then the return value is the ID of one of the matching offset vectors selected at random.


Class Variable Details [hide private]

next_id

hash(x)

Value:
<glue.ligolw.ilwd.time_slide_time_slide_id_class object at 0x7f3904171\
830>

validcolumns

hash(x)

Value:
{'instrument': 'lstring',
 'offset': 'real_8',
 'process_id': 'ilwd:char',
 'time_slide_id': 'ilwd:char'}