2020-12-01 23:37:10 +01:00
|
|
|
#include "table_builder.h"
|
|
|
|
|
2021-08-19 23:55:16 +02:00
|
|
|
#include "query_result.h"
|
|
|
|
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *TableBuilder::create_table(const String &name) {
|
2020-12-01 23:37:10 +01:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *TableBuilder::integer(const String &name) {
|
2020-12-01 23:37:10 +01:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-14 13:56:25 +01:00
|
|
|
TableBuilder *TableBuilder::integer(const String &name, const int length) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
TableBuilder *TableBuilder::tiny_integer(const String &name) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
TableBuilder *TableBuilder::tiny_integer(const String &name, const int length) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-14 16:52:09 +01:00
|
|
|
TableBuilder *TableBuilder::small_integer(const String &name) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
TableBuilder *TableBuilder::small_integer(const String &name, const int length) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
TableBuilder *TableBuilder::real_float(const String &name) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
TableBuilder *TableBuilder::real_float(const String &name, const int size, const int d) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
TableBuilder *TableBuilder::real_double(const String &name) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
TableBuilder *TableBuilder::real_double(const String &name, const int size, const int d) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *TableBuilder::date(const String &name) {
|
2020-12-01 23:37:10 +01:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *TableBuilder::varchar(const String &name, const int length) {
|
2020-12-01 23:37:10 +01:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-20 01:39:52 +01:00
|
|
|
TableBuilder *TableBuilder::text(const String &name) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2020-12-01 23:37:10 +01:00
|
|
|
TableBuilder *TableBuilder::not_null() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
TableBuilder *TableBuilder::null() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-14 13:56:25 +01:00
|
|
|
TableBuilder *TableBuilder::defval(const String &val) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2020-12-01 23:37:10 +01:00
|
|
|
TableBuilder *TableBuilder::auto_increment() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *TableBuilder::primary_key(const String &name) {
|
2020-12-01 23:37:10 +01:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
TableBuilder *TableBuilder::primary_key() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
TableBuilder *TableBuilder::next_row() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-08-19 23:55:16 +02:00
|
|
|
TableBuilder *TableBuilder::ccreate_table() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
TableBuilder *TableBuilder::drop_table() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
TableBuilder *TableBuilder::drop_table_if_exists() {
|
|
|
|
return this;
|
|
|
|
}
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *TableBuilder::drop_table(const String &name) {
|
2021-08-19 23:55:16 +02:00
|
|
|
return this;
|
|
|
|
}
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *TableBuilder::drop_table_if_exists(const String &name) {
|
2021-08-19 23:55:16 +02:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
TableBuilder *TableBuilder::cdrop_table() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *TableBuilder::foreign_key(const String &name) {
|
2021-08-19 23:55:16 +02:00
|
|
|
return this;
|
|
|
|
}
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *TableBuilder::references(const String &table, const String &name) {
|
2021-08-19 23:55:16 +02:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-01 16:57:22 +01:00
|
|
|
Ref<QueryResult> TableBuilder::run() {
|
|
|
|
return Ref<QueryResult>();
|
2021-08-19 23:55:16 +02:00
|
|
|
}
|
2020-12-02 00:49:17 +01:00
|
|
|
|
2021-08-19 23:55:16 +02:00
|
|
|
void TableBuilder::run_query() {
|
2020-12-02 00:49:17 +01:00
|
|
|
}
|
|
|
|
|
2021-08-19 23:55:16 +02:00
|
|
|
void TableBuilder::print() {
|
|
|
|
printf("%s\n", result.c_str());
|
2020-12-01 23:37:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
TableBuilder::TableBuilder() {
|
|
|
|
}
|
|
|
|
|
|
|
|
TableBuilder::~TableBuilder() {
|
|
|
|
}
|