jet
jet copied to clipboard
[sqlite] GENERATED columns not being recognized
Discussed in https://github.com/go-jet/jet/discussions/297
Originally posted by yuphing-ong December 14, 2023 I tried a table like this:
CREATE TABLE test (
jvalues TEXT NOT NULL,
-- virtual column for json extracted column to be indexed
column1 STRING GENERATED ALWAYS as (JSON_EXTRACT(jvalues, "$.column1")) STORED,
);
but go-jet only generates this model (and associated table):
type TEST struct {
Jvalues string
}
I tried both virtual and stored, in case go-jet needed it to be STORED but no difference.
Is this a limitation of the driver, or go-jet?
It turned out to be a small change. I've made a fix on sqlite_gen_col branch.
Sqlite support for generated columns added in Release v2.11.0.