Added text to TableBuilder.

This commit is contained in:
Relintai 2021-11-20 01:39:52 +01:00
parent 38b95e4ac8
commit 64a1352f97
4 changed files with 16 additions and 0 deletions

View File

@ -50,6 +50,10 @@ TableBuilder *TableBuilder::varchar(const String &name, const int length) {
return this;
}
TableBuilder *TableBuilder::text(const String &name) {
return this;
}
TableBuilder *TableBuilder::not_null() {
return this;
}

View File

@ -27,7 +27,10 @@ public:
virtual TableBuilder *real_double(const String &name, const int size, const int d);
virtual TableBuilder *date(const String &name);
virtual TableBuilder *varchar(const String &name, const int length);
virtual TableBuilder *text(const String &name);
virtual TableBuilder *not_null();
virtual TableBuilder *null();
virtual TableBuilder *defval(const String &val);

View File

@ -83,6 +83,12 @@ TableBuilder *SQLite3TableBuilder::varchar(const String &name, const int length)
return this;
}
TableBuilder *SQLite3TableBuilder::text(const String &name) {
result += name + " TEXT ";
return this;
}
TableBuilder *SQLite3TableBuilder::not_null() {
//result += "NOT NULL ";

View File

@ -27,7 +27,10 @@ public:
TableBuilder *real_double(const String &name, const int size, const int d);
TableBuilder *date(const String &name);
TableBuilder *varchar(const String &name, const int length);
TableBuilder *text(const String &name);
TableBuilder *not_null();
TableBuilder *null();
TableBuilder *defval(const String &val);