mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Added smallint, float, and double types to the TableBuilder.
This commit is contained in:
parent
ad632993d0
commit
1ec66db3c7
@ -21,6 +21,27 @@ TableBuilder *TableBuilder::tiny_integer(const String &name, const int length) {
|
||||
return this;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
TableBuilder *TableBuilder::date(const String &name) {
|
||||
return this;
|
||||
}
|
||||
|
@ -17,6 +17,15 @@ public:
|
||||
virtual TableBuilder *tiny_integer(const String &name);
|
||||
virtual TableBuilder *tiny_integer(const String &name, const int length);
|
||||
|
||||
virtual TableBuilder *small_integer(const String &name);
|
||||
virtual TableBuilder *small_integer(const String &name, const int length);
|
||||
|
||||
virtual TableBuilder *real_float(const String &name);
|
||||
virtual TableBuilder *real_float(const String &name, const int size, const int d);
|
||||
|
||||
virtual TableBuilder *real_double(const String &name);
|
||||
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 *not_null();
|
||||
|
@ -24,7 +24,7 @@ TableBuilder *SQLite3TableBuilder::integer(const String &name, const int length)
|
||||
}
|
||||
|
||||
TableBuilder *SQLite3TableBuilder::tiny_integer(const String &name) {
|
||||
result += name + " INTEGER ";
|
||||
result += name + " INTEGER(4) ";
|
||||
|
||||
return this;
|
||||
}
|
||||
@ -33,6 +33,40 @@ TableBuilder *SQLite3TableBuilder::tiny_integer(const String &name, const int le
|
||||
result += String::num(length);
|
||||
result += ") ";
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
TableBuilder *SQLite3TableBuilder::small_integer(const String &name) {
|
||||
result += name + " INTEGER(6) ";
|
||||
|
||||
return this;
|
||||
}
|
||||
TableBuilder *SQLite3TableBuilder::small_integer(const String &name, const int length) {
|
||||
result += name + " INTEGER(";
|
||||
result += String::num(length);
|
||||
result += ") ";
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
TableBuilder *SQLite3TableBuilder::real_float(const String &name) {
|
||||
result += name + " FLOAT ";
|
||||
|
||||
return this;
|
||||
}
|
||||
TableBuilder *SQLite3TableBuilder::real_float(const String &name, const int size, const int d) {
|
||||
result += name + " FLOAT ";
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
TableBuilder *SQLite3TableBuilder::real_double(const String &name) {
|
||||
result += name + " DOUBLE ";
|
||||
|
||||
return this;
|
||||
}
|
||||
TableBuilder *SQLite3TableBuilder::real_double(const String &name, const int size, const int d) {
|
||||
result += name + " DOUBLE ";
|
||||
|
||||
return this;
|
||||
}
|
||||
|
@ -17,6 +17,15 @@ public:
|
||||
TableBuilder *tiny_integer(const String &name);
|
||||
TableBuilder *tiny_integer(const String &name, const int length);
|
||||
|
||||
TableBuilder *small_integer(const String &name);
|
||||
TableBuilder *small_integer(const String &name, const int length);
|
||||
|
||||
TableBuilder *real_float(const String &name);
|
||||
TableBuilder *real_float(const String &name, const int size, const int d);
|
||||
|
||||
TableBuilder *real_double(const String &name);
|
||||
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 *not_null();
|
||||
|
Loading…
Reference in New Issue
Block a user