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)
- 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')"¶
- 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
- dbName = 'maxdb'¶
- 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.
- schemes = ['maxdb']¶
- supportTransactions = True¶