- sysTimeToValue should be in the MySql Class not the MySqlResult class

This commit is contained in:
Sam Larkin 2019-09-30 15:58:07 -06:00
parent 6734ac6cf3
commit a863d6639a
1 changed files with 5 additions and 3 deletions

View File

@ -74,9 +74,6 @@ class MySqlResult : ResultSet {
mysql_free_result(result);
}
string sysTimeToValue(SysTime s) {
return "cast('" ~ escape(s.toISOExtString()) ~ "' as datetime)";
}
MYSQL_FIELD[] fields() {
int numFields = mysql_num_fields(result);
@ -222,6 +219,11 @@ class MySql : Database {
query("START TRANSACTION");
}
string sysTimeToValue(SysTime s) {
return "cast('" ~ escape(s.toISOExtString()) ~ "' as datetime)";
}
string error() {
return fromCstring(mysql_error(mysql));
}