00001 /**************************************************************************** 00002 ** $Id: qdataschemadriver-mysql.h,v 1.4 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_MYSQL_H 00030 #define QDATASCHEMADRIVER_MYSQL_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 QDataSchemaDriverMySQL: public QDataSchemaDriver 00046 { 00047 Q_OBJECT 00048 00049 public: 00050 QDataSchemaDriverMySQL(); 00051 ~QDataSchemaDriverMySQL(); 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 QString defaultDatabaseName(){ return "mysql";}; 00060 QString queryCreateDatabase( const QString &name ); 00061 QString queryDropIndex( const QString &tname, const QString &iname ); 00062 }; 00063 00064 #endif 00065