mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-27 20:34:12 +02:00
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>
This commit is contained in:
parent
77c240df56
commit
69619f68c2
1 changed files with 2 additions and 0 deletions
|
|
@ -167,6 +167,7 @@ COLUMN_TYPE_MAPPING = {
|
||||||
int: "INTEGER",
|
int: "INTEGER",
|
||||||
bool: "INTEGER",
|
bool: "INTEGER",
|
||||||
str: "TEXT",
|
str: "TEXT",
|
||||||
|
dict: "TEXT",
|
||||||
bytes.__class__: "BLOB",
|
bytes.__class__: "BLOB",
|
||||||
bytes: "BLOB",
|
bytes: "BLOB",
|
||||||
memoryview: "BLOB",
|
memoryview: "BLOB",
|
||||||
|
|
@ -185,6 +186,7 @@ COLUMN_TYPE_MAPPING = {
|
||||||
"integer": "INTEGER",
|
"integer": "INTEGER",
|
||||||
"float": "FLOAT",
|
"float": "FLOAT",
|
||||||
"blob": "BLOB",
|
"blob": "BLOB",
|
||||||
|
|
||||||
}
|
}
|
||||||
# If numpy is available, add more types
|
# If numpy is available, add more types
|
||||||
if np:
|
if np:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue