Package gensaschema :: Module _table :: Class Table
[frames] | no frames]

Class Table

source code

object --+
         |
        Table

Reflected table
Instance Methods
 
__init__(self, varname, table, schemas, symbols)
Initialization
source code
str
__repr__(self)
Make string representation
source code

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

Class Methods
Table
by_name(cls, name, varname, metadata, schemas, symbols, types=None)
Construct by name
source code
Static Methods
Table or TableReference
__new__(cls, varname, table, schemas, symbols)
Construct
source code
Class Variables
bool is_reference = False
Is it a table reference or a table?
Instance Variables
list constraints
Constraint list
sqlalchemy.Table sa_table
Table
str varname
Variable name
Properties

Inherited from object: __class__

Method Details

__new__(cls, varname, table, schemas, symbols)
Static Method

source code 

Construct

This might actually return a table reference

Parameters:
  • varname (str) - Variable name
  • table (sqlalchemy.Table) - Table
  • schemas (dict) - Schema -> module mapping
  • symbols (Symbols) - Symbol table
Returns: Table or TableReference
Table or TableReference instance
Overrides: object.__new__

__init__(self, varname, table, schemas, symbols)
(Constructor)

source code 
Initialization
Parameters:
  • varname (str) - Variable name
  • table (sqlalchemy.Table) - Table
  • schemas (dict) - Schema -> module mapping
  • symbols (Symbols) - Symbol table
Overrides: object.__init__

by_name(cls, name, varname, metadata, schemas, symbols, types=None)
Class Method

source code 
Construct by name
Parameters:
  • name (str) - Table name (possibly qualified)
  • varname (str) - Variable name of the table
  • metadata (SA (bound) metadata) - Metadata container
  • schemas (dict) - Schema -> module mapping
  • symbols (Symbols) - Symbol table
  • types (callable) - Extra type loader. If the type reflection fails, because SQLAlchemy cannot resolve it, the type loader will be called with the type name, (bound) metadata and the symbol table. It is responsible for modifying the symbols and imports and the dialect's ischema_names. If omitted or None, the reflector will always fail on unknown types.
Returns: Table
New Table instance

__repr__(self)
(Representation operator)

source code 
Make string representation
Returns: str
The string representation
Overrides: object.__repr__

Class Variable Details

is_reference

Is it a table reference or a table?
Type:
bool
Value:
False

Instance Variable Details

constraints

Constraint list
Type:
list

sa_table

Table
Type:
sqlalchemy.Table

varname

Variable name
Type:
str