diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2025-03-17 09:11:25 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2025-03-17 18:59:32 +0100 |
commit | 8b8b730d3ba98d6c9e4e6274844641043b5fefbb (patch) | |
tree | 4cb60dafa05b479d0ca287d501a51db88cecaaa4 /lib/sql/t.ml | |
parent | 7bfbb67d83011f3e1845dcb9e44c3b6a5e93a9da (diff) |
Moved the syntax module in its own library
Diffstat (limited to 'lib/sql/t.ml')
-rw-r--r-- | lib/sql/t.ml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/sql/t.ml b/lib/sql/t.ml index 202c535..2297125 100644 --- a/lib/sql/t.ml +++ b/lib/sql/t.ml @@ -39,14 +39,14 @@ let reset : Sqlite3.stmt -> unit result = fun statement -> to_result (Sqlite3.reset statement) let of_datatype = function - | ImportCSV.DataType.Float f -> Sqlite3.Data.FLOAT f - | ImportCSV.DataType.Integer i -> Sqlite3.Data.INT (Int64.of_int i) - | ImportCSV.DataType.Null -> Sqlite3.Data.NULL - | ImportCSV.DataType.Error _ -> Sqlite3.Data.NULL - | ImportCSV.DataType.Content s -> Sqlite3.Data.TEXT s - -let to_datatype : Sqlite3.Data.t -> ImportCSV.DataType.t = function - | Sqlite3.Data.NONE | Sqlite3.Data.NULL -> ImportCSV.DataType.Null - | Sqlite3.Data.INT i -> ImportCSV.DataType.Integer (Int64.to_int i) - | Sqlite3.Data.FLOAT f -> ImportCSV.DataType.Float f - | Sqlite3.Data.TEXT t | Sqlite3.Data.BLOB t -> ImportCSV.DataType.Content t + | ImportDataTypes.Value.Float f -> Sqlite3.Data.FLOAT f + | ImportDataTypes.Value.Integer i -> Sqlite3.Data.INT (Int64.of_int i) + | ImportDataTypes.Value.Null -> Sqlite3.Data.NULL + | ImportDataTypes.Value.Error _ -> Sqlite3.Data.NULL + | ImportDataTypes.Value.Content s -> Sqlite3.Data.TEXT s + +let to_datatype : Sqlite3.Data.t -> ImportDataTypes.Value.t = function + | Sqlite3.Data.NONE | Sqlite3.Data.NULL -> ImportDataTypes.Value.Null + | Sqlite3.Data.INT i -> ImportDataTypes.Value.Integer (Int64.to_int i) + | Sqlite3.Data.FLOAT f -> ImportDataTypes.Value.Float f + | Sqlite3.Data.TEXT t | Sqlite3.Data.BLOB t -> ImportDataTypes.Value.Content t |