Kexi API Documentation (2.0 alpha)

parser_p.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KEXIDB_PARSER_P_H
00021 #define KEXIDB_PARSER_P_H
00022 
00023 #include <qvaluelist.h>
00024 #include <qdict.h>
00025 #include <qasciicache.h>
00026 #include <qstring.h>
00027 
00028 #include <kexidb/queryschema.h>
00029 #include <kexidb/tableschema.h>
00030 #include <kexidb/connection.h>
00031 #include <kexidb/expression.h>
00032 #include "sqltypes.h"
00033 #include "parser.h"
00034 
00035 namespace KexiDB {
00036 
00038 class ParserPrivate
00039 {
00040     public:
00041         ParserPrivate();
00042         ~ParserPrivate();
00043 
00044         void clear();
00045 
00046         int operation;
00047         TableSchema *table;
00048         QuerySchema *select;
00049         Connection *db;
00050         QString statement;
00051         ParserError error;
00052         QAsciiCache<char> reservedKeywords;
00053         bool initialized : 1;
00054 };
00055 
00056 
00058 class ParseInfo
00059 {
00060     public:
00061         ParseInfo(QuerySchema *query);
00062         ~ParseInfo();
00063 
00065         QDict< QValueList<int> > repeatedTablesAndAliases;
00066 
00067         QString errMsg, errDescr; //helpers
00068         QuerySchema *querySchema;
00069 };
00070 
00071 }
00072 
00073 void yyerror(const char *str);
00074 void setError(const QString& errName, const QString& errDesc);
00075 void setError(const QString& errDesc);
00076 //bool parseData(KexiDB::Parser *p, const char *data);
00077 bool addColumn( KexiDB::ParseInfo& parseInfo, KexiDB::BaseExpr* columnExpr );
00078 KexiDB::QuerySchema* buildSelectQuery( 
00079     KexiDB::QuerySchema* querySchema, KexiDB::NArgExpr* colViews, 
00080     KexiDB::NArgExpr* tablesList = 0, SelectOptionsInternal* options = 0 ); //KexiDB::BaseExpr* whereExpr = 0 );
00081 
00082 extern KexiDB::Parser *parser;
00083 extern KexiDB::Field *field;
00084 extern bool requiresTable;
00085 
00086 
00087 #endif
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:48:46 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003