Eneboo - Documentación para desarrolladores
src/flbase/FLSqlDriver.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002                              FLSqlDriver.h
00003                           -------------------
00004  begin                : Thu Nov 22 2005
00005  copyright            : (C) 2002-2005 by InfoSiAL S.L.
00006  email                : mail@infosial.com
00007 ***************************************************************************/
00008 /***************************************************************************
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; version 2 of the License.               *
00012  ***************************************************************************/
00013 /***************************************************************************
00014    Este  programa es software libre. Puede redistribuirlo y/o modificarlo
00015    bajo  los  trminos  de  la  Licencia  Pblica General de GNU   en  su
00016    versin 2, publicada  por  la  Free  Software Foundation.
00017  ***************************************************************************/
00018 
00019 #ifndef FLSQLDRIVER_H
00020 #define FLSQLDRIVER_H
00021 
00022 #include <qsqldriver.h>
00023 
00024 class FLTableMetaData;
00025 class FLSqlCursor;
00026 class FLSqlDatabase;
00027 
00038 class FL_EXPORT FLSqlDriver : public QSqlDriver {
00039 
00040   Q_OBJECT
00041 
00042 public:
00043 
00047   FLSqlDriver( QObject * parent = 0, const char * name = 0 );
00048 
00052   ~FLSqlDriver();
00053 
00060   virtual QString formatDatabaseName( const QString & name );
00061 
00074   virtual bool tryConnect( const QString & db, const QString & user = QString::null, const QString & password = QString::null, const QString & host = QString::null, int port = -1 );
00075 
00083   virtual QString sqlCreateTable( FLTableMetaData * tmd );
00084 
00086   virtual QString formatValueLike( int t, const QVariant & v, const bool upper = false );
00088   virtual QString formatValue( int t, const QVariant & v, const bool upper = false );
00090   virtual QVariant nextSerialVal( const QString & table, const QString & field );
00092   virtual int atFrom( FLSqlCursor * cur );
00094   virtual bool alterTable( const QString & mtd1, const QString & mtd2, const QString & key = QString::null );
00096   virtual bool canSavePoint();
00098   virtual bool savePoint( const QString & n );
00100   virtual bool releaseSavePoint( const QString & n );
00102   virtual bool rollbackSavePoint( const QString & n );
00104   virtual void Mr_Proper() {}
00106   virtual QStringList locksStatus();
00108   virtual QStringList detectLocks();
00110   virtual QStringList detectRisksLocks( const QString & table = QString::null,
00111                                         const QString & primaryKeyValue = QString::null );
00113   virtual bool regenTable( const QString & n, FLTableMetaData * tmd );
00114 
00118   void setFLSqlDatabase( FLSqlDatabase * db );
00119 
00120 protected:
00121 
00122   FLSqlDatabase * db_;
00123 };
00124 
00125 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'