From 69619f68c26478fdee479110e084fd22711013a3 Mon Sep 17 00:00:00 2001 From: Mina Rizk Date: Wed, 25 Aug 2021 22:52:33 +0200 Subject: [PATCH] Add dict type to be mapped as TEXT in sqllite the library deal with postgres type jsob as dictionary, add dict type as a TEXT for mapping to sqlite> --- sqlite_utils/db.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sqlite_utils/db.py b/sqlite_utils/db.py index 93d25b2..d0e6e83 100644 --- a/sqlite_utils/db.py +++ b/sqlite_utils/db.py @@ -167,6 +167,7 @@ COLUMN_TYPE_MAPPING = { int: "INTEGER", bool: "INTEGER", str: "TEXT", + dict: "TEXT", bytes.__class__: "BLOB", bytes: "BLOB", memoryview: "BLOB", @@ -185,6 +186,7 @@ COLUMN_TYPE_MAPPING = { "integer": "INTEGER", "float": "FLOAT", "blob": "BLOB", + } # If numpy is available, add more types if np: