diff options
author | 2009-07-17 17:09:55 -0400 | |
---|---|---|
committer | 2009-07-17 17:09:55 -0400 | |
commit | ca3ca2898d4da691936e318fa6b8962934452bac (patch) | |
tree | 6846986c807a6bfb17021ee1fbe3bc74470f6f6f /src/sqlite.sml | |
parent | 7ad34807bd19c3ad0c84a30401c1fafc37e59775 (diff) |
Timestamps working with SQLite
Diffstat (limited to 'src/sqlite.sml')
-rw-r--r-- | src/sqlite.sml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sqlite.sml b/src/sqlite.sml index ce87de6d..b515d313 100644 --- a/src/sqlite.sml +++ b/src/sqlite.sml @@ -37,7 +37,7 @@ fun p_sql_type t = | Float => "real" | String => "text" | Bool => "integer" - | Time => "integer" + | Time => "text" | Blob => "blob" | Channel => "integer" | Client => "integer" @@ -371,7 +371,7 @@ fun p_getcol {loc, wontLeakStrings, col = i, typ = t} = else box [string "uw_strdup(ctx, sqlite3_column_text(stmt, ", string (Int.toString i), string "))"] | Bool => box [string "(uw_Basis_bool)sqlite3_column_int(stmt, ", string (Int.toString i), string ")"] - | Time => box [string "(uw_Basis_time)sqlite3_column_int64(stmt, ", string (Int.toString i), string ")"] + | Time => box [string "uw_Basis_stringToTime_error(ctx, sqlite3_column_text(stmt, ", string (Int.toString i), string "))"] | Blob => box [string "({", newline, string "char *data = sqlite3_column_blob(stmt, ", @@ -526,11 +526,11 @@ fun p_inputs loc = string ", ", arg, string ")"] - | Time => box [string "sqlite3_bind_int64(stmt, ", + | Time => box [string "sqlite3_bind_text(stmt, ", string (Int.toString (i + 1)), - string ", ", + string ", uw_Basis_attrifyTime(ctx, ", arg, - string ")"] + string "), -1, SQLITE_TRANSIENT)"] | Blob => box [string "sqlite3_bind_blob(stmt, ", string (Int.toString (i + 1)), string ", ", |