go-sqlite / sqlite3

pure-Go sqlite3 file reader
BSD 3-Clause "New" or "Revised" License
140 stars 19 forks source link

allow for columns to not specify a type #25

Closed adamdecaf closed 6 years ago

adamdecaf commented 6 years ago

Sqlite3 allows columns to not specify a type. Currently this code doesn't try to parse out types (as sqlite is dynamicly typed on column data) so we don't need to handle that.

https://sqlite.org/lang_createtable.html

adamdecaf commented 6 years ago

I haven't isolated an entire blank/empty safari history file (mine has some web history), but I re-created a partial which still exposes this edge case.

$ sqlite3 testdata/safari-partial.sqlite 
SQLite version 3.19.3 2017-06-27 16:48:08
Enter ".help" for usage hints.
sqlite> .schema
CREATE TABLE metadata (key TEXT NOT NULL UNIQUE, value);