Trees | Indices | Help |
---|
|
Helper for building create SQL commands.
FIX: add type checking - what did I mean by this???To Do: FIX - add a remove command to nuke a field
|
|||
|
__init__(self,
table,
dbType='postgres') Kick it off with no fields |
||
|
add(self,
field,
typeStr) Unchecked field. |
||
|
addPrimaryKey(self,
keyName='key') Add a primary key based on the field name. |
||
|
addInt(self,
field) SQL integer field |
||
|
addReal(self,
field) SQL floating point field |
||
|
addVarChar(self,
field,
length) SQL VARCHAR field... |
||
|
addBool(self,
field) SQL Boolean field |
||
|
addBitVarying(self,
field,
length) SQL Boolean field |
||
| addDecimal(self, field, precision=5, scale=0) | ||
|
addTimestamp(self,
field) SQL TIMESTAMP field |
||
|
addPostGIS(self,
field,
typeName,
dimension,
SRID='-1') Add a spatial column to the table using the OpenGIS AddGeometryColumn function using current schema: AddGeometryColumn(<table_name>, <column_name>, <srid>, <type>, <dimension>) @param field: Name of the field in the db table @param typeName: OpenGIS geometry type (e.g. |
||
str
|
__str__(self) Return the SQL string for the table creation |
|
Kick it off with no fields table - which table are we going to insert into |
Unchecked field. Provide the field and type all in one. Use this if nothing matches what you need. e.g.: create.add('corenumber','INTEGER') create.add('username','VARCHAR(40)') create.add('id','INTEGER PRIMARY KEY')
|
|
|
|
|
|
|
|
|
Add a spatial column to the table using the OpenGIS AddGeometryColumn function using current schema: AddGeometryColumn(<table_name>, <column_name>, <srid>, <type>, <dimension>) @param field: Name of the field in the db table @param typeName: OpenGIS geometry type (e.g. POINT) @param dimension: x,y would be 2 @type dimension: int @SRID: spatial referencing system identifier (FIX: give some more info!) |
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0alpha3 on Fri Feb 16 09:15:22 2007 | http://epydoc.sourceforge.net |