fix: parser no longer breaks on encountering indexes that contain expression columns
This commit is contained in:
parent
f74da53c37
commit
89db9e14e2
@ -39,6 +39,7 @@ type Index struct {
|
||||
Columns []string
|
||||
IsUnique bool `db:"is_unique"`
|
||||
// TODO: `where ...` for partial indexes
|
||||
// TODO: identify columns that are expressions
|
||||
}
|
||||
|
||||
type Schema struct {
|
||||
|
||||
@ -33,7 +33,8 @@ create temporary view indexes as
|
||||
|
||||
create temporary view index_columns as
|
||||
select indexes.index_name,
|
||||
idx_cols.name as column_name,
|
||||
idx_cols.cid as column_idx,
|
||||
ifnull(idx_cols.name, '') as column_name,
|
||||
idx_cols.seqno as rank
|
||||
from indexes
|
||||
join pragma_index_info(indexes.index_name) as idx_cols;
|
||||
|
||||
@ -43,6 +43,7 @@ create table foods (rowid integer primary key,
|
||||
cook_ratio real not null default 1
|
||||
) strict;
|
||||
create index foods_protein on foods(protein);
|
||||
create index foods_fake_index on foods(protein + 1);
|
||||
|
||||
|
||||
create table units (rowid integer primary key,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user