Eneboo - Documentación para desarrolladores
src/qt/src/sql/drivers/ibase/qsql_ibase.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 **
00003 ** Definition of Interbase driver classes
00004 **
00005 ** Created : 030911
00006 **
00007 ** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
00008 **
00009 ** This file is part of the sql module of the Qt GUI Toolkit.
00010 **
00011 ** This file may be distributed under the terms of the Q Public License
00012 ** as defined by Trolltech ASA of Norway and appearing in the file
00013 ** LICENSE.QPL included in the packaging of this file.
00014 **
00015 ** This file may be distributed and/or modified under the terms of the
00016 ** GNU General Public License version 2 as published by the Free Software
00017 ** Foundation and appearing in the file LICENSE.GPL included in the
00018 ** packaging of this file.
00019 **
00020 ** Licensees holding valid Qt Enterprise Edition licenses may use this
00021 ** file in accordance with the Qt Commercial License Agreement provided
00022 ** with the Software.
00023 **
00024 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00025 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00026 **
00027 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00028 **   information about Qt Commercial License Agreements.
00029 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
00030 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00031 **
00032 ** Contact info@trolltech.com if any conditions of this licensing are
00033 ** not clear to you.
00034 **
00035 **********************************************************************/
00036 
00037 #ifndef QSQL_IBASE_H
00038 #define QSQL_IBASE_H
00039 
00040 #include "qsqlresult.h"
00041 #include "qsqldriver.h"
00042 #include "../cache/qsqlcachedresult.h"
00043 
00044 
00045 class QIBaseDriverPrivate;
00046 class QIBaseResultPrivate;
00047 class QIBaseDriver;
00048 
00049 class QIBaseResult : public QtSqlCachedResult
00050 {
00051     friend class QIBaseDriver;
00052     friend class QIBaseResultPrivate;
00053 
00054 public:
00055     QIBaseResult(const QIBaseDriver* db);
00056     virtual ~QIBaseResult();
00057 
00058     bool prepare(const QString& query);
00059     bool exec();    
00060 
00061 protected:
00062     bool gotoNext(QtSqlCachedResult::RowCache* row);
00063     bool reset (const QString& query);
00064     int size();
00065     int numRowsAffected();
00066 
00067 private:
00068     QIBaseResultPrivate* d;
00069 };
00070 
00071 class QIBaseDriver : public QSqlDriver
00072 {
00073     friend class QIBaseDriverPrivate;
00074     friend class QIBaseResultPrivate;
00075     friend class QIBaseResult;
00076 public:
00077     QIBaseDriver(QObject *parent = 0, const char *name = 0);
00078     QIBaseDriver(void *connection, QObject *parent = 0, const char *name = 0);
00079     virtual ~QIBaseDriver();
00080     bool hasFeature(DriverFeature f) const;
00081     bool open(const QString & db,
00082                    const QString & user,
00083                    const QString & password,
00084                    const QString & host,
00085                    int port,
00086                    const QString & connOpts);
00087     bool open( const QString & db,
00088             const QString & user,
00089             const QString & password,
00090             const QString & host,
00091             int port ) { return open (db, user, password, host, port, QString()); }
00092     void close();
00093     QSqlQuery createQuery() const;
00094     bool beginTransaction();
00095     bool commitTransaction();
00096     bool rollbackTransaction();
00097     QStringList tables(const QString& typeName) const;
00098 
00099     QSqlRecord record(const QString& tablename) const;
00100     QSqlRecordInfo recordInfo(const QString& tablename) const;
00101     QSqlIndex primaryIndex(const QString &table) const;
00102     QSqlRecord record(const QSqlQuery& query) const;
00103     QSqlRecordInfo recordInfo(const QSqlQuery& query) const;
00104 
00105     QString formatValue(const QSqlField* field, bool trimStrings) const;
00106     
00107 private:
00108     QIBaseDriverPrivate* d;
00109 };
00110 
00111 
00112 #endif
00113 
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'