sqlite_lint: add support for FTS5 and virtual tables
This commit is contained in:
@@ -38,10 +38,10 @@ func SchemaFromDB(db *sqlx.DB) Schema {
|
||||
ret := Schema{Tables: map[string]Table{}, Indexes: map[string]Index{}}
|
||||
|
||||
var tables []Table
|
||||
PanicIf(db.Select(&tables, `select name, is_strict, is_without_rowid from tables`))
|
||||
PanicIf(db.Select(&tables, `select name, table_type, is_strict, is_without_rowid from tables`))
|
||||
for _, tbl := range tables {
|
||||
tbl.TypeName = TypenameFromTablename(tbl.TableName)
|
||||
tbl.TypeIDName = tbl.TypeName + "ID"
|
||||
tbl.GoTypeName = TypenameFromTablename(tbl.TableName)
|
||||
tbl.TypeIDName = tbl.GoTypeName + "ID"
|
||||
tbl.VarName = strings.ToLower(string(tbl.TableName[0]))
|
||||
|
||||
PanicIf(db.Select(&tbl.Columns, `select * from columns where table_name = ?`, tbl.TableName))
|
||||
|
||||
Reference in New Issue
Block a user