mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
add_column now accepts explicit SQLite types, refs #15
This commit is contained in:
parent
c5286d2c66
commit
6d25f648ed
3 changed files with 25 additions and 1 deletions
|
|
@ -30,6 +30,15 @@ COLUMN_TYPE_MAPPING = {
|
|||
datetime.date: "TEXT",
|
||||
datetime.time: "TEXT",
|
||||
None.__class__: "TEXT",
|
||||
# SQLite explicit types
|
||||
"TEXT": "TEXT",
|
||||
"INTEGER": "INTEGER",
|
||||
"FLOAT": "FLOAT",
|
||||
"BLOB": "BLOB",
|
||||
"text": "TEXT",
|
||||
"integer": "INTEGER",
|
||||
"float": "FLOAT",
|
||||
"blob": "BLOB",
|
||||
}
|
||||
# If numpy is available, add more types
|
||||
if np:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue