Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/scripting/kexidb/kexidbparser.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | |||||
53 | */ | 53 | */ | ||
54 | class KexiDBParser : public QObject | 54 | class KexiDBParser : public QObject | ||
55 | { | 55 | { | ||
56 | Q_OBJECT | 56 | Q_OBJECT | ||
57 | public: | 57 | public: | ||
58 | KexiDBParser(KexiDBConnection* connection, KDbParser* parser, bool owner); | 58 | KexiDBParser(KexiDBConnection* connection, KDbParser* parser, bool owner); | ||
59 | virtual ~KexiDBParser(); | 59 | virtual ~KexiDBParser(); | ||
60 | 60 | | |||
61 | public Q_SLOTS: | 61 | public: | ||
62 | 62 | | |||
63 | /** Clears previous results and runs the parser on the SQL statement passed as an argument. */ | 63 | /** Clears previous results and runs the parser on the SQL statement passed as an argument. */ | ||
64 | bool parse(const QString& sql); | 64 | Q_INVOKABLE bool parse(const QString& sql); | ||
65 | /** Clears parsing results. */ | 65 | /** Clears parsing results. */ | ||
66 | void clear(); | 66 | Q_INVOKABLE void clear(); | ||
67 | /** Returns the resulting operation. */ | 67 | /** Returns the resulting operation. */ | ||
68 | const QString operation(); | 68 | Q_INVOKABLE QString operation() const; | ||
staniek: missing const?
Do we need it as slot? | |||||
69 | 69 | | |||
70 | /** Returns the \a KexiDBTableSchema object on a CREATE TABLE operation. */ | 70 | /** Returns the \a KexiDBTableSchema object on a CREATE TABLE operation. */ | ||
71 | QObject* table(); | 71 | Q_INVOKABLE QObject* table(); | ||
staniek: Do we need it as slot? | |||||
72 | /** Returns the \a KexiDBQuerySchema object on a SELECT operation. */ | 72 | /** Returns the \a KexiDBQuerySchema object on a SELECT operation. */ | ||
73 | QObject* query(); | 73 | Q_INVOKABLE QObject* query(); | ||
staniek: Do we need it as slot? | |||||
74 | /** Returns the \a KexiDBConnection object pointing to the used database connection. */ | 74 | /** Returns the \a KexiDBConnection object pointing to the used database connection. */ | ||
75 | QObject* connection(); | 75 | Q_INVOKABLE QObject* connection(); | ||
staniek: Do we need it as slot? | |||||
76 | /** Returns the SQL query statement. */ | 76 | /** Returns the SQL query statement. */ | ||
77 | const QString statement(); | 77 | Q_INVOKABLE QString statement() const; | ||
staniek: missing const?
Do we need it as slot? | |||||
78 | 78 | | |||
79 | /** Returns the type string of the last error. */ | 79 | /** Returns the type string of the last error. */ | ||
80 | const QString errorType(); | 80 | Q_INVOKABLE QString errorType() const; | ||
staniek: missing const?
Do we need it as slot? | |||||
81 | /** Returns the message of the last error. */ | 81 | /** Returns the message of the last error. */ | ||
82 | const QString errorMsg(); | 82 | Q_INVOKABLE QString errorMsg() const; | ||
staniek: missing const?
Do we need it as slot? | |||||
83 | /** Returns the position where the last error occurred. */ | 83 | /** Returns the position where the last error occurred. */ | ||
84 | int errorAt(); | 84 | Q_INVOKABLE int errorAt() const; | ||
staniek: missing const?
Do we need it as slot? | |||||
They dont need to be slots, but they do have to be Q_INVOKABLE to be accessible to the JS engine piggz: They dont need to be slots, but they do have to be Q_INVOKABLE to be accessible to the JS engine | |||||
85 | 85 | | |||
86 | private: | 86 | private: | ||
87 | QPointer<KexiDBConnection> m_connection; | 87 | QPointer<KexiDBConnection> m_connection; | ||
88 | KDbParser* m_parser; | 88 | KDbParser* m_parser; | ||
89 | bool m_owner; | 89 | bool m_owner; | ||
90 | }; | 90 | }; | ||
91 | 91 | | |||
92 | } | 92 | } | ||
93 | 93 | | |||
94 | #endif | 94 | #endif | ||
95 | 95 | |
missing const?
Do we need it as slot?