kexidbparser.h
1/***************************************************************************
2 * kexidbparser.h
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20#ifndef KROSS_KEXIDB_KEXIDBPARSER_H
21#define KROSS_KEXIDB_KEXIDBPARSER_H
22
23#include <tqstring.h>
24
25#include <api/object.h>
26#include <api/list.h>
27#include <api/class.h>
28
29#include <kexidb/drivermanager.h>
30#include <kexidb/parser/parser.h>
31
32namespace Kross { namespace KexiDB {
33
34 // Forward declaration.
35 class KexiDBConnection;
36 class KexiDBTableSchema;
37 class KexiDBQuerySchema;
38
55 class KexiDBParser : public Kross::Api::Class<KexiDBParser>
56 {
57 public:
59 virtual ~KexiDBParser();
60 virtual const TQString getClassName() const;
61
62 private:
63
65 bool parse(const TQString& sql);
67 void clear();
69 const TQString operation();
70
72 KexiDBTableSchema* table();
74 KexiDBQuerySchema* query();
76 KexiDBConnection* connection();
78 const TQString statement();
79
81 const TQString errorType();
83 const TQString errorMsg();
85 int errorAt();
86
87 private:
88 KexiDBConnection* m_connection;
89 ::KexiDB::Parser* m_parser;
90 };
91
92}}
93
94#endif
95
Parser for SQL statements.
Definition parser.h:113
A connection to a database.
The KexiDBParser could be used to parse SQL-statements.
The KexiDBTableSchema object implements a KexiDBSchema for queries.
The KexiDBTableSchema object implements a KexiDBSchema for tables.
High-level database connectivity library with database backend drivers.