21#include "kexidbparser.h"
22#include "kexidbschema.h"
23#include "kexidbconnection.h"
25#include <api/variant.h>
31 , m_connection(connection)
34 this->addFunction1< Kross::Api::Variant, Kross::Api::Variant >(
"parse",
this, &KexiDBParser::parse);
35 this->addFunction0< void >(
"clear",
this, &KexiDBParser::clear);
37 this->addFunction0< Kross::Api::Variant >(
"operation",
this, &KexiDBParser::operation);
39 this->addFunction0< KexiDBTableSchema >(
"table",
this, &KexiDBParser::table);
40 this->addFunction0< KexiDBQuerySchema >(
"query",
this, &KexiDBParser::query);
41 this->addFunction0< KexiDBConnection >(
"connection",
this, &KexiDBParser::connection);
42 this->addFunction0< Kross::Api::Variant >(
"statement",
this, &KexiDBParser::statement);
44 this->addFunction0< Kross::Api::Variant >(
"errorType",
this, &KexiDBParser::errorType);
45 this->addFunction0< Kross::Api::Variant >(
"errorMsg",
this, &KexiDBParser::errorMsg);
46 this->addFunction0< Kross::Api::Variant >(
"errorAt",
this, &KexiDBParser::errorAt);
49KexiDBParser::~KexiDBParser()
53const TQString KexiDBParser::getClassName()
const
55 return "Kross::KexiDB::KexiDBParser";
58bool KexiDBParser::parse(
const TQString& sql) {
return m_parser->
parse(sql); }
59void KexiDBParser::clear() { m_parser->
clear(); }
60const TQString KexiDBParser::operation() {
return m_parser->
operationString(); }
73const TQString KexiDBParser::statement() {
return m_parser->
statement(); }
75const TQString KexiDBParser::errorType() {
return m_parser->
error().
type(); }
76const TQString KexiDBParser::errorMsg() {
return m_parser->
error().
error(); }
77int KexiDBParser::errorAt() {
return m_parser->
error().
at(); }
Parser for SQL statements.
TQString operationString() const
bool parse(const TQString &statement)
clears previous results and runs the parser
ParserError error() const
void clear()
rests results
TQString statement() const
KexiDB::QuerySchema provides information about database query.
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.
KrossKexiDB provides access to the KexiDB database functionality.