Package gavo :: Package rsc :: Module table
[frames] | no frames]

Module table

source code

Tables, base and in memory.

Basically, a table consists of a list of dictionaries (the rows) and a table definition (resdef.TableDef).

You should, in general, not construct the tables directly but use the tables.TableForDef factory. The reason is that some classes ignore certain aspects of TableDefs (indices, uniqueForceness) or may not be what TableDef requires at all (onDisk). Arguably there should be different TableDefs for all these aspects, but then I'd have a plethora of TableDef elements, which I think is worse than a factory function.

Classes
  Error
  ColumnStat
Column statistics as exposed by Limits.
  Limits
Column statistics (min/max, values) for an in-memory table.
  BaseTable
is a container for row data.
  InMemoryTable
is a table kept in memory.
  InMemoryIndexedTable
is an InMemoryTable for a TableDef with a primary key.
  UniqueForcedTable
is an InMemoryTable with an enforced policy on duplicate primary keys.
Variables
  __package__ = 'gavo.rsc'