Merge pull request #218 from Ssamm45/master

sysTimeToValue should be in the MySql Class not the MySqlResult class
This commit is contained in:
Adam D. Ruppe 2019-09-30 18:36:28 -04:00 committed by GitHub
commit 000850256a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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));
}