00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef QDATASCHEMADRIVER_POSTGRESQL_H
00030 #define QDATASCHEMADRIVER_POSTGRESQL_H
00031 #include <qobject.h>
00032 #include <qdataschemaglobal.h>
00033 #include <qdataschemadriver.h>
00034
00035
00036
00037
00045 class QDataSchemaDriverPostgreSQL: public QDataSchemaDriver
00046 {
00047 Q_OBJECT
00048
00049 public:
00050 QDataSchemaDriverPostgreSQL();
00051 ~QDataSchemaDriverPostgreSQL();
00052
00053 QString sqlDriverName();
00054 QString fieldtype( const QString &qdstype,
00055 int width, int decimals = 0,
00056 bool notnull = false, bool primarykey = false, bool serial = false );
00057
00058 int fieldWidth( QSqlFieldInfo *ftypedef );
00059 int fieldDecimals( QSqlFieldInfo *ftypedef );
00060 QString defaultDatabaseName(){ return "template1";};
00061
00062 protected:
00063 QString queryCreateDatabase( const QString &name );
00064 QString queryAlterTableModifyField( const QString &tname, const QString &field, const QString &oldfield = "" );
00065 QString queryDropIndex( const QString &tname, const QString &iname );
00066 };
00067
00068 #endif
00069