[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue-common/src/datasources GConnections.py GDa...
From: |
Jason Cater |
Subject: |
gnue-common/src/datasources GConnections.py GDa... |
Date: |
Tue, 25 Nov 2003 12:01:51 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue-common
Branch:
Changes by: Jason Cater <address@hidden> 03/11/25 12:01:47
Modified files:
src/datasources: GConnections.py GDataObjects.py GDataSource.py
src/datasources/drivers/Base: __init__.py
src/datasources/drivers/DBSIG2: __init__.py
src/datasources/drivers/adodbapi/adodbapi: __init__.py
src/datasources/drivers/appserver/appserver: __init__.py
src/datasources/drivers/db2/db2: __init__.py
src/datasources/drivers/dbf/dbf: __init__.py
src/datasources/drivers/gadfly/gadfly: __init__.py
src/datasources/drivers/informix/informix: __init__.py
src/datasources/drivers/ingres/ingres: __init__.py
src/datasources/drivers/interbase/interbase: __init__.py
src/datasources/drivers/mysql/mysql: __init__.py
src/datasources/drivers/odbc: __init__.py
src/datasources/drivers/odbc/wodbc: __init__.py
src/datasources/drivers/oracle/Base: __init__.py
src/datasources/drivers/oracle/cxoracle: Driver.py __init__.py
src/datasources/drivers/oracle/dcoracle: Driver.py __init__.py
src/datasources/drivers/postgresql/Base: __init__.py
src/datasources/drivers/postgresql/popy: Driver.py __init__.py
src/datasources/drivers/postgresql/psycopg: __init__.py
src/datasources/drivers/postgresql/pygresql: __init__.py
src/datasources/drivers/postgresql/pypgsql: Driver.py
__init__.py
src/datasources/drivers/sapdb/sapdb: __init__.py
src/datasources/drivers/special/configfile: __init__.py
src/datasources/drivers/special/static: Driver.py __init__.py
src/datasources/drivers/special/unbound: Driver.py __init__.py
src/datasources/drivers/sqlite/sqlite: __init__.py
src/datasources/drivers/sqlrelay/sqlrelay: __init__.py
src/datasources/drivers/sybase/sybase: __init__.py
Added files:
src/datasources: Exceptions.py GConnection.py GIntrospection.py
src/datasources/drivers: .cvsignore
src/datasources/drivers/Base: .cvsignore Connection.py
DataObject.py RecordSet.py
ResultSet.py
src/datasources/drivers/DBSIG2: .cvsignore Connection.py
DataObject.py RecordSet.py
ResultSet.py
src/datasources/drivers/adodbapi: .cvsignore
src/datasources/drivers/adodbapi/Schema/Discovery:
Introspection.py
src/datasources/drivers/adodbapi/adodbapi: .cvsignore
Connection.py
DataObject.py
src/datasources/drivers/appserver: .cvsignore
src/datasources/drivers/appserver/Schema/Discovery:
Introspection.py
src/datasources/drivers/appserver/appserver: Connection.py
DataObject.py
RecordSet.py
ResultSet.py
src/datasources/drivers/db2: .cvsignore
src/datasources/drivers/db2/Schema/Discovery: Introspection.py
src/datasources/drivers/db2/db2: .cvsignore Connection.py
src/datasources/drivers/dbf: .cvsignore
src/datasources/drivers/dbf/Schema/Discovery: Introspection.py
src/datasources/drivers/dbf/dbf: .cvsignore Connection.py
DataObject.py RecordSet.py
ResultSet.py
src/datasources/drivers/gadfly: .cvsignore
src/datasources/drivers/gadfly/Schema/Discovery:
Introspection.py
src/datasources/drivers/gadfly/gadfly: .cvsignore Connection.py
DataObject.py
RecordSet.py ResultSet.py
src/datasources/drivers/informix: .cvsignore
src/datasources/drivers/informix/Schema/Discovery:
Introspection.py
src/datasources/drivers/informix/informix: .cvsignore
Connection.py
DataObject.py
RecordSet.py
ResultSet.py
src/datasources/drivers/ingres: .cvsignore
src/datasources/drivers/ingres/Schema/Discovery:
Introspection.py
src/datasources/drivers/ingres/ingres: .cvsignore Connection.py
DataObject.py
RecordSet.py ResultSet.py
src/datasources/drivers/interbase: .cvsignore
src/datasources/drivers/interbase/Schema/Discovery:
Introspection.py
src/datasources/drivers/interbase/interbase: .cvsignore
Connection.py
DataObject.py
RecordSet.py
ResultSet.py
src/datasources/drivers/mysql: .cvsignore
src/datasources/drivers/mysql/Schema/Discovery: Introspection.py
src/datasources/drivers/mysql/mysql: .cvsignore Connection.py
DataObject.py RecordSet.py
ResultSet.py
src/datasources/drivers/odbc: .cvsignore
src/datasources/drivers/odbc/mxodbc: .cvsignore
src/datasources/drivers/odbc/wodbc: .cvsignore Connection.py
DataObject.py RecordSet.py
ResultSet.py
src/datasources/drivers/oracle: .cvsignore
src/datasources/drivers/oracle/Base: .cvsignore Connection.py
DataObject.py RecordSet.py
ResultSet.py
src/datasources/drivers/oracle/Schema/Discovery:
Introspection.py
src/datasources/drivers/oracle/dcoracle: .cvsignore
src/datasources/drivers/postgresql/Base: .cvsignore
Connection.py
DataObject.py
RecordSet.py
ResultSet.py
src/datasources/drivers/postgresql/Schema: .cvsignore
src/datasources/drivers/postgresql/Schema/Discovery: .cvsignore
Introspection.py
src/datasources/drivers/postgresql/popy: .cvsignore
src/datasources/drivers/postgresql/psycopg: .cvsignore
src/datasources/drivers/postgresql/pygresql: .cvsignore
src/datasources/drivers/postgresql/pypgsql: .cvsignore
src/datasources/drivers/sapdb: .cvsignore
src/datasources/drivers/sapdb/Schema/Discovery: Introspection.py
src/datasources/drivers/sapdb/sapdb: .cvsignore Connection.py
DataObject.py RecordSet.py
ResultSet.py
src/datasources/drivers/special: .cvsignore
src/datasources/drivers/special/static: .cvsignore
src/datasources/drivers/sqlite: .cvsignore
src/datasources/drivers/sqlite/Schema/Discovery:
Introspection.py
src/datasources/drivers/sqlite/sqlite: .cvsignore Connection.py
DataObject.py
RecordSet.py ResultSet.py
src/datasources/drivers/sqlrelay: .cvsignore
src/datasources/drivers/sqlrelay/sqlrelay: .cvsignore
Connection.py
DataObject.py
RecordSet.py
ResultSet.py
src/datasources/drivers/sybase/Schema/Discovery:
Introspection.py
src/datasources/drivers/sybase/sybase: Connection.py
DataObject.py
RecordSet.py ResultSet.py
Removed files:
src/datasources/drivers/adodbapi/adodbapi: Driver.py
src/datasources/drivers/db2/db2: Driver.py
src/datasources/drivers/dbf/dbf: Driver.py
src/datasources/drivers/gadfly/gadfly: Driver.py
src/datasources/drivers/informix/informix: Driver.py
src/datasources/drivers/ingres/ingres: Driver.py
src/datasources/drivers/interbase/interbase: Driver.py
src/datasources/drivers/odbc/mxodbc: Driver.py __init__.py
src/datasources/drivers/odbc/wodbc: Driver.py
src/datasources/drivers/oracle/Base: Driver.py
src/datasources/drivers/postgresql/Base: Driver.py
src/datasources/drivers/postgresql/psycopg: Driver.py
src/datasources/drivers/postgresql/pygresql: Driver.py
src/datasources/drivers/sapdb/sapdb: Driver.py
src/datasources/drivers/sqlite/sqlite: Driver.py
src/datasources/drivers/sqlrelay/sqlrelay: Driver.py
src/datasources/drivers/sybase/sybase: Driver.py
Log message:
Merged the datasource cleanup branch into CVS HEAD.
* Split GDataObjects into a Connection and a DataObject class,
separating connection logic and table query/update logic.
* Eliminated DataObject extensions (old logic is now part of the new
Connection class)
* Schema discovery code is now in its own class, instead of being part
of a DataObject
**** This may break some data drivers, so please test! ****
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/Exceptions.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/GConnection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/GIntrospection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/GConnections.py.diff?tr1=1.52&tr2=1.53&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/GDataObjects.py.diff?tr1=1.72&tr2=1.73&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/GDataSource.py.diff?tr1=1.64&tr2=1.65&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/Base/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/Base/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/Base/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/Base/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/Base/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/Base/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/DBSIG2/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/DBSIG2/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/DBSIG2/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/DBSIG2/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/DBSIG2/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/DBSIG2/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/adodbapi/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/adodbapi/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/adodbapi/adodbapi/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/adodbapi/adodbapi/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/adodbapi/adodbapi/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/adodbapi/adodbapi/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/appserver/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/appserver/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/appserver/appserver/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/appserver/appserver/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/appserver/appserver/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/appserver/appserver/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/appserver/appserver/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/db2/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/db2/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/db2/db2/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/db2/db2/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/db2/db2/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/dbf/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/dbf/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/dbf/dbf/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/dbf/dbf/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/dbf/dbf/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/dbf/dbf/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/dbf/dbf/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/dbf/dbf/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/gadfly/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/gadfly/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/gadfly/gadfly/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/gadfly/gadfly/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/gadfly/gadfly/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/gadfly/gadfly/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/gadfly/gadfly/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/gadfly/gadfly/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/informix/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/informix/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/informix/informix/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/informix/informix/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/informix/informix/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/informix/informix/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/informix/informix/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/informix/informix/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/ingres/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/ingres/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/ingres/ingres/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/ingres/ingres/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/ingres/ingres/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/ingres/ingres/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/ingres/ingres/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/ingres/ingres/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/interbase/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/interbase/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/interbase/interbase/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/interbase/interbase/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/interbase/interbase/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/interbase/interbase/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/interbase/interbase/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/interbase/interbase/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/mysql/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/mysql/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/mysql/mysql/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/mysql/mysql/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/mysql/mysql/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/mysql/mysql/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/mysql/mysql/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/mysql/mysql/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/odbc/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/odbc/__init__.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/odbc/mxodbc/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/odbc/wodbc/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/odbc/wodbc/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/odbc/wodbc/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/odbc/wodbc/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/odbc/wodbc/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/odbc/wodbc/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/Base/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/Base/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/Base/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/Base/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/Base/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/Base/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/cxoracle/Driver.py.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/cxoracle/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/dcoracle/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/dcoracle/Driver.py.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/oracle/dcoracle/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/Base/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/Base/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/Base/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/Base/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/Base/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/Base/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/Schema/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/Schema/Discovery/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/popy/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/popy/Driver.py.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/popy/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/psycopg/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/psycopg/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/pygresql/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/pygresql/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/pypgsql/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/pypgsql/Driver.py.diff?tr1=1.35&tr2=1.36&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/postgresql/pypgsql/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sapdb/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sapdb/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sapdb/sapdb/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sapdb/sapdb/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sapdb/sapdb/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sapdb/sapdb/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sapdb/sapdb/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sapdb/sapdb/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/special/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/special/configfile/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/special/static/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/special/static/Driver.py.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/special/static/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/special/unbound/Driver.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/special/unbound/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlite/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlite/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlite/sqlite/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlite/sqlite/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlite/sqlite/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlite/sqlite/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlite/sqlite/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlite/sqlite/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlrelay/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlrelay/sqlrelay/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlrelay/sqlrelay/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlrelay/sqlrelay/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlrelay/sqlrelay/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlrelay/sqlrelay/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sqlrelay/sqlrelay/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sybase/Schema/Discovery/Introspection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sybase/sybase/Connection.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sybase/sybase/DataObject.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sybase/sybase/RecordSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sybase/sybase/ResultSet.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/sybase/sybase/__init__.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gnue-common/src/datasources/GConnections.py
diff -c gnue-common/src/datasources/GConnections.py:1.52
gnue-common/src/datasources/GConnections.py:1.53
*** gnue-common/src/datasources/GConnections.py:1.52 Mon Mar 10 11:45:24 2003
--- gnue-common/src/datasources/GConnections.py Tue Nov 25 12:01:28 2003
***************
*** 33,39 ****
from ConfigParser import *
import sys, string, copy, netrc
from gnue.common.apps import GDebug
! from gnue.common.datasources import GDataObjects
from gnue.common.datasources import GLoginHandler
from gnue.common.datasources.drivers import DRIVERS as ALLDRIVERS
from gnue.common.utils.FileUtils import openResource, dyn_import
--- 33,39 ----
from ConfigParser import *
import sys, string, copy, netrc
from gnue.common.apps import GDebug
! from gnue.common.datasources import Exceptions
from gnue.common.datasources import GLoginHandler
from gnue.common.datasources.drivers import DRIVERS as ALLDRIVERS
from gnue.common.utils.FileUtils import openResource, dyn_import
***************
*** 56,62 ****
# in an unreadable format.
pass
! LoginError = GDataObjects.LoginError
class GConnections:
--- 56,62 ----
# in an unreadable format.
pass
! LoginError = Exceptions.LoginError
class GConnections:
***************
*** 182,202 ****
self._definitions[string.lower(name)] = copy.copy(parameters)
#
# Return a database provider object
#
def getDataObject(self, connection_name, connection_type):
# This will throw a GConnections.NotFoundError if an unknown
# connection name is specified. The calling method should
# catch this exception and handle it properly (exit w/message)
! return _load_dbdriver(
! self.getConnectionParameters(connection_name),
! connection_type, self)
#
# Has a connection been initialized/established?
#
def isConnectionActive(self, connection):
return self._openConnections.has_key(string.lower(connection))
--- 182,272 ----
self._definitions[string.lower(name)] = copy.copy(parameters)
+
+ def getConnection(self, connection_name, login=0):
+
+
+ connection_name = connection_name.lower()
+
+ try:
+ return self._openConnections[connection_name]
+ except KeyError:
+ pass
+
+ # Support for multiple open connections
+ # to same database.
+ # Specify as 'gnue:1', 'gnue:2', etc, to open
+ # two actual connections to 'gnue', each with
+ # their own transactions, etc.
+ connection_base = connection_name.split(':')[0]
+
+ # This will throw a GConnections.NotFoundError if an unknown
+ # connection name is specified. The calling method should
+ # catch this exception and handle it properly (exit w/message)
+
+ parameters = self.getConnectionParameters(connection_base)
+
+ driver = parameters['provider'].lower().replace('/','.')
+ behavior = parameters.get('behavior','').lower().replace('/','.')
+
+ try:
+ basedriver, extradriver =driver.split('.',1)
+ extradriver = "." + extradriver
+ except:
+ basedriver = driver
+ extradriver = ""
+
+ path = []
+
+ dbdriver = None
+
+ basemodule = _find_base_driver(basedriver, ALLDRIVERS)
+ GDebug.printMesg(1,'Using %s as base driver for %s' % (basemodule,
driver))
+
+ if basemodule:
+ dbdriver = _get_dbdriver(basemodule + extradriver)
+
+ if not dbdriver:
+ tmsg = _("No database driver found for provider type '%s'") % driver
+ raise Exceptions.ProviderNotSupportedError, tmsg
+
+
+ conn = dbdriver.Connection(self, connection_name, parameters)
+ self._openConnections[connection_name] = conn
+
+ if login:
+ self.loginToConnection(conn)
+
+ # TODO: Process the behavior = and
+ # TODO: set conn.behavior= to the
+ # TODO: specific Introspection class
+ return conn
+
+
#
# Return a database provider object
#
def getDataObject(self, connection_name, connection_type):
+
# This will throw a GConnections.NotFoundError if an unknown
# connection name is specified. The calling method should
# catch this exception and handle it properly (exit w/message)
! connection = self.getConnection(connection_name)
!
! try:
! dd = connection.supportedDataObjects[connection_type](connection)
! GDebug.printMesg (1,'Attaching to %s (%s)' % (dd.__class__.__name__,
connection_type))
! return dd
! except KeyError:
! tmsg = _("DB Driver '%s' does not support source type '%s'") %
(connection, connection_type)
! raise Exceptions.ObjectTypeNotAvailableError, tmsg
!
#
# Has a connection been initialized/established?
#
+ # TODO: this was likely broken
def isConnectionActive(self, connection):
return self._openConnections.has_key(string.lower(connection))
***************
*** 204,222 ****
#
# Get a data connection for a specified database
#
! def requestConnection(self, dataObject, connection):
! connection_name = string.lower(connection)
! if self._openConnections.has_key(connection_name):
!
! # If a database connetion has already been established, use it
! dataObject.setDataConnection(self._openConnections[connection_name])
! GDebug.printMesg(5,'Reusing data connection to %s' % connection_name)
- else:
! # Get the parameters from the Connections Definition File
! loginData = self.getConnectionParameters(connection_name)
try:
# load the user's netrc file:
# a sample .netrc could look like:
--- 274,306 ----
#
# Get a data connection for a specified database
#
! def requestConnection(self, dataObject):
!
! print """TODO: once this branch makes it into CVS head,
! eliminate the GConnections.requestConnection logic!"""
!
! # Support for multiple open connections
! # to same database.
! # Specify as 'gnue:1', 'gnue:2', etc, to open
! # two actual connections to 'gnue', each with
! # their own transactions, etc.
!
! self.loginToConnection(dataObject._connection)
! dataObject.connect()
! def loginToConnection(self, connection):
+ connection_name = connection.name
+ connection_base = connection_name.split(':')[0]
+
+ try:
+ connected = connection.__connected
+ except AttributeError:
+ connected = 0
+
+ if not connected:
+ loginData = connection.parameters
try:
# load the user's netrc file:
# a sample .netrc could look like:
***************
*** 229,235 ****
# set the HOME environement variable [SET HOME=...])
netrcData = netrc.netrc().authenticators(
! "'gnue://%s/'" % connection_name )
if netrcData!=None:
GDebug.printMesg(5, 'Read the user\'s .netrc file')
loginData['_username'] = netrcData[0][1:-1]
--- 313,319 ----
# set the HOME environement variable [SET HOME=...])
netrcData = netrc.netrc().authenticators(
! "'gnue://%s/'" % connection_base )
if netrcData!=None:
GDebug.printMesg(5, 'Read the user\'s .netrc file')
loginData['_username'] = netrcData[0][1:-1]
***************
*** 249,257 ****
# Load
if loginData.has_key('custom_auth'):
authenticator = dyn_import(loginData['custom_auth']).Authenticator()
! checkFields =
authenticator.getLoginFields(dataObject.getLoginFields())
else:
! checkFields = dataObject.getLoginFields()
authenticator = None
haveAllInformation = 1
--- 333,341 ----
# Load
if loginData.has_key('custom_auth'):
authenticator = dyn_import(loginData['custom_auth']).Authenticator()
! checkFields =
authenticator.getLoginFields(connection.getLoginFields())
else:
! checkFields = connection.getLoginFields()
authenticator = None
haveAllInformation = 1
***************
*** 261,278 ****
break
if haveAllInformation:
! try:
! self._authenticatedUsers[connection] = loginData['_username']
! except KeyError:
! self._authenticatedUsers[connection] = None
if authenticator:
! dataObject.connect(authenticator.login(loginData))
else:
! dataObject.connect(loginData)
! GDebug.printMesg(5, 'I had enough information to connect to %s
without asking the user' % connection_name)
! # Save the newly opened connection for future datasources
! self._openConnections[connection_name] =
dataObject.getDataConnection()
else:
attempts = 4
--- 345,359 ----
break
if haveAllInformation:
! # try:
! # self._authenticatedUsers[base] = loginData['_username']
! # except KeyError:
! # self._authenticatedUsers[base] = None
if authenticator:
! connection.connect(authenticator.login(loginData))
else:
! connection.connect(loginData)
else:
attempts = 4
***************
*** 286,293 ****
# Ask the UI to prompt for our login data
loginData.update(self._loginHandler.getLogin(
! [connection_name,
! self.getConnectionParameter(connection_name,'comment',''),
checkFields], errortext))
# Add to authenticated user list
--- 367,374 ----
# Ask the UI to prompt for our login data
loginData.update(self._loginHandler.getLogin(
! [connection_base,
! self.getConnectionParameter(connection_base,'comment',''),
checkFields], errortext))
# Add to authenticated user list
***************
*** 298,319 ****
# Ask the data object to connect to the database
if authenticator:
! dataObject.connect(authenticator.login(loginData))
else:
! dataObject.connect(loginData)
!
! # Save the newly opened connection for future datasources
! self._openConnections[connection_name] = \
! dataObject.getDataConnection()
# We're done!
attempts = 0
self._loginHandler.destroyLoginDialog()
! except GDataObjects.LoginError, error:
# Oops, they must have entered an invalid user/password.
# Those silly users.
# user: Hey! Who are you calling silly?!!!
attempts = attempts - 1
errortext = string.replace("%s" % error,'\n','')
self._loginHandler.destroyLoginDialog()
--- 379,397 ----
# Ask the data object to connect to the database
if authenticator:
! connection.connect(authenticator.login(loginData))
else:
! connection.connect(loginData)
# We're done!
attempts = 0
self._loginHandler.destroyLoginDialog()
! except Exceptions.LoginError, error:
# Oops, they must have entered an invalid user/password.
# Those silly users.
# user: Hey! Who are you calling silly?!!!
+ # Ok, then "those address@hidden users"
attempts = attempts - 1
errortext = string.replace("%s" % error,'\n','')
self._loginHandler.destroyLoginDialog()
***************
*** 322,334 ****
# Four times is plenty...
#self._loginHandler.destroyLoginDialog()
tmsg = _("Unable to log in after 4 attempts.\n\nError: %s") %
error
! raise GDataObjects.LoginError, tmsg
except GLoginHandler.UserCanceledLogin:
# Guess they changed their minds. Treat as a login error.
self._loginHandler.destroyLoginDialog()
tmsg = _("User canceled the login request.")
! raise GDataObjects.LoginError, tmsg
def getAuthenticatedUser(self, connection=None):
try:
--- 400,423 ----
# Four times is plenty...
#self._loginHandler.destroyLoginDialog()
tmsg = _("Unable to log in after 4 attempts.\n\nError: %s") %
error
! raise Exceptions.LoginError, tmsg
except GLoginHandler.UserCanceledLogin:
# Guess they changed their minds. Treat as a login error.
self._loginHandler.destroyLoginDialog()
tmsg = _("User canceled the login request.")
! raise Exceptions.LoginError, tmsg
!
! # Create the introspection instance
! try:
! behavior = connection.behavior
! except AttributeError:
! behavior = connection.defaultBehavior
! connection.introspector = behavior(connection)
!
! # Done
! connection.__connected = 1
!
def getAuthenticatedUser(self, connection=None):
try:
***************
*** 344,390 ****
#
# Load the correct DBdriver from gnue/common/datasources/drivers/*/
#
- def _load_dbdriver(parameters, type, connectionManager):
-
-
- driver = parameters['provider'].lower().replace('/','.')
- behavior = parameters.get('behavior','').lower().replace('/','.')
-
- d = driver.split('.')
- basedriver = d[0]
- if len(d) > 1:
- extradriver = "." + string.join(d[1:],'.')
- else:
- extradriver = ""
-
- path = []
-
- dbdriver = None
-
- basemodule = _find_base_driver(basedriver, ALLDRIVERS)
- GDebug.printMesg(1,'Using %s as base driver for %s' % (basemodule, driver))
-
- if basemodule:
- dbdriver = _get_dbdriver(basemodule + extradriver)
-
- if not dbdriver:
- tmsg = _("No database driver found for provider type '%s'") % driver
- raise GDataObjects.ProviderNotSupportedError, tmsg
-
- try:
- dd = dbdriver.supportedDataObjects[type]()
- GDebug.printMesg (1,'Attaching to %s (%s)' %
(driver,dd.__class__.__name__))
- return dd
- except KeyError:
- tmsg = _("DB Driver '%s' does not support source type '%s'") % (driver,
type)
- raise GDataObjects.ObjectTypeNotAvailableError, tmsg
-
def _find_base_driver (driver, modules, path=[]):
if driver in modules:
return 'gnue.common.datasources.drivers.' + string.join(path +
[driver],'.')
else:
for module in modules:
try:
m = dyn_import ('gnue.common.datasources.drivers.' + string.join(path
+ [module],'.')).DRIVERS
rs = _find_base_driver(driver, m, path + [module])
--- 433,445 ----
#
# Load the correct DBdriver from gnue/common/datasources/drivers/*/
#
def _find_base_driver (driver, modules, path=[]):
if driver in modules:
return 'gnue.common.datasources.drivers.' + string.join(path +
[driver],'.')
else:
for module in modules:
+ print "trying module: %s" % module
try:
m = dyn_import ('gnue.common.datasources.drivers.' + string.join(path
+ [module],'.')).DRIVERS
rs = _find_base_driver(driver, m, path + [module])
***************
*** 393,405 ****
except (AttributeError, ImportError), err:
pass
##print "Not in " + 'gnue.common.datasources.drivers.' +
string.join(path + [module],'.')
def _get_dbdriver (driver):
dbdriver = None
try:
! dbdriver = dyn_import("%s.Driver" % (driver))
except:
GDebug.printMesg(1,'%s is not a dbdriver' % ( driver))
try:
--- 448,463 ----
except (AttributeError, ImportError), err:
pass
##print "Not in " + 'gnue.common.datasources.drivers.' +
string.join(path + [module],'.')
+ except AdapterNotInstalled:
+ GDebug.printMesg(1,'%s does not have all dependencies installed' %
driver)
def _get_dbdriver (driver):
dbdriver = None
try:
! dbdriver = dyn_import("%s" % (driver))
! dbdriver.Connection
except:
GDebug.printMesg(1,'%s is not a dbdriver' % ( driver))
try:
***************
*** 410,415 ****
--- 468,475 ----
return dbdriver
except (ImportError, AttributeError):
GDebug.printMesg(1,'%s does not contain dbdrivers' % (driver))
+ except AdapterNotInstalled:
+ GDebug.printMesg(1,'%s does not have all dependencies installed' %
driver)
return dbdriver
Index: gnue-common/src/datasources/GDataObjects.py
diff -c gnue-common/src/datasources/GDataObjects.py:1.72
gnue-common/src/datasources/GDataObjects.py:1.73
*** gnue-common/src/datasources/GDataObjects.py:1.72 Tue Oct 7 09:02:51 2003
--- gnue-common/src/datasources/GDataObjects.py Tue Nov 25 12:01:28 2003
***************
*** 22,863 ****
# GDataObjects.py
#
# DESCRIPTION:
! # Class
#
# NOTES:
#
! # HISTORY:
#
! from gnue.common.apps import GDebug
! from gnue.common.datasources import GConditions
! import string
!
! postingRecordset = None
!
! class Error(StandardError):
! # Base exception
! pass
!
! class LoginError(Error):
! # Raised when invalid login user/pass was provided
! # Client should attempt to get better information and
! # try again
! pass
!
! class ConnectError(Error):
! # Raised when connection data is invalid (e.g., host not found, etc).
! # Client should probably not attempt to relogin. Exit gracefully
! # with a reason.
! pass
!
! class ProviderNotSupportedError(Error):
! # Raised when a datasource type is requested that the dbdriver
! # does not support (e.g., not all dbdrivers support raw sql mode.)
! pass
!
! class ObjectTypeNotAvailableError(Error):
! # Raised when a datasource type is requested that the dbdriver
! # does not support (e.g., not all dbdrivers support raw sql mode.)
! pass
!
! class ReadOnlyError(Error):
! # Raised when an attempt is made to update a read-only data object.
! pass
!
! class MasterDetailFieldMismatch(Error):
! # Raised when a the number of master fields doesn't match the
! # number of detail fields. (e.g., masterlink="id,subid"
! # and detaillink="id" would be a problem; must be 1:1)
! pass
!
! class ConnectionError(Error):
! # Generic error reading from the database connection
! pass
!
! class DataTypeNotAvailable(Error):
! # Raised when a datatype is not supported by an database
! # during writing a schema definition to the database
! pass
!
! class NoWriteSchemaSupport(Error):
! # Raised when a database adapter doesn't support
! # writing Schema to datasource
! pass
!
! class UnknownDataType(Error):
! # raised when an unknown datatype is passed to the database
! pass
!
!
! ###########################################################
! #
! #
! #
! ###########################################################
! class DataObject:
!
! def __init__(self):
! # Set by parser
! self.masterlink = ""
! self.detaillink = ""
!
! self._masterfields = []
! self._detailfields = []
! self._staticCondition = None
!
! self._masterObject = None
! self._detailObjects = []
! self._dataConnection = None
! self._resultSetClass = ResultSet
! self._fieldReferences = {} # Set by GDataSource; lists all fields
! # a client explicitly references
!
! self._unboundFieldReferences = {} # Contains names of all unbound
! # field references
!
! self._databaseEncoding = 'iso8859-1' # contain encoding used by database
!
! try:
! self._databaseEncoding = gConfig('textEncoding')
! except:
! pass
!
! self._unicodeMode = 0
!
! self._defaultValues = {}
! self.triggerExtensions = None
!
! # Do we have a master datasource?
! def hasMaster(self):
! return self._masterObject != None
!
! # Do not over-ride by vendor code
! def createResultSet(self, conditions={}, readOnly=0, masterRecordSet=None,
sql=""):
! return self._createResultSet(
! GConditions.combineConditions(conditions, self._staticCondition),
! readOnly=readOnly, masterRecordSet=masterRecordSet, sql=sql)
!
! # Designed to be replaced by vendor-specific code
! def _createResultSet(self, conditions={}, readOnly=0, masterRecordSet=None,
\
! sql=""):
! pass
!
! # Do not over-ride by vendor code
! def getQueryString(self,conditions={},forDetailSQL=None,additionalSQL=""):
! return self._buildQuery(conditions,forDetailSQL,additionalSQL)
!
! def createEmptyResultSet(self, readOnly=0, masterRecordSet=None):
! return self._createEmptyResultSet(readOnly, masterRecordSet)
!
! # Designed to be replaced by vendor-specific code
! def _createEmptyResultSet(self, readOnly=0, masterRecordSet=None):
! cond = GConditions.GCondition()
! ceq = GConditions.GCeq(cond)
! GConditions.GCConst(ceq,1,"number")
! GConditions.GCConst(ceq,0,"number")
! return self.createResultSet(conditions=cond, readOnly=readOnly,
! masterRecordSet=masterRecordSet)
!
!
! # Add a detail data object. This dataobject will create a new resultset
! # everytime this dataobject changes (new record, etc). The optional
! # handler will be called after the detail dataobject is notified. The
! # client application may wish to add a handler to know when the detail
! # has been requeried. handler is a method that takes two arguments:
! # the master ResultSet and the detail ResultSet
! def addDetailDataObject(self, dataObject, handler=None, **params):
!
! dataObject.__dict__.update(params)
!
! GDebug.printMesg (1,"Adding a master/detail relationship to DataObject")
! dataObject._masterObject = self
! dataObject._masterfields = string.split(hasattr(dataObject,'masterlink')
and \
! string.lower(dataObject.masterlink) or "",
',')
! dataObject._detailfields = string.split(hasattr(dataObject,'detaillink')
and \
! string.lower(dataObject.detaillink) or "",
',')
!
! if len(dataObject._masterfields) != len(dataObject._detailfields):
! tmsg = _("master=%s; detail=%s") % (dataObject._masterfields,
dataObject._detailfields)
! raise MasterDetailFieldMismatch, tmsg
!
! # Make sure "master" fields will be in our future query
! for field in dataObject._masterfields:
! self._fieldReferences[string.strip(field)] = ""
!
! for field in dataObject._detailfields:
! dataObject._fieldReferences[string.strip(field)] = ""
!
! self._detailObjects.append ([dataObject, handler])
!
!
! # Return a list of necessary login fields (e.g., user/pass).
! # Each list item is another list of ["field label", isPassword?]
! def getLoginFields(self):
! return []
!
!
! #
! # Connect to database. Design to be replaced by vendor-specific code.
! #
! # NOTE: This will only be called for the FIRST dataobject
! # using a particular connection. Any subsequent dataobjects
! # will only get setDataConnection() called. Therefore, any
! # routines that must be run for EACH dataobject after a connection
! # has been establisted should be placed in _postConnect(), not connect().
! #
! # As such, if the vendor-specific drivers replace this method, the last
! # line of the new method should be self._postConnect()!
! #
! def connect(self, connectData={}):
! self._postConnect()
!
!
! #
! # Post connection routines. Design to be replaced by vendor-specific code.
! #
! # NOTE: See note for connect()
! #
! def _postConnect(self):
! pass
!
!
! #
! # Set the associated data connection. Used by GConnections.
! # THERE IS NO NEED FOR VENDOR-CLASSES TO REPLACE THIS METHOD!
! #
! # NOTE: See note for connect()
! #
! def setDataConnection(self, connection):
! self._dataConnection = connection
! self._postConnect()
!
!
! def getDataConnection(self):
! return self._dataConnection
!
!
! def commit(self):
! pass
!
! def rollback(self):
! pass
!
!
! #
! # Schema (metadata) functions
! #
!
! # Return a list of the types of Schema objects this driver provides
! # Contains tuples of (key, description, dataSource??)
! # dataSource?? is true if this schema type can be a datasource
! def getSchemaTypes(self):
! return []
!
! # Return a list of Schema objects
! def getSchemaList(self, type=None):
! return []
!
! # Find a schema object with specified name
! def getSchemaByName(self, name, type=None):
! return None
!
! # write Schema to Database
! def writeSchema(self,obj,overwrite=0):
! tmsg = _("This database adapter doesn't have 'schema writing' support")
! raise NoWriteSchemaSupport, tmsg
!
! # Called when new record master in master/detail is queried
! def _masterRecordChanged(self, master):
! GDebug.printMesg (5, 'Master Record Changed')
! criteria = {}
!
! # If a detail result set has already been created for a particular
! # master record set, then just return/reuse this old set (after all,
! # it may contain uncommitted changes)
! if (not master.current._cachedDetailResultSets.has_key(self)) or \
! ( not int(gConfig('CacheDetailRecords')) and \
! not master.current._cachedDetailResultSets[self].isPending() ):
! doQuery = None
! for i in range(0, len(self._masterfields)):
! GDebug.printMesg(10,"Adding criteria")
! criteria[string.strip(self._detailfields[i])] = \
! master.current.getField(string.strip(self._masterfields[i]))
!
! #If all are set to None then this will prevent the details
! #from being queried. This happens are startup with blank master
! #datasources.
! doQuery = doQuery or
master.current.getField(string.strip(self._masterfields[i]))
!
! GDebug.printMesg(10,master.current.getField(self._masterfields[i]))
! if doQuery:
! master.current.addDetailResultSet(self.createResultSet(\
! conditions=criteria, masterRecordSet=master.current))
! else:
! master.current.addDetailResultSet(self.createEmptyResultSet())
! ## master.current._cachedDetailResultSets[self] = \
! ## self.createResultSet(conditions=criteria,
masterRecordSet=master.current)
! return master.current._cachedDetailResultSets[self]
!
!
! ###########################################################
! #
! #
! #
! ###########################################################
! class ResultSet:
!
! def __init__(self, dataObject,
cursor=None,defaultValues={},masterRecordSet=None):
! self._dataObject = dataObject
! self._recordSetClass = RecordSet
! self._cursor = cursor
! self._cachedRecords = []
! self._currentRecord = -1
! self._masterRecordSet = masterRecordSet
! self._readonly = 0
! self._recordCount = 0
! self._postingRecord = None
!
! self._defaultValues = {}
! self._defaultValues.update(defaultValues)
!
! self.current = None
!
! if masterRecordSet:
! masterRecordSet.addDetailResultSet(self)
!
! # Since we are overriding __len__
! def __nonzero__(self):
! return 1
!
! # Return the # of records
! def __len__(self):
! return self.getRecordCount()
!
! def __getitem__(self, index):
! rs = self.getRecord(index)
! if not rs:
! raise IndexError
! else:
! return rs
!
!
! # Returns whether this result set is read only or not
! def isReadOnly(self):
! return self._readonly
!
!
! # Returns 1=At first record, 0=Not first record
! def isFirstRecord(self):
! return (self._currentRecord == 0)
!
!
! # Returns 1=At last record, 0=Not last record
! def isLastRecord(self):
! if self._currentRecord < len(self._cachedRecords) - 1 or \
! self._cacheNextRecord():
! return 0
! else:
! return 1
!
!
! # returns -1=No records in memory, #=Current record #
! def getRecordNumber(self):
! return self._currentRecord
!
!
! # returns # of records currently loaded
! def getCacheCount(self):
! return len(self._cachedRecords)
!
! # returns # of records the
! def getRecordCount(self):
! return self._recordCount > 0 and self._recordCount or
self.getCacheCount()
!
! # Get a specific record (0=based)
! def getRecord(self, record):
! while (record + 1 > len(self._cachedRecords)) and self._cacheNextRecord():
! pass
!
! if record + 1 > len(self._cachedRecords):
! return None
! else:
! return self._cachedRecords[record]
!
!
! # move to record #, returns 1=New record loaded, 0=invalid #
! def setRecord(self, record):
!
! while (record > len(self._cachedRecords) -1) and self._cacheNextRecord():
! pass
!
! if record >= len(self._cachedRecords):
! return None
! else:
! self._currentRecord = record
! self.current = self._cachedRecords[self._currentRecord]
! self.notifyDetailObjects()
! return self.current
!
! # returns 1=New record loaded, 0=No more records
! def nextRecord(self):
! if self._currentRecord + 1 == len(self._cachedRecords):
! if not self._cacheNextRecord():
! return None
!
! self._currentRecord += 1
! self.current = self._cachedRecords[self._currentRecord]
! self.notifyDetailObjects()
! return self.current
!
!
! # returns 1=New record loaded, 0=At first record
! def prevRecord(self):
! if self._currentRecord < 1:
! return None
! else:
! self._currentRecord -= 1
! self.current = self._cachedRecords[self._currentRecord]
! self.notifyDetailObjects()
! return self.current
!
!
! # returns 1=at first record, 0=No records loaded
! def firstRecord(self):
! if self._currentRecord < 0:
! if not self._cacheNextRecord():
! return None
!
! self._currentRecord = 0
! self.current = self._cachedRecords[0]
! self.notifyDetailObjects()
! return self.current
!
!
!
! # returns 1=at last record, 0=No records loaded
! def lastRecord(self):
! if self._currentRecord == -1:
! return None
! else:
! while self._cacheNextRecord():
! pass
! self._currentRecord = len(self._cachedRecords) - 1
! self.current = self._cachedRecords[self._currentRecord]
! self.notifyDetailObjects()
! return self.current
!
!
!
! # Insert a blank record after the current record
! def insertRecord(self):
! if self.isReadOnly():
! # Provide better feedback??
! tmsg = _("Attempted to insert into a read only datasource")
! raise ReadOnlyError, tmsg
! else:
! GDebug.printMesg(7,'Inserting a blank record')
! self._currentRecord += 1
! self._cachedRecords.insert(self._currentRecord,
self._createEmptyRecord())
! self._recordCount += 1
! self.current = self._cachedRecords[self._currentRecord]
!
! # Set any dataobject-wide default values
! for field in self._dataObject._defaultValues.keys():
! self.current.setField(field, self._dataObject._defaultValues[field],0)
!
! # Set any resultset specific values
! for field in self._defaultValues.keys():
! self.current.setField(field, self._defaultValues[field],0)
!
! # Pull any primary keys from a master record set
! if self._masterRecordSet != None and hasattr(self._dataObject,
'_masterfields'):
! i = 0
! for field in self._dataObject._masterfields:
!
self.current.setField(self._dataObject._detailfields[i],self._masterRecordSet.getField(field),0)
! i += 1
!
! self.notifyDetailObjects()
! return self.current
!
!
! # Returns 1=DataObject, or a detail resultset, has uncommitted changes
! def isPending(self):
! for rec in (self._cachedRecords):
! if rec.isPending():
! return 1
! else:
! for detail in rec._cachedDetailResultSets.values():
! if detail.isPending():
! return 1
! return 0
!
!
! # Returns 1=DataObject has uncommitted changes
! def isRecordPending(self):
! return self.current.isPending()
!
!
! def getPostingRecordset(self):
! global postingRecordset
! print postingRecordset
! return postingRecordset
!
! # Post changes to the database
! def post(self, foreign_keys={}):
! global postingRecordset
! # post our changes
! self._update_cursor = self._dataObject._dataConnection.cursor()
!
! recordPosition = 0
! while recordPosition < len(self._cachedRecords):
! self._postingRecord = self._cachedRecords[recordPosition]
! postingRecordset = self._postingRecord
! delete = self._postingRecord._emptyFlag or
self._postingRecord._deleteFlag
! if not delete:
! # Flip the flag for 'default' values to true so that hidden
! # default fields are included in insert statements
! if self._postingRecord.isPending():
! for field in self._dataObject._defaultValues.keys():
! self._postingRecord._modifiedFlags[field] = 1
!
! for field in foreign_keys.keys():
! self._postingRecord._fields[field] = foreign_keys[field]
! # Some DBs will throw an exception if you update a Primary Key
! # (even if you are updating to the same value)
! if self._postingRecord._insertFlag:
! self._postingRecord._modifiedFlags[field] = 1
!
! recordPosition += 1
! else:
! # Adjust the current record if a preceding record
! # or the current record is deleted
! if recordPosition <= self._currentRecord:
! self._currentRecord -= 1
! self._cachedRecords.pop(recordPosition)
! self._recordCount -= 1
!
! self._postingRecord.post()
!
! # Move to record 0 if all preceding records were deleted
! # (or set to -1 if all records were deleted)
! if self._currentRecord < 0:
! if len(self._cachedRecords):
! self._currentRecord = 0
! else:
! self._currentRecord = -1
! # TODO: I don't think we need this anymore
! # if self._currentRecord >= self._recordCount:
! # self._currentRecord = self._recordCount - 1
!
! def notifyDetailObjects(self):
! GDebug.printMesg(5,'Master record changed; Notifying Detail Objects')
! for detail in self._dataObject._detailObjects:
! if detail[1]:
! detail[1].masterResultSetChanged(self,
! detail[0]._masterRecordChanged(self))
!
!
! # Returns 1=Field is bound to a database field
! def isFieldBound(self, fieldName):
! if self._dataObject._fieldReferences.has_key(fieldName):
! return 1
! else:
! #TODO: the string.lower() line should never be called but is left
! #TODO: here untill the code is cleaned up
! return
self._dataObject._fieldReferences.has_key(string.lower(fieldName))
!
!
! # Load cacheCount number of new records
! def _cacheNextRecord(self):
! rs = self._loadNextRecord()
! if rs:
! self._dataObject._dataSource._onRecordLoaded(self._cachedRecords[-1])
! return rs
!
!
!
! ###
! ### Methods below should be overridden by Vendor Specific functions
! ### (_createEmptyRecord may not need to be overridden in all cases)
! ###
!
! # Load cacheCount number of new records
! def _loadNextRecord(self):
! return 0
!
! # Create an empty recordset
! def _createEmptyRecord(self):
! return self._recordSetClass(self)
!
! # Iterator support (Python 2.2+)
! def __iter__(self):
! return _ResultSetIter(self)
!
!
! ###########################################################
! #
! #
! #
! ###########################################################
! class RecordSet:
!
! def __init__(self, parent, initialData={}, dbIdentifier=None,
defaultData={}):
! self._detailObjects = []
! self._dbIdentifier = dbIdentifier
! self._deleteFlag = 0
! self._updateFlag = 0
! self._parent = parent
! self._modifiedFlags = {} # If field name is present as a key,
! # then field has been modified
!
! self._cachedDetailResultSets = {}
!
! self._initialData = initialData
!
! if self._initialData and len(self._initialData):
! self._insertFlag = 0
! self._emptyFlag = 0
! self._fields = {}
! self._fields.update(initialData)
! else:
! self._insertFlag = 1
! self._emptyFlag = 1
! self._fields = {}
! self._fields.update(defaultData)
!
! def __setitem__(self, attr, val):
! self.setField(attr, val)
!
! def __getitem__(self, attr):
! return self.getField(attr)
!
! # Returns 1=Record has uncommitted changes
! def isPending(self):
!
! # The _insertFlag and _deleteFlag takes care of records that
! # were inserted, but then deleted before a save (i.e., nothing to do)
! if self._emptyFlag or self._insertFlag and self._deleteFlag:
! return 0
! else:
! return self._insertFlag or self._deleteFlag or self._updateFlag
!
!
! # Returns 1=Record is pending a deletion
! def isDeleted(self):
! if self._emptyFlag:
! return 0
! else:
! return self._deleteFlag and not self._insertFlag
!
!
! # Returns 1=Record is pending an update
! def isModified(self):
! if self._emptyFlag or self._insertFlag:
! return 0
! else:
! return self._updateFlag
!
!
! # Returns 1=Record is pending an insertion
! def isInserted(self):
! if self._emptyFlag:
! return 0
! else:
! return self._insertFlag and not self._deleteFlag
!
!
! # Returns 1=Record is empty (inserted, but no data set)
! def isEmpty(self):
! return self._emptyFlag
!
!
! # Returns current value of "field"
! def getField(self, field):
! try:
! return self._fields[field]
! except KeyError:
! try:
!
! # TODO: When we're confident that
! # TODO: all field names are lowercase,
! # TODO: then this can be removed.
!
! return self._fields[string.lower(field)]
! except KeyError:
! # If a field value has yet to be set
! # (either from a query or via a setField),
! # then _fields will not contain a key
! # for the requested field even though
! # the field name may still be valid.
! return None
!
!
! # Sets current value of "field"
! # If trackMod is set to 0 then the modification flag isn't raised
! def setField(self, field, value, trackMod = 1):
! # If this field is bound to a datasource and the datasource is read only,
! # generate an error.
! if self._parent.isFieldBound(field) and self._parent.isReadOnly():
! # Provide better feedback??
! tmsg = _("Attempted to modify read only field '%s'") % field
! raise ReadOnlyError, tmsg
! else:
! fn = string.lower(field)
! self._fields[fn] = value
! if trackMod == 1:
! if self._parent.isFieldBound(field):
! self._emptyFlag = 0
! self._updateFlag = 1
! self._modifiedFlags[fn] = 1
!
! try:
! self._parent._dataObject._dataSource._onModification(self)
! except AttributeError:
! pass
! return value
!
! # Batch mode of above setField method
! # If trackMod is set to 0 then the modification flag isn't raised
! def setFields(self, updateDict, trackMod = 1):
! # If this field is bound to a datasource and the datasource is read only,
! # generate an error.
! for field in updateDict.keys():
! self.setField(field, updateDict[field], trackMod)
!
!
! # Returns 1=Field has been modified
! def isFieldModified(self, fieldName):
! if self._modifiedFlags.has_key (fieldName):
! return 1
! else:
! #TODO: the string.lower() line should never be called but is left here
! #TODO: until the code is clean
! return self._modifiedFlags.has_key (string.lower(fieldName))
!
!
! # Mark the current record as deleted
! def delete(self):
! if self._parent.isReadOnly():
! # Provide better feedback??
! tmsg = _("Attempted to delete from a read only datasource")
! raise ReadOnlyError, tmsg
! else:
! self._deleteFlag = 1
!
!
! # Posts changes to database
! def post(self):
! # Should a post() to a read only datasource cause a ReadOnlyError?
! # It does no harm to attempt to post since nothing will be posted,
! # But does this allow sloppy programming?
!
! GDebug.printMesg(5,'Preparing to post datasource %s' %
self._parent._dataObject.name)
!
! # Save the initial status so we know if any triggers changed us
! status = (self._insertFlag, self._deleteFlag, self._updateFlag)
!
! # Call the hooks for commit-level hooks
! if not self._emptyFlag and
hasattr(self._parent._dataObject,'_dataSource'):
!
! if self._insertFlag and not self._deleteFlag:
! self._parent._dataObject._dataSource._beforeCommitInsert(self)
! elif self._deleteFlag and not self._insertFlag:
! self._parent._dataObject._dataSource._beforeCommitDelete(self)
! elif self._updateFlag:
! self._parent._dataObject._dataSource._beforeCommitUpdate(self)
!
! #
! # If the record status changed while we were doing the triggers,
! # start from the beginning and run the triggers again.
! #
! if status != (self._insertFlag, self._deleteFlag, self._updateFlag):
! self.post()
! return
!
!
! if self.isPending():
! GDebug.printMesg(5,'Posting datasource %s' %
self._parent._dataObject.name)
!
! if self.isPending():
! self._postChanges()
!
!
! # Post all detail records
! for child in (self._cachedDetailResultSets.keys()):
! c = self._cachedDetailResultSets[child]._dataObject
! # Set the primary key for any new child records
! fk = {}
! for i in range(len(c._masterfields)):
! fk[c._detailfields[i]] = self.getField(c._masterfields[i])
!
! self._cachedDetailResultSets[child].post(foreign_keys=fk)
!
!
! # Sets the ResultSet associated with this master record
! def addDetailResultSet(self, resultSet):
! self._cachedDetailResultSets[resultSet._dataObject] = resultSet
!
!
! ###
! ### Methods below should be over-written by Vendor Specific functions
! ###
!
! # Post any changes to database
! def _postChanges(self):
! return 1
# Used to store schema data
! class Schema:
! def __init__(self, attrs={}, getChildSchema=None):
! self.name = ''
! self.type = ''
! self.__dict__.update(attrs)
! if getChildSchema != None:
! self.getChildSchema = getChildSchema
!
! def __cmp__(self, other):
! if not isinstance(other, Schema):
! return 1
! elif id(other) == id(self):
! return 0
! else:
! return cmp(string.lower(self.name), string.lower(other.name)) or 1
!
! def getChildSchema(self, parent):
! return ()
!
!
!
! # A simple resultset iterator
! # Lets you use ResultSets as:
! #
! # for record in myResultSet:
! # blah
! #
! # NOTE: Python 2.2+ (but it won't get called in
! # Python 2.1 or below, so not a problem)
! #
! class _ResultSetIter:
! def __init__(self, resultset):
! self.resultset = resultset
! self.used = 0
! self.done = 0
!
! def __iter__(self):
! return self
!
! def next(self):
! if self.done:
! raise StopIteration
! if self.used:
! rs = self.resultset.firstRecord()
! else:
! rs = self.resultset.nextRecord()
!
! if not rs:
! raise StopIteration
! else:
! return rs
!
--- 22,39 ----
# GDataObjects.py
#
# DESCRIPTION:
! # This is a temporary backwards compatability file.
! # Should be removed at some point.
#
# NOTES:
#
! # TODO: Generate warnings whenever anything in this file is accessed.
#
! from Exceptions import *
! from drivers.Base import *
# Used to store schema data
! # TODO: Is this used anywhere??
! import string
Index: gnue-common/src/datasources/GDataSource.py
diff -c gnue-common/src/datasources/GDataSource.py:1.64
gnue-common/src/datasources/GDataSource.py:1.65
*** gnue-common/src/datasources/GDataSource.py:1.64 Mon Oct 6 16:25:42 2003
--- gnue-common/src/datasources/GDataSource.py Tue Nov 25 12:01:29 2003
***************
*** 37,43 ****
from gnue.common.formatting import GTypecast
from gnue.common.datasources import GConditions
-
########################################################################
#
# Class that handles DataSources. This is a subclass of GObj, which
--- 37,42 ----
***************
*** 106,112 ****
except AttributeError:
pass
try:
! # TODO: This **really** needs to be deprecated and
# TODO: should be using <sorting> tags
for field in string.split(self.order_by,','):
if field[-5:].lower() == ' desc':
--- 105,111 ----
except AttributeError:
pass
try:
! # TODO: This might be deprecated;
# TODO: should be using <sorting> tags
for field in string.split(self.order_by,','):
if field[-5:].lower() == ' desc':
***************
*** 177,194 ****
self._connections = connectionManager
def initialize(self):
if not self.connection:
! # We are a connectionless datasource (virtual?)
# We have to bind to something, so bind to empty or static driver
if not self.type=="static":
from gnue.common.datasources.drivers.special.unbound import Driver
GDebug.printMesg (7, 'Using empty data driver')
! dataObject = Driver.supportedDataObjects['object']()
else:
from gnue.common.datasources.drivers.special.static import Driver
GDebug.printMesg (7, 'Using static data driver')
! dataObject = Driver.supportedDataObjects['object']()
for child in self._children:
if isinstance(child, GStaticSet):
--- 176,194 ----
self._connections = connectionManager
def initialize(self):
+ print self.name
if not self.connection:
! # We are a connectionless datasource (virtual?)
# We have to bind to something, so bind to empty or static driver
if not self.type=="static":
from gnue.common.datasources.drivers.special.unbound import Driver
GDebug.printMesg (7, 'Using empty data driver')
! dataObject = Driver.supportedDataObjects['object'](None)
else:
from gnue.common.datasources.drivers.special.static import Driver
GDebug.printMesg (7, 'Using static data driver')
! dataObject = Driver.supportedDataObjects['object'](None)
for child in self._children:
if isinstance(child, GStaticSet):
***************
*** 241,253 ****
def connect(self):
if self.connection != None:
! self._connections.\
! requestConnection(self._dataObject, self.connection)
def getDataObject(self):
return self._dataObject
!
def referenceField(self, field, defaultValue=None):
GDebug.printMesg(7,'Field %s implicitly referenced' % field)
self._fieldReferences[field] = ""
--- 241,253 ----
def connect(self):
if self.connection != None:
! self._connections.requestConnection(self._dataObject)
!
def getDataObject(self):
return self._dataObject
!
def referenceField(self, field, defaultValue=None):
GDebug.printMesg(7,'Field %s implicitly referenced' % field)
self._fieldReferences[field] = ""
***************
*** 255,268 ****
if defaultValue != None:
self._defaultValues[field] = defaultValue
! def referenceFields(self, fields):
! for field in fields:
! if (type(field) == types.StringType) or \
! (type(field) == types.UnicodeType):
self.referenceField(field)
! else:
self.referenceField(*field)
!
def referenceUnboundField(self, field, defaultValue=None):
GDebug.printMesg(7,'Field %s implicitly referenced' % field)
self._unboundFieldReferences[field] = 1
--- 255,267 ----
if defaultValue != None:
self._defaultValues[field] = defaultValue
! def referenceFields(self, fields):
! for field in fields:
! if type(field) == types.StringType:
self.referenceField(field)
! else:
self.referenceField(*field)
!
def referenceUnboundField(self, field, defaultValue=None):
GDebug.printMesg(7,'Field %s implicitly referenced' % field)
self._unboundFieldReferences[field] = 1
***************
*** 554,560 ****
# Wrapper for standalone DataSources
# (i.e., not in context of a GObj tree)
#
! def DataSourceWrapper(connections=None, fields=(), attributes={}, init=1):
source = _DataSourceWrapper()
if connections:
--- 553,559 ----
# Wrapper for standalone DataSources
# (i.e., not in context of a GObj tree)
#
! def DataSourceWrapper(connections=None, fields=(), attributes={}, init=1,
unicodeMode=0):
source = _DataSourceWrapper()
if connections:
Index: gnue-common/src/datasources/drivers/Base/__init__.py
diff -c gnue-common/src/datasources/drivers/Base/__init__.py:1.1
gnue-common/src/datasources/drivers/Base/__init__.py:1.2
*** gnue-common/src/datasources/drivers/Base/__init__.py:1.1 Mon Feb 17
12:37:14 2003
--- gnue-common/src/datasources/drivers/Base/__init__.py Tue Nov 25
12:01:31 2003
***************
*** 0 ****
--- 1,32 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or (at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+ # FILE:
+ # Base/__init__.py
+ #
+ # DESCRIPTION:
+ #
+ # NOTES:
+ #
+
+ from Connection import Connection
+ from DataObject import DataObject
+ from ResultSet import ResultSet
+ from RecordSet import RecordSet
\ No newline at end of file
Index: gnue-common/src/datasources/drivers/DBSIG2/__init__.py
diff -c gnue-common/src/datasources/drivers/DBSIG2/__init__.py:1.1
gnue-common/src/datasources/drivers/DBSIG2/__init__.py:1.2
*** gnue-common/src/datasources/drivers/DBSIG2/__init__.py:1.1 Mon Feb 17
13:15:37 2003
--- gnue-common/src/datasources/drivers/DBSIG2/__init__.py Tue Nov 25
12:01:31 2003
***************
*** 0 ****
--- 1,25 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ from Connection import *
+ from DataObject import *
+ from ResultSet import *
+ from RecordSet import *
Index: gnue-common/src/datasources/drivers/adodbapi/adodbapi/__init__.py
diff -c gnue-common/src/datasources/drivers/adodbapi/adodbapi/__init__.py:1.1
gnue-common/src/datasources/drivers/adodbapi/adodbapi/__init__.py:1.2
*** gnue-common/src/datasources/drivers/adodbapi/adodbapi/__init__.py:1.1
Thu Aug 28 18:07:46 2003
--- gnue-common/src/datasources/drivers/adodbapi/adodbapi/__init__.py Tue Nov
25 12:01:32 2003
***************
*** 0 ****
--- 1,61 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("ADO-DB Data Driver for MS SQL-Server/Access")
+ __driverurl__ = "http://sourceforge.net/projects/adodbapi"
+
+ __doc__ = _("""
+ Supported attributes (via connections.conf or <database> tag)""") + """
+
+ oledb_provider (required)
+ data_source (required)
+ initial_catalog (optional for SQL Server)
+ network_library (optional for SQL Server)
+ data_provider (optional for SQL Server)""" + _("""
+
+ You can find more connection strings here:""") + """
+ http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm
+ """
+
+ __examples__ = """
+ [access]
+ comment = """ + _("MS Access database") + """
+ provider = adodbapi
+ oledb_provider = Microsoft.Jet.OLEDB.4.0
+ data_source = C:\mydb.mdb
+
+ [sqlserver]
+ comment = """ + _("MS SQL Server database") + """
+ provider = adodbapi
+ oledb_provider = sqloledb
+ data_source = myServerName
+ initial_catalog = myDatabaseName
+ """
+
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/appserver/appserver/__init__.py
diff -c gnue-common/src/datasources/drivers/appserver/appserver/__init__.py:1.1
gnue-common/src/datasources/drivers/appserver/appserver/__init__.py:1.2
*** gnue-common/src/datasources/drivers/appserver/appserver/__init__.py:1.1
Mon Feb 17 13:15:37 2003
--- gnue-common/src/datasources/drivers/appserver/appserver/__init__.py Tue Nov
25 12:01:32 2003
***************
*** 0 ****
--- 1,34 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("GNUe AppServer Data Driver")
+ __driverurl__ = "http://www.gnuenterprise.org/"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Connection import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/db2/db2/__init__.py
diff -c gnue-common/src/datasources/drivers/db2/db2/__init__.py:1.1
gnue-common/src/datasources/drivers/db2/db2/__init__.py:1.2
*** gnue-common/src/datasources/drivers/db2/db2/__init__.py:1.1 Mon Feb 17
13:15:37 2003
--- gnue-common/src/datasources/drivers/db2/db2/__init__.py Tue Nov 25
12:01:33 2003
***************
*** 0 ****
--- 1,40 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("IBM DB2 Data Driver")
+ __driverurl__ = "ftp://people.linuxkorea.co.kr/pub/DB2/"
+ __examples__ = ""
+
+ __doc__ = """
+ Supported attributes (via connections.conf or <database> tag)
+
+ service= This is the DB2 DSN for your connection (required)
+ """
+
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/dbf/dbf/__init__.py
diff -c gnue-common/src/datasources/drivers/dbf/dbf/__init__.py:1.1
gnue-common/src/datasources/drivers/dbf/dbf/__init__.py:1.2
*** gnue-common/src/datasources/drivers/dbf/dbf/__init__.py:1.1 Mon Feb 17
13:15:38 2003
--- gnue-common/src/datasources/drivers/dbf/dbf/__init__.py Tue Nov 25
12:01:33 2003
***************
*** 0 ****
--- 1,34 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("DBF File Data Driver")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/gadfly/gadfly/__init__.py
diff -c gnue-common/src/datasources/drivers/gadfly/gadfly/__init__.py:1.1
gnue-common/src/datasources/drivers/gadfly/gadfly/__init__.py:1.2
*** gnue-common/src/datasources/drivers/gadfly/gadfly/__init__.py:1.1 Mon Feb
17 13:15:38 2003
--- gnue-common/src/datasources/drivers/gadfly/gadfly/__init__.py Tue Nov
25 12:01:34 2003
***************
*** 0 ****
--- 1,34 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("Gadfly Data Driver")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/informix/informix/__init__.py
diff -c gnue-common/src/datasources/drivers/informix/informix/__init__.py:1.1
gnue-common/src/datasources/drivers/informix/informix/__init__.py:1.2
*** gnue-common/src/datasources/drivers/informix/informix/__init__.py:1.1
Mon Feb 17 13:15:38 2003
--- gnue-common/src/datasources/drivers/informix/informix/__init__.py Tue Nov
25 12:01:34 2003
***************
*** 0 ****
--- 1,34 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("Informix Data Driver")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/ingres/ingres/__init__.py
diff -c gnue-common/src/datasources/drivers/ingres/ingres/__init__.py:1.1
gnue-common/src/datasources/drivers/ingres/ingres/__init__.py:1.2
*** gnue-common/src/datasources/drivers/ingres/ingres/__init__.py:1.1 Mon Feb
17 13:15:38 2003
--- gnue-common/src/datasources/drivers/ingres/ingres/__init__.py Tue Nov
25 12:01:35 2003
***************
*** 0 ****
--- 1,34 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("Ingres Data Driver")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/interbase/interbase/__init__.py
diff -c gnue-common/src/datasources/drivers/interbase/interbase/__init__.py:1.1
gnue-common/src/datasources/drivers/interbase/interbase/__init__.py:1.2
*** gnue-common/src/datasources/drivers/interbase/interbase/__init__.py:1.1
Mon Feb 17 13:15:38 2003
--- gnue-common/src/datasources/drivers/interbase/interbase/__init__.py Tue Nov
25 12:01:37 2003
***************
*** 0 ****
--- 1,34 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("Interbase Data Driver")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/mysql/mysql/__init__.py
diff -c gnue-common/src/datasources/drivers/mysql/mysql/__init__.py:1.1
gnue-common/src/datasources/drivers/mysql/mysql/__init__.py:1.2
*** gnue-common/src/datasources/drivers/mysql/mysql/__init__.py:1.1 Mon Feb
17 13:15:38 2003
--- gnue-common/src/datasources/drivers/mysql/mysql/__init__.py Tue Nov 25
12:01:38 2003
***************
*** 0 ****
--- 1,33 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+ __description__ = _("MySQL Data Driver")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Connection import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/odbc/__init__.py
diff -c gnue-common/src/datasources/drivers/odbc/__init__.py:1.2
gnue-common/src/datasources/drivers/odbc/__init__.py:1.3
*** gnue-common/src/datasources/drivers/odbc/__init__.py:1.2 Tue Feb 18
09:59:25 2003
--- gnue-common/src/datasources/drivers/odbc/__init__.py Tue Nov 25
12:01:38 2003
***************
*** 1 ****
! DRIVERS=['mxodbc','wodbc']
--- 1 ----
! DRIVERS=['wodbc']
Index: gnue-common/src/datasources/drivers/odbc/wodbc/__init__.py
diff -c gnue-common/src/datasources/drivers/odbc/wodbc/__init__.py:1.1
gnue-common/src/datasources/drivers/odbc/wodbc/__init__.py:1.2
*** gnue-common/src/datasources/drivers/odbc/wodbc/__init__.py:1.1 Mon Feb
17 12:37:16 2003
--- gnue-common/src/datasources/drivers/odbc/wodbc/__init__.py Tue Nov 25
12:01:39 2003
***************
*** 0 ****
--- 1,34 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("Windows ODBC Data Driver")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/oracle/Base/__init__.py
diff -c gnue-common/src/datasources/drivers/oracle/Base/__init__.py:1.1
gnue-common/src/datasources/drivers/oracle/Base/__init__.py:1.2
*** gnue-common/src/datasources/drivers/oracle/Base/__init__.py:1.1 Mon Feb
17 12:37:16 2003
--- gnue-common/src/datasources/drivers/oracle/Base/__init__.py Tue Nov 25
12:01:40 2003
***************
*** 0 ****
--- 1,25 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ from Connection import *
+ from DataObject import *
+ from ResultSet import *
+ from RecordSet import *
Index: gnue-common/src/datasources/drivers/oracle/cxoracle/Driver.py
diff -c gnue-common/src/datasources/drivers/oracle/cxoracle/Driver.py:1.20
gnue-common/src/datasources/drivers/oracle/cxoracle/Driver.py:1.21
*** gnue-common/src/datasources/drivers/oracle/cxoracle/Driver.py:1.20 Fri May
16 11:17:58 2003
--- gnue-common/src/datasources/drivers/oracle/cxoracle/Driver.py Tue Nov
25 12:01:40 2003
***************
*** 36,43 ****
from gnue.common.apps import GDebug
from gnue.common.datasources import GDataObjects, GConnections
from gnue.common.datasources.drivers.DBSIG2.Driver \
! import DBSIG_RecordSet, DBSIG_ResultSet, DBSIG_DataObject, \
! DBSIG_DataObject_SQL, DBSIG_DataObject_Object
from gnue.common.datasources.drivers.oracle.Base.Driver import Oracle_Schema
--- 36,43 ----
from gnue.common.apps import GDebug
from gnue.common.datasources import GDataObjects, GConnections
from gnue.common.datasources.drivers.DBSIG2.Driver \
! import DBSIG2.RecordSet, DBSIG2.ResultSet, DBSIG2.DataObject, \
! DBSIG2.DataObject_SQL, DBSIG2.DataObject_Object
from gnue.common.datasources.drivers.oracle.Base.Driver import Oracle_Schema
***************
*** 48,68 ****
raise GConnections.AdapterNotInstalled, tmsg
! class Oracle_RecordSet(DBSIG_RecordSet):
pass
! class Oracle_ResultSet(DBSIG_ResultSet):
def __init__(self, dataObject, cursor=None, defaultValues={},
masterRecordSet=None):
! DBSIG_ResultSet.__init__(self, dataObject, \
cursor, defaultValues, masterRecordSet)
self._recordSetClass = Oracle_RecordSet
! class Oracle_DataObject(Oracle_Schema, DBSIG_DataObject):
def __init__(self):
Oracle_Schema.__init__(self)
! DBSIG_DataObject.__init__(self)
self._DatabaseError = SIG2api.DatabaseError
self._resultSetClass = Oracle_ResultSet
--- 48,68 ----
raise GConnections.AdapterNotInstalled, tmsg
! class Oracle_RecordSet(DBSIG2.RecordSet):
pass
! class Oracle_ResultSet(DBSIG2.ResultSet):
def __init__(self, dataObject, cursor=None, defaultValues={},
masterRecordSet=None):
! DBSIG2.ResultSet.__init__(self, dataObject, \
cursor, defaultValues, masterRecordSet)
self._recordSetClass = Oracle_RecordSet
! class Oracle_DataObject(Oracle_Schema, DBSIG2.DataObject):
def __init__(self):
Oracle_Schema.__init__(self)
! DBSIG2.DataObject.__init__(self)
self._DatabaseError = SIG2api.DatabaseError
self._resultSetClass = Oracle_ResultSet
***************
*** 85,91 ****
class Oracle_DataObject_Object(Oracle_DataObject, \
! DBSIG_DataObject_Object):
def __init__(self):
Oracle_DataObject.__init__(self)
--- 85,91 ----
class Oracle_DataObject_Object(Oracle_DataObject, \
! DBSIG2.DataObject_Object):
def __init__(self):
Oracle_DataObject.__init__(self)
***************
*** 93,99 ****
def _buildQuery(self, conditions={},forDetail=None,additionalSQL=""):
! return DBSIG_DataObject_Object._buildQuery(self,
conditions,forDetail,additionalSQL)
def _checkForPrimaryId(self):
--- 93,99 ----
def _buildQuery(self, conditions={},forDetail=None,additionalSQL=""):
! return DBSIG2.DataObject_Object._buildQuery(self,
conditions,forDetail,additionalSQL)
def _checkForPrimaryId(self):
***************
*** 115,129 ****
class Oracle_DataObject_SQL(Oracle_DataObject, \
! DBSIG_DataObject_SQL):
def __init__(self):
# Call DBSIG init first because Oracle_DataObject needs to overwrite
# some of its values
! DBSIG_DataObject_SQL.__init__(self)
Oracle_DataObject.__init__(self)
def _buildQuery(self, conditions={}):
! return DBSIG_DataObject_SQL._buildQuery(self, conditions)
--- 115,129 ----
class Oracle_DataObject_SQL(Oracle_DataObject, \
! DBSIG2.DataObject_SQL):
def __init__(self):
# Call DBSIG init first because Oracle_DataObject needs to overwrite
# some of its values
! DBSIG2.DataObject_SQL.__init__(self)
Oracle_DataObject.__init__(self)
def _buildQuery(self, conditions={}):
! return DBSIG2.DataObject_SQL._buildQuery(self, conditions)
Index: gnue-common/src/datasources/drivers/oracle/cxoracle/__init__.py
diff -c gnue-common/src/datasources/drivers/oracle/cxoracle/__init__.py:1.1
gnue-common/src/datasources/drivers/oracle/cxoracle/__init__.py:1.2
*** gnue-common/src/datasources/drivers/oracle/cxoracle/__init__.py:1.1 Mon Feb
17 13:15:38 2003
--- gnue-common/src/datasources/drivers/oracle/cxoracle/__init__.py Tue Nov
25 12:01:40 2003
***************
*** 0 ****
--- 1,43 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+ # FILE:
+ # cxoracle/__init__.py
+ #
+ # DESCRIPTION:
+ # Oracle implementation of dbdriver using Python DB-SIG v2
+ # specification.
+ #
+ # NOTES:
+ #
+
+ __description__ = _("CX_Oracle Data Driver for Oracle 7.3/8i/9i+ (OCI8)")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/oracle/dcoracle/Driver.py
diff -c gnue-common/src/datasources/drivers/oracle/dcoracle/Driver.py:1.24
gnue-common/src/datasources/drivers/oracle/dcoracle/Driver.py:1.25
*** gnue-common/src/datasources/drivers/oracle/dcoracle/Driver.py:1.24 Fri May
16 11:17:58 2003
--- gnue-common/src/datasources/drivers/oracle/dcoracle/Driver.py Tue Nov
25 12:01:40 2003
***************
*** 37,44 ****
from gnue.common.datasources import GDataObjects, GConditions, GConnections
from gnue.common.apps import GDebug
from gnue.common.datasources.drivers.DBSIG2.Driver \
! import DBSIG_RecordSet, DBSIG_ResultSet, DBSIG_DataObject, \
! DBSIG_DataObject_SQL, DBSIG_DataObject_Object
from gnue.common.datasources.drivers.oracle.Base.Driver import Oracle_Schema
--- 37,44 ----
from gnue.common.datasources import GDataObjects, GConditions, GConnections
from gnue.common.apps import GDebug
from gnue.common.datasources.drivers.DBSIG2.Driver \
! import DBSIG2.RecordSet, DBSIG2.ResultSet, DBSIG2.DataObject, \
! DBSIG2.DataObject_SQL, DBSIG2.DataObject_Object
from gnue.common.datasources.drivers.oracle.Base.Driver import Oracle_Schema
***************
*** 50,73 ****
! class Oracle_RecordSet(DBSIG_RecordSet):
! pass
- class Oracle_ResultSet(DBSIG_ResultSet):
- def __init__(self, dataObject, cursor=None, defaultValues={},
masterRecordSet=None):
- DBSIG_ResultSet.__init__(self, dataObject, \
- cursor, defaultValues, masterRecordSet)
- self._recordSetClass = Oracle_RecordSet
- self._uniqueIdField = "__GNUeF__uniqueKey_%s" % (self._dataObject.table)
- self._uniqueIdFormat = "ROWID='%s'"
!
!
! class Oracle_DataObject(Oracle_Schema, DBSIG_DataObject):
def __init__(self):
Oracle_Schema.__init__(self)
! DBSIG_DataObject.__init__(self)
self._DatabaseError = SIG2api.DatabaseError
self._resultSetClass = Oracle_ResultSet
--- 50,65 ----
! class Oracle_ResultSet(DBSIG2.ResultSet):
! _uniqueIdField = "__GNUeF__uniqueKey_%s" % (self._dataObject.table)
! _uniqueIdFormat = "ROWID='%s'"
! class Oracle_DataObject(DBSIG2.DataObject):
def __init__(self):
Oracle_Schema.__init__(self)
! DBSIG2.DataObject.__init__(self)
self._DatabaseError = SIG2api.DatabaseError
self._resultSetClass = Oracle_ResultSet
***************
*** 85,96 ****
if connectData.has_key('datetimeformat'):
self._dateTimeFormat = "'%s'" % connectData['datetimeformat']
- self._postConnect()
class Oracle_DataObject_Object(Oracle_DataObject, \
! DBSIG_DataObject_Object):
def __init__(self):
Oracle_DataObject.__init__(self)
--- 77,87 ----
if connectData.has_key('datetimeformat'):
self._dateTimeFormat = "'%s'" % connectData['datetimeformat']
class Oracle_DataObject_Object(Oracle_DataObject, \
! DBSIG2.DataObject_Object):
def __init__(self):
Oracle_DataObject.__init__(self)
***************
*** 98,104 ****
def _buildQuery(self, conditions={},forDetail=None,additionalSQL=""):
! return DBSIG_DataObject_Object._buildQuery(self, conditions, forDetail,
additionalSQL)
def _checkForPrimaryId(self):
--- 89,95 ----
def _buildQuery(self, conditions={},forDetail=None,additionalSQL=""):
! return DBSIG2.DataObject_Object._buildQuery(self, conditions, forDetail,
additionalSQL)
def _checkForPrimaryId(self):
***************
*** 120,134 ****
class Oracle_DataObject_SQL(Oracle_DataObject, \
! DBSIG_DataObject_SQL):
def __init__(self):
# Call DBSIG init first because Oracle_DataObject needs to overwrite
# some of its values
! DBSIG_DataObject_SQL.__init__(self)
Oracle_DataObject.__init__(self)
def _buildQuery(self, conditions={}):
! return DBSIG_DataObject_SQL._buildQuery(self, conditions)
--- 111,125 ----
class Oracle_DataObject_SQL(Oracle_DataObject, \
! DBSIG2.DataObject_SQL):
def __init__(self):
# Call DBSIG init first because Oracle_DataObject needs to overwrite
# some of its values
! DBSIG2.DataObject_SQL.__init__(self)
Oracle_DataObject.__init__(self)
def _buildQuery(self, conditions={}):
! return DBSIG2.DataObject_SQL._buildQuery(self, conditions)
Index: gnue-common/src/datasources/drivers/oracle/dcoracle/__init__.py
diff -c gnue-common/src/datasources/drivers/oracle/dcoracle/__init__.py:1.1
gnue-common/src/datasources/drivers/oracle/dcoracle/__init__.py:1.2
*** gnue-common/src/datasources/drivers/oracle/dcoracle/__init__.py:1.1 Mon Feb
17 13:15:38 2003
--- gnue-common/src/datasources/drivers/oracle/dcoracle/__init__.py Tue Nov
25 12:01:41 2003
***************
*** 0 ****
--- 1,43 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+ # FILE:
+ # dcoracle/__init__.py
+ #
+ # DESCRIPTION:
+ # Oracle implementation of dbdriver using Python DB-SIG v2
+ # specification.
+ #
+ # NOTES:
+ #
+
+ __description__ = _("DCOracle2 Data Driver for Oracle 7.3/8i/9i+ (OCI8)")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/postgresql/Base/__init__.py
diff -c gnue-common/src/datasources/drivers/postgresql/Base/__init__.py:1.1
gnue-common/src/datasources/drivers/postgresql/Base/__init__.py:1.2
*** gnue-common/src/datasources/drivers/postgresql/Base/__init__.py:1.1 Mon Feb
17 12:37:17 2003
--- gnue-common/src/datasources/drivers/postgresql/Base/__init__.py Tue Nov
25 12:01:42 2003
***************
*** 0 ****
--- 1,25 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ from Connection import *
+ from DataObject import *
+ from ResultSet import *
+ from RecordSet import *
Index: gnue-common/src/datasources/drivers/postgresql/popy/Driver.py
diff -c gnue-common/src/datasources/drivers/postgresql/popy/Driver.py:1.22
gnue-common/src/datasources/drivers/postgresql/popy/Driver.py:1.23
*** gnue-common/src/datasources/drivers/postgresql/popy/Driver.py:1.22 Mon Nov
10 02:56:02 2003
--- gnue-common/src/datasources/drivers/postgresql/popy/Driver.py Tue Nov
25 12:01:43 2003
***************
*** 28,128 ****
# NOTES:
#
! from gnue.common.datasources import GDataObjects, GConditions, GConnections
! from gnue.common.apps import GDebug
! from gnue.common.datasources.drivers.postgresql.Base.Driver \
! import PGSQL_RecordSet, PGSQL_ResultSet, PGSQL_DataObject, \
! PGSQL_DataObject_SQL, PGSQL_DataObject_Object, \
! PGSQL_TriggerExtensions
! import PoPy, types
! import string
- class PG_RecordSet(PGSQL_RecordSet):
- pass
-
- class PG_ResultSet(PGSQL_ResultSet):
- def _loadNextRecord(self):
- if self._cursor:
- rs = None
-
- try:
- rsets = self._cursor.fetchmany()
- # TODO: It seems that popy does what the other drivers don't
- # TODO: and raises this error ALOT need to find out why
- except self._dataObject._DatabaseError, err:
- rsets = []
- # raise GDataObjects.ConnectionError, err
- if len(rsets):
- for rs in(rsets):
- if rs:
- i = 0
- dict = {}
- for f in (rs):
- if self._dataObject._unicodeMode and type(f)==types.StringType:
- f = unicode(f,self._dataObject._databaseEncoding)
- dict[string.lower(self._fieldNames[i])] = f
- i += 1
- self._cachedRecords.append (self._recordSetClass(parent=self, \
-
initialData=dict))
- else:
- return 0
- return 1
- else:
- return 0
- else:
- return 0
-
- class PG_DataObject(PGSQL_DataObject):
- def __init__(self):
- PGSQL_DataObject.__init__(self, PoPy, PG_ResultSet)
-
- class PG_DataObject_Object(PG_DataObject, \
- PGSQL_DataObject_Object):
-
- def __init__(self):
- # Call PGSQL init first because PG_DataObject needs to overwrite
- # some of its values
- # PGSQL_DataObject_Object.__init__(self)
- PG_DataObject.__init__(self)
-
- def _buildQuery(self, conditions={},forDetail=None,additionalSQL=""):
- return PGSQL_DataObject_Object._buildQuery(self, conditions, forDetail,\
- additionalSQL)
-
-
- class PG_DataObject_SQL(PG_DataObject, \
- PGSQL_DataObject_SQL):
- def __init__(self):
- # Call PGSQL init first because PG_DataObject needs to overwrite
- # some of its values
- # PGSQL_DataObject_SQL.__init__(self)
- PG_DataObject.__init__(self)
-
- def _buildQuery(self, conditions={},forDetail=None,additionalSQL=""):
- return PGSQL_DataObject_SQL._buildQuery(self, conditions, forDetail,\
- additionalSQL)
-
-
- #
- # Extensions to Trigger Namespaces
- #
- class TriggerExtensions(PGSQL_TriggerExtensions):
- pass
-
-
- ######################################
- #
- # The following hashes describe
- # this driver's characteristings.
- #
- ######################################
-
- #
- # All datasouce "types" and corresponding DataObject class
- #
- supportedDataObjects = {
- 'object': PG_DataObject_Object,
- 'sql': PG_DataObject_SQL
- }
--- 28,38 ----
# NOTES:
#
! __all__ = ('Connection')
! from gnue.common.datasources.drivers.postgresql import Base
! import PoPy
! class Connection(Base.Connection):
! _pg_driver = PoPy
Index: gnue-common/src/datasources/drivers/postgresql/popy/__init__.py
diff -c gnue-common/src/datasources/drivers/postgresql/popy/__init__.py:1.1
gnue-common/src/datasources/drivers/postgresql/popy/__init__.py:1.2
*** gnue-common/src/datasources/drivers/postgresql/popy/__init__.py:1.1 Mon Feb
17 13:15:38 2003
--- gnue-common/src/datasources/drivers/postgresql/popy/__init__.py Tue Nov
25 12:01:43 2003
***************
*** 0 ****
--- 1,43 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+ # FILE:
+ # popy/DBdriver.py
+ #
+ # DESCRIPTION:
+ # Postgresql implementation of dbdriver using Python DB-SIG v2
+ # specification.
+ #
+ # NOTES:
+ #
+
+ __description__ = _("PoPy Data Driver for PostgreSQL")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/postgresql/psycopg/__init__.py
diff -c gnue-common/src/datasources/drivers/postgresql/psycopg/__init__.py:1.1
gnue-common/src/datasources/drivers/postgresql/psycopg/__init__.py:1.2
*** gnue-common/src/datasources/drivers/postgresql/psycopg/__init__.py:1.1
Mon Feb 17 13:15:38 2003
--- gnue-common/src/datasources/drivers/postgresql/psycopg/__init__.py Tue Nov
25 12:01:43 2003
***************
*** 0 ****
--- 1,53 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+ # FILE:
+ # psycopg/DBdriver.py
+ #
+ # DESCRIPTION:
+ # Postgresql implementation of dbdriver using Python DB-SIG v2
+ # specification.
+ #
+ # NOTES:
+ #
+
+ __all__ = ('Connection')
+
+ from gnue.common.datasources.drivers.postgresql import Base
+ import psycopg
+
+ class Connection(Base.Connection):
+ _pg_driver = psycopg
+
+
+ __description__ = _("Psycopg Data Driver for PostgreSQL")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/postgresql/pygresql/__init__.py
diff -c gnue-common/src/datasources/drivers/postgresql/pygresql/__init__.py:1.1
gnue-common/src/datasources/drivers/postgresql/pygresql/__init__.py:1.2
*** gnue-common/src/datasources/drivers/postgresql/pygresql/__init__.py:1.1
Mon Feb 17 13:15:38 2003
--- gnue-common/src/datasources/drivers/postgresql/pygresql/__init__.py Tue Nov
25 12:01:44 2003
***************
*** 0 ****
--- 1,90 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+ # FILE:
+ # postgresql/DBdriver.py
+ #
+ # DESCRIPTION:
+ # Postgresql implementation of dbdriver using Python DB-SIG v2
+ # specification.
+ #
+ # NOTES:
+ #
+
+ __all__ = ('Connection')
+
+ from gnue.common.datasources import GDataObjects, GConditions, GConnections
+ from gnue.common.apps import GDebug
+
+ try:
+ import pgdb
+ from _pg import error as PGError # This is so we can catch login errors
+ except ImportError, message:
+ tmsg = _("Driver not installed: pygresql for PostgreSQL [%s]") % message
+ raise GConnections.AdapterNotInstalled, tmsg
+
+ from gnue.common.datasources.drivers.postgresql import Base
+
+
+ class Connection(Base.Connection):
+ _pg_driver = PoPy
+ _DatabaseError = pgdb.Error
+
+ def connect(self, connectData={}):
+ GDebug.printMesg(1,"Postgresql database driver initializing")
+ try:
+ self.native = pgdb.connect(user=connectData['_username'],
+ password=connectData['_password'],
+ host=connectData['host'],
+ database=connectData['dbname'])
+ except PGError, value:
+ raise GDataObjects.LoginError, value
+ except self._DatabaseError, value:
+ raise GDataObjects.LoginError, value
+
+ try:
+ encoding = connectData['encoding']
+ GDebug.printMesg(1,'Setting postgresql client_encoding to %s' %
encoding)
+ cursor = self.native.cursor()
+ cursor.execute("SET CLIENT_ENCODING TO '%s'" % encoding)
+ cursor.close()
+ except KeyError:
+ pass
+ except self._DatabaseError:
+ try:
+ cursor.close()
+ except:
+ pass
+
+
+
+ __description__ = _("PyGreSQL Data Driver for PostgreSQL")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/postgresql/pypgsql/Driver.py
diff -c gnue-common/src/datasources/drivers/postgresql/pypgsql/Driver.py:1.35
gnue-common/src/datasources/drivers/postgresql/pypgsql/Driver.py:1.36
*** gnue-common/src/datasources/drivers/postgresql/pypgsql/Driver.py:1.35
Thu Oct 9 17:27:49 2003
--- gnue-common/src/datasources/drivers/postgresql/pypgsql/Driver.py Tue Nov
25 12:01:44 2003
***************
*** 1,17 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or(at your option) any later version.
#
# GNU Enterprise 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.
#
! # You should have received a copy of the GNU General Public
# License along with program; see the file COPYING. If not,
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
--- 1,17 ----
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or(at your option) any later version.
#
# GNU Enterprise 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.
#
! # You should have received a copy of the GNU General Public
# License along with program; see the file COPYING. If not,
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
***************
*** 28,56 ****
# NOTES:
#
! import sys,string,types
from gnue.common.datasources import GDataObjects, GConditions, GConnections
from gnue.common.apps import GDebug
! from gnue.common.datasources.drivers.postgresql.Base.Driver \
! import PGSQL_RecordSet, PGSQL_ResultSet, PGSQL_DataObject, \
! PGSQL_DataObject_SQL, PGSQL_DataObject_Object, \
! PGSQL_TriggerExtensions
try:
from pyPgSQL import PgSQL # pyPgSQL 2.0 support
except ImportError:
import PgSQL # pyPgSQL 1.6 support
!
! class PG_RecordSet(PGSQL_RecordSet):
! pass
!
! class PG_ResultSet(PGSQL_ResultSet):
! def __init__(self, dataObject, cursor=None, defaultValues={},
masterRecordSet=None):
! PGSQL_ResultSet.__init__(self, dataObject, \
! cursor, defaultValues, masterRecordSet)
! self._recordSetClass = PG_RecordSet
!
# TODO: Override the base _loadNextRecord as the fetchmany() from the cursor
# TODO: returns an exception instead of None. Not sure wazzup with that.
def _loadNextRecord(self):
--- 28,50 ----
# NOTES:
#
! __all__ = ('Connection')
!
! import sys
from gnue.common.datasources import GDataObjects, GConditions, GConnections
from gnue.common.apps import GDebug
! from gnue.common.datasources.drivers.postgresql import Base
try:
from pyPgSQL import PgSQL # pyPgSQL 2.0 support
except ImportError:
+ # TODO: Re-evaluate the minimum version we support!
import PgSQL # pyPgSQL 1.6 support
!
!
! class ResultSet(Base.ResultSet):
!
# TODO: Override the base _loadNextRecord as the fetchmany() from the cursor
# TODO: returns an exception instead of None. Not sure wazzup with that.
def _loadNextRecord(self):
***************
*** 70,78 ****
i = 0
dict = {}
for f in (rs):
! if self._dataObject._unicodeMode and type(f)==types.StringType:
! f=unicode(f,self._dataObject._databaseEncoding)
! dict[string.lower(self._fieldNames[i])] = f
i += 1
self._cachedRecords.append (self._recordSetClass(parent=self, \
initialData=dict))
--- 64,70 ----
i = 0
dict = {}
for f in (rs):
! dict[self._fieldNames[i]] = f
i += 1
self._cachedRecords.append (self._recordSetClass(parent=self, \
initialData=dict))
***************
*** 84,136 ****
else:
return 0
- class PG_DataObject(PGSQL_DataObject):
- def __init__(self):
- PGSQL_DataObject.__init__(self, PgSQL, PG_ResultSet)
- self._connectString = '%s::%s:%s:%s::%s'
- class PG_DataObject_Object(PG_DataObject, \
- PGSQL_DataObject_Object):
! def __init__(self):
! # Call PGSQL init first because PG_DataObject needs to overwrite
! # some of its values
! PG_DataObject.__init__(self)
- def _buildQuery(self, conditions={},forDetail=None,additionalSQL=""):
- return PGSQL_DataObject_Object._buildQuery(self, conditions,forDetail,
- additionalSQL)
- class PG_DataObject_SQL(PG_DataObject, \
- PGSQL_DataObject_SQL):
- def __init__(self):
- # Call PGSQL init first because PG_DataObject needs to overwrite
- # some of its values
- PG_DataObject.__init__(self)
! def _buildQuery(self, conditions={},forDetail=None,additionalSQL=""):
! return PGSQL_DataObject_SQL._buildQuery(self, conditions,forDetail,\
! additionalSQL)
- #
- # Extensions to Trigger Namespaces
- #
- class TriggerExtensions(PGSQL_TriggerExtensions):
- pass
- ######################################
- #
- # The following hashes describe
- # this driver's characteristings.
- #
- ######################################
-
- #
- # All datasouce "types" and corresponding DataObject class
- #
- supportedDataObjects = {
- 'object': PG_DataObject_Object,
- 'sql': PG_DataObject_SQL
- }
--- 76,98 ----
else:
return 0
! class DataObject_Object(Base.DataObject_Object):
! _resultSetClass = ResultSet
+ class DataObject_SQL(Base.DataObject_SQL):
+ _resultSetClass = ResultSet
! class Connection(Base.Connection):
! _pg_driver = PgSQL
! _pg_connectString = '%s::%s:%s:%s::%s'
+ supportedDataObjects = {
+ 'object': DataObject_Object,
+ 'sql': DataObject_SQL
+ }
Index: gnue-common/src/datasources/drivers/postgresql/pypgsql/__init__.py
diff -c gnue-common/src/datasources/drivers/postgresql/pypgsql/__init__.py:1.1
gnue-common/src/datasources/drivers/postgresql/pypgsql/__init__.py:1.2
*** gnue-common/src/datasources/drivers/postgresql/pypgsql/__init__.py:1.1
Mon Feb 17 13:15:38 2003
--- gnue-common/src/datasources/drivers/postgresql/pypgsql/__init__.py Tue Nov
25 12:01:44 2003
***************
*** 0 ****
--- 1,43 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+ # FILE:
+ # pypgsql/DBdriver.py
+ #
+ # DESCRIPTION:
+ # Postgresql implementation of dbdriver using Python DB-SIG v2
+ # specification.
+ #
+ # NOTES:
+ #
+
+ __description__ = _("PyPGsql Data Driver for PostgreSQL")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Driver import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/sapdb/sapdb/__init__.py
diff -c gnue-common/src/datasources/drivers/sapdb/sapdb/__init__.py:1.1
gnue-common/src/datasources/drivers/sapdb/sapdb/__init__.py:1.2
*** gnue-common/src/datasources/drivers/sapdb/sapdb/__init__.py:1.1 Mon Apr
7 09:30:07 2003
--- gnue-common/src/datasources/drivers/sapdb/sapdb/__init__.py Tue Nov 25
12:01:45 2003
***************
*** 0 ****
--- 1,34 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("SAP-DB Data Driver")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Connection import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/special/configfile/__init__.py
diff -c gnue-common/src/datasources/drivers/special/configfile/__init__.py:1.1
gnue-common/src/datasources/drivers/special/configfile/__init__.py:1.2
*** gnue-common/src/datasources/drivers/special/configfile/__init__.py:1.1
Mon Feb 17 12:37:17 2003
--- gnue-common/src/datasources/drivers/special/configfile/__init__.py Tue Nov
25 12:01:45 2003
***************
*** 0 ****
--- 1,6 ----
+ from Driver import *
+
+ __description__ = _("ConfigFile Special Data Driver")
+ __driverurl__ = "n/a"
+ __examples__ = "n/a"
+ __doc__ = ""
Index: gnue-common/src/datasources/drivers/special/static/Driver.py
diff -c gnue-common/src/datasources/drivers/special/static/Driver.py:1.9
gnue-common/src/datasources/drivers/special/static/Driver.py:1.10
*** gnue-common/src/datasources/drivers/special/static/Driver.py:1.9 Tue Feb
18 09:59:25 2003
--- gnue-common/src/datasources/drivers/special/static/Driver.py Tue Nov
25 12:01:45 2003
***************
*** 40,50 ****
###########################################################
class STATIC_DataObject (DataObject):
- def __init__(self):
- DataObject.__init__(self)
- self.triggerExtensions = TriggerExtensions(self)
-
-
def _createResultSet(self, conditions={}, readOnly=0, masterRecordSet=None,
sql=""):
return STATIC_ResultSet(self, masterRecordSet=masterRecordSet)
--- 40,45 ----
Index: gnue-common/src/datasources/drivers/special/static/__init__.py
diff -c gnue-common/src/datasources/drivers/special/static/__init__.py:1.1
gnue-common/src/datasources/drivers/special/static/__init__.py:1.2
*** gnue-common/src/datasources/drivers/special/static/__init__.py:1.1 Mon Feb
17 12:37:17 2003
--- gnue-common/src/datasources/drivers/special/static/__init__.py Tue Nov
25 12:01:45 2003
***************
*** 0 ****
--- 1,6 ----
+ from Driver import *
+
+ __description__ = _("Static Special Data Driver")
+ __driverurl__ = "n/a"
+ __examples__ = "n/a"
+ __doc__ = ""
Index: gnue-common/src/datasources/drivers/special/unbound/Driver.py
diff -c gnue-common/src/datasources/drivers/special/unbound/Driver.py:1.6
gnue-common/src/datasources/drivers/special/unbound/Driver.py:1.7
*** gnue-common/src/datasources/drivers/special/unbound/Driver.py:1.6 Mon Feb
17 02:32:48 2003
--- gnue-common/src/datasources/drivers/special/unbound/Driver.py Tue Nov
25 12:01:45 2003
***************
*** 41,55 ****
###########################################################
class NIL_DataObject (DataObject):
- def __init__(self):
- DataObject.__init__(self)
- self.triggerExtensions = TriggerExtensions(self)
-
def _createResultSet(self, conditions={}, readOnly=0, masterRecordSet=None,
sql=""):
return NIL_ResultSet(self, masterRecordSet=masterRecordSet)
# We don't do logins
! def getLoginFields(self):
return ()
# We don't do connections (we are connectionless)
--- 41,51 ----
###########################################################
class NIL_DataObject (DataObject):
def _createResultSet(self, conditions={}, readOnly=0, masterRecordSet=None,
sql=""):
return NIL_ResultSet(self, masterRecordSet=masterRecordSet)
# We don't do logins
! def getLoginFields(self):
return ()
# We don't do connections (we are connectionless)
Index: gnue-common/src/datasources/drivers/special/unbound/__init__.py
diff -c gnue-common/src/datasources/drivers/special/unbound/__init__.py:1.1
gnue-common/src/datasources/drivers/special/unbound/__init__.py:1.2
*** gnue-common/src/datasources/drivers/special/unbound/__init__.py:1.1 Mon Feb
17 12:37:17 2003
--- gnue-common/src/datasources/drivers/special/unbound/__init__.py Tue Nov
25 12:01:46 2003
***************
*** 0 ****
--- 1,6 ----
+ from Driver import *
+
+ __description__ = _("Unbound Special Data Driver")
+ __driverurl__ = "n/a"
+ __examples__ = "n/a"
+ __doc__ = ""
Index: gnue-common/src/datasources/drivers/sqlite/sqlite/__init__.py
diff -c gnue-common/src/datasources/drivers/sqlite/sqlite/__init__.py:1.1
gnue-common/src/datasources/drivers/sqlite/sqlite/__init__.py:1.2
*** gnue-common/src/datasources/drivers/sqlite/sqlite/__init__.py:1.1 Mon Feb
17 13:15:38 2003
--- gnue-common/src/datasources/drivers/sqlite/sqlite/__init__.py Tue Nov
25 12:01:46 2003
***************
*** 0 ****
--- 1,34 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("SQLite Data Driver")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Connection import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/sqlrelay/sqlrelay/__init__.py
diff -c gnue-common/src/datasources/drivers/sqlrelay/sqlrelay/__init__.py:1.1
gnue-common/src/datasources/drivers/sqlrelay/sqlrelay/__init__.py:1.2
*** gnue-common/src/datasources/drivers/sqlrelay/sqlrelay/__init__.py:1.1
Mon Feb 17 12:37:17 2003
--- gnue-common/src/datasources/drivers/sqlrelay/sqlrelay/__init__.py Tue Nov
25 12:01:47 2003
***************
*** 0 ****
--- 1,34 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("SQLRelay Data Driver")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Connection import Connection as C
+ return C(*args, **parms)
+
Index: gnue-common/src/datasources/drivers/sybase/sybase/__init__.py
diff -c gnue-common/src/datasources/drivers/sybase/sybase/__init__.py:1.1
gnue-common/src/datasources/drivers/sybase/sybase/__init__.py:1.2
*** gnue-common/src/datasources/drivers/sybase/sybase/__init__.py:1.1 Mon Feb
17 13:15:38 2003
--- gnue-common/src/datasources/drivers/sybase/sybase/__init__.py Tue Nov
25 12:01:47 2003
***************
*** 0 ****
--- 1,34 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or(at your option) any later version.
+ #
+ # GNU Enterprise 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.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+
+ __description__ = _("Sybase Data Driver")
+ __driverurl__ = "http://????"
+ __examples__ = ""
+ __doc__ = ""
+
+ #
+ # Stub code to not initialize the Connection until needed.
+ # This greatly helps with error messages.
+ #
+ def Connection(*args, **parms):
+ from Connection import Connection as C
+ return C(*args, **parms)
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue-common/src/datasources GConnections.py GDa...,
Jason Cater <=