added test for date and time, sql read and write functionality
This commit is contained in:
@@ -178,8 +178,10 @@ utils::basic_type oid2type(const Oid oid) {
|
||||
return utils::basic_type::Double;
|
||||
case 1082:
|
||||
return utils::basic_type::Date;
|
||||
case 1114:
|
||||
case 1083:
|
||||
return utils::basic_type::Time;
|
||||
case 1114:
|
||||
return utils::basic_type::DateTime;
|
||||
default:
|
||||
return utils::basic_type::Null;
|
||||
}
|
||||
@@ -201,9 +203,12 @@ utils::basic_type string2type(const char *type) {
|
||||
if (strcmp(type, "date") == 0) {
|
||||
return utils::basic_type::Date;
|
||||
}
|
||||
if (strcmp(type, "timestamp") == 0) {
|
||||
if (strcmp(type, "time") == 0) {
|
||||
return utils::basic_type::Time;
|
||||
}
|
||||
if (strcmp(type, "timestamp") == 0) {
|
||||
return utils::basic_type::DateTime;
|
||||
}
|
||||
if (strcmp(type, "float4") == 0) {
|
||||
return utils::basic_type::Float;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user