sqlobject.maxdb.maxdbconnection module

Contributed by Edigram SAS, Paris France Tel:01 44 77 94 00 Ahmed MOHAMED ALI <ahmedmoali@yahoo.com> 27 April 2004

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

connection creation sample:

__connection__ = DBConnection.maxdbConnection(
    host=hostname, database=dbname,
    user=user_name, password=user_password, autoCommit=1, debug=1)
exception sqlobject.maxdb.maxdbconnection.IncorrectIDStyleError(value)[source]

Bases: sqlobject.maxdb.maxdbconnection.maxdbException

exception sqlobject.maxdb.maxdbconnection.LowerBoundOfSliceIsNotSupported(value)[source]

Bases: sqlobject.maxdb.maxdbconnection.maxdbException

class sqlobject.maxdb.maxdbconnection.MaxdbConnection(host='', port=None, user=None, password=None, database=None, autoCommit=1, sqlmode='internal', isolation=None, timeout=None, **kw)[source]

Bases: sqlobject.dbconnection.DBAPI

GET_COLUMNS = "\n SELECT COLUMN_NAME, NULLABLE, DATA_DEFAULT, DATA_TYPE,\n DATA_LENGTH, DATA_SCALE\n FROM USER_TAB_COLUMNS WHERE TABLE_NAME=UPPER('%s')"
GET_PK_AND_FK = "\n SELECT constraint_cols.column_name, constraints.constraint_type,\n refname,reftablename\n FROM user_cons_columns constraint_cols\n INNER JOIN user_constraints constraints\n ON constraint_cols.constraint_name = constraints.constraint_name\n LEFT OUTER JOIN show_foreign_key fk\n ON constraint_cols.column_name = fk.columnname\n WHERE constraints.table_name =UPPER('%s')"
addColumn(tableName, column)[source]
columnsFromSchema(tableName, soClass)[source]
createColumn(soClass, col)[source]
createIDColumn(soClass)[source]
createIndexSQL(soClass, index)[source]
createReferenceConstraint(soClass, col)[source]
createSequenceName(table)[source]

sequence name are builded with the concatenation of the table name with ‘_SEQ’ word we truncate the name of the sequence_name because sapdb identifier cannot exceed 32 characters so that the name of the sequence does not exceed 32 characters

createTable(soClass)[source]
dbName = 'maxdb'
delColumn(sqlmeta, column)[source]
dropTable(tableName, cascade=False)[source]
guessClass(t, flength, fscale=None)[source]

An internal method that tries to figure out what Col subclass is appropriate given whatever introspective information is available – both very database-specific.

joinSQLType(join)[source]
makeConnection()[source]
schemes = ['maxdb']
classmethod sqlAddLimit(query, limit)[source]
supportTransactions = True
tableExists(tableName)[source]
exception sqlobject.maxdb.maxdbconnection.PrimaryKeyNotFounded(value)[source]

Bases: sqlobject.maxdb.maxdbconnection.maxdbException

exception sqlobject.maxdb.maxdbconnection.StyleMismatchError(value)[source]

Bases: sqlobject.maxdb.maxdbconnection.maxdbException

exception sqlobject.maxdb.maxdbconnection.maxdbException(value)[source]

Bases: exceptions.Exception