move sqlhelper into util/. Add convenience methods
This commit is contained in:
parent
1a97db687b
commit
e6cd70f029
|
@ -6,7 +6,7 @@
|
||||||
#include "SQLParser.h"
|
#include "SQLParser.h"
|
||||||
|
|
||||||
// contains printing utilities
|
// contains printing utilities
|
||||||
#include "sqlhelper.h"
|
#include "util/sqlhelper.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
if (argc <= 1) {
|
if (argc <= 1) {
|
||||||
|
|
|
@ -29,7 +29,9 @@ namespace hsql {
|
||||||
|
|
||||||
virtual ~SQLStatement();
|
virtual ~SQLStatement();
|
||||||
|
|
||||||
virtual StatementType type() const;
|
StatementType type() const;
|
||||||
|
|
||||||
|
bool isType(StatementType type) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
StatementType type_;
|
StatementType type_;
|
||||||
|
|
|
@ -13,6 +13,10 @@ namespace hsql {
|
||||||
return type_;
|
return type_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SQLStatement::isType(StatementType type) const {
|
||||||
|
return (type_ == type);
|
||||||
|
}
|
||||||
|
|
||||||
// ColumnDefinition
|
// ColumnDefinition
|
||||||
ColumnDefinition::ColumnDefinition(char* name, DataType type) :
|
ColumnDefinition::ColumnDefinition(char* name, DataType type) :
|
||||||
name(name),
|
name(name),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __SQLHELPER_H__
|
#ifndef __SQLPARSER__SQLHELPER_H__
|
||||||
#define __SQLHELPER_H__
|
#define __SQLPARSER__SQLHELPER_H__
|
||||||
|
|
||||||
#include "sql/statements.h"
|
#include "../sql/statements.h"
|
||||||
|
|
||||||
namespace hsql {
|
namespace hsql {
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "thirdparty/microtest/microtest.h"
|
#include "thirdparty/microtest/microtest.h"
|
||||||
#include "sql_asserts.h"
|
|
||||||
#include "SQLParser.h"
|
#include "SQLParser.h"
|
||||||
#include "sqlhelper.h"
|
#include "util/sqlhelper.h"
|
||||||
|
|
||||||
|
#include "sql_asserts.h"
|
||||||
|
|
||||||
using namespace hsql;
|
using namespace hsql;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#include "thirdparty/microtest/microtest.h"
|
#include "thirdparty/microtest/microtest.h"
|
||||||
#include "sql_asserts.h"
|
|
||||||
#include "SQLParser.h"
|
#include "SQLParser.h"
|
||||||
#include "sqlhelper.h"
|
#include "util/sqlhelper.h"
|
||||||
|
|
||||||
|
#include "sql_asserts.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
Loading…
Reference in New Issue