qdataschemadriver-postgresql.h

00001 /****************************************************************************
00002 ** $Id: qdataschemadriver-postgresql.h,v 1.6 2006/12/21 15:13:45 leader Exp $
00003 **
00004 ** Header file of the QDataSchemaDriver
00005 **
00006 ** Created : 20031201
00007 **
00008 ** Copyright (C) 2003-2004 Leader InfoTech.  All rights reserved.
00009 **
00010 ** This file is part of the Library of the Ananas
00011 ** automation accounting system.
00012 **
00013 ** This file may be distributed and/or modified under the terms of the
00014 ** GNU General Public License version 2 as published by the Free Software
00015 ** Foundation and appearing in the file LICENSE.GPL included in the
00016 ** packaging of this file.
00017 **
00018 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00019 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00020 **
00021 ** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
00022 ** See http://www.leaderit.ru/gpl/ for GPL licensing information.
00023 **
00024 ** Contact org@leaderit.ru if any conditions of this licensing are
00025 ** not clear to you.
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 //#include <qdict.h>
00035 //#include "config.h"
00036 //class QSqlCursor;
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 

Generated on Sun Aug 26 05:37:07 2007 for QT Database Schema library. by  doxygen 1.5.1