From ea318d1431c89e647598c510c4245c6571aa5f46 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 26 Jan 2012 23:32:43 -0600 Subject: Update to latest tqt3 automated conversion --- doc/html/sql-driver.html | 54 ++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'doc/html/sql-driver.html') diff --git a/doc/html/sql-driver.html b/doc/html/sql-driver.html index 2838e34eb..e6f6b3d50 100644 --- a/doc/html/sql-driver.html +++ b/doc/html/sql-driver.html @@ -121,7 +121,7 @@ client libraries (>3.23.34) allow you to use transactions on those modified servers.

If you have a recent client library and connect to a transaction-enabled MySQL server, a call to the -TQSqlDriver::hasFeature( TQSqlDriver::Transactions ) function returns +TQSqlDriver::hasFeature( TQSqlDriver::Transactions ) function returns TRUE and SQL transactions can be used.

If the plugin is compiled against MySQL 4.x client libraries, transactions are enabled by default. @@ -172,15 +172,15 @@ encoding to communicate with the server. that this process may require a lot of memory.

Note that Oracle 9 doesn't support scrollable result sets with LOB columns, you have to use a forward only query to select LOB fields -(see TQSqlQuery::setForwardOnly()). +(see TQSqlQuery::setForwardOnly()).

Inserting BLOBs should be done using either a prepared query where the -BLOBs are bound to placeholders, or TQSqlCursor which uses a prepared +BLOBs are bound to placeholders, or TQSqlCursor which uses a prepared query to do this internally (see $QTDIR/examples/sql/blob).

Know problems

-

When a query is in forward only mode a call to TQSqlQuery::last() will +

When a query is in forward only mode a call to TQSqlQuery::last() will position the query on the last record and return TRUE, but subsequent -calls to TQSqlQuery::value() will only return NULLs. +calls to TQSqlQuery::value() will only return NULLs.

How to build the plugin on Unix/Linux

All files required to build driver should ship with the standard Oracle @@ -260,7 +260,7 @@ be installed first. Note that every client that uses your application is required to have an ODBC driver manager installed, otherwise the TQODBC3 plugin will not work.

Be aware that when connecting to an ODBC datasource you must pass in -the name of the ODBC datasource to the TQSqlDatabase::setDatabaseName() +the name of the ODBC datasource to the TQSqlDatabase::setDatabaseName() function: not the actual database name.

The TQODBC3 Plugin needs an ODBC compliant driver manager version 2.0 or later to work. Some ODBC drivers claim to be version 2.0 compliant, @@ -422,7 +422,7 @@ files necessary for compiling the TQDB2 plugin.

The TQDB2 driver supports prepared queries, reading/writing of Unicode strings and reading/writing of BLOBs.

We suggest using a forward-only query when calling stored procedures -in DB2 (see TQSqlQuery::setForwardOnly()). +in DB2 (see TQSqlQuery::setForwardOnly()).

How to build the plugin on Unix/Linux

@@ -559,16 +559,16 @@ error message.
 

How to write your own database driver

-

TQSqlDatabase is responsible for loading and managing database driver -plugins. When a database is added (see TQSqlDatabase::addDatabase()), -the appropriate driver plugin is loaded (using TQSqlDriverPlugin). +

TQSqlDatabase is responsible for loading and managing database driver +plugins. When a database is added (see TQSqlDatabase::addDatabase()), +the appropriate driver plugin is loaded (using TQSqlDriverPlugin). TQSqlDatabase relies on the driver plugin to provide interfaces for -TQSqlDriver and TQSqlResult. +TQSqlDriver and TQSqlResult.

TQSqlDriver is an abstract base class which defines the functionality of a SQL database driver. This includes functions such as -TQSqlDriver::open() and TQSqlDriver::close(). TQSqlDriver is responsible +TQSqlDriver::open() and TQSqlDriver::close(). TQSqlDriver is responsible for connecting to a database, establish the proper environment, etc. -In addition, TQSqlDriver can create TQSqlQuery objects appropriate for +In addition, TQSqlDriver can create TQSqlQuery objects appropriate for the particular database API. TQSqlDatabase forwards many of its function calls directly to TQSqlDriver which provides the concrete implementation. @@ -577,9 +577,9 @@ of a SQL database query. This includes statements such as SELECT, UPDATE, and ALTER TABLE. TQSqlResult contains functions such as TQSqlResult::next() and TQSqlResult::value(). TQSqlResult is responsible for sending queries to the database, returning result data, etc. -TQSqlQuery forwards many of its function calls directly to TQSqlResult +TQSqlQuery forwards many of its function calls directly to TQSqlResult which provides the concrete implementation. -

TQSqlDriver and TQSqlResult are closely connected. When implementing a +

TQSqlDriver and TQSqlResult are closely connected. When implementing a TQt SQL driver, both of these classes must to be subclassed and the abstract virtual methods in each class must be implemented.

To implement a TQt SQL driver as a plugin (so that it is recognized and @@ -591,36 +591,36 @@ with TQt in QTDIR/plugins/src/sqldrivers and QTDIR/src/sql/drivers.

The following code can be used as a skeleton for a SQL driver:

-class TQNullResult : public TQSqlResult
+class TQNullResult : public TQSqlResult
 {
 public:
-    TQNullResult( const TQSqlDriver* d ): TQSqlResult( d ) {}
+    TQNullResult( const TQSqlDriver* d ): TQSqlResult( d ) {}
     ~TQNullResult() {}
 protected:
-    TQVariant    data( int ) { return TQVariant(); }
-    bool        reset ( const TQString& ) { return FALSE; }
+    TQVariant    data( int ) { return TQVariant(); }
+    bool        reset ( const TQString& ) { return FALSE; }
     bool        fetch( int ) { return FALSE; }
     bool        fetchFirst() { return FALSE; }
     bool        fetchLast() { return FALSE; }
     bool        isNull( int ) { return FALSE; }
-    TQSqlRecord  record() { return TQSqlRecord(); }
+    TQSqlRecord  record() { return TQSqlRecord(); }
     int         size()  { return 0; }
     int         numRowsAffected() { return 0; }
 };
 
-class TQNullDriver : public TQSqlDriver
+class TQNullDriver : public TQSqlDriver
 {
 public:
-    TQNullDriver(): TQSqlDriver() {}
+    TQNullDriver(): TQSqlDriver() {}
     ~TQNullDriver() {}
     bool    hasFeature( DriverFeature ) const { return FALSE; }
-    bool    open( const TQString&,
-                  const TQString&,
-                  const TQString&,
-                  const TQString&,
+    bool    open( const TQString&,
+                  const TQString&,
+                  const TQString&,
+                  const TQString&,
                   int ) { return FALSE; }
     void    close() {}
-    TQSqlQuery createQuery() const { return TQSqlQuery( new TQNullResult( this ) ); }
+    TQSqlQuery createQuery() const { return TQSqlQuery( new TQNullResult( this ) ); }
 };
 
-- cgit v1.2.1