Closed simonw closed 1 year ago
... and it turns out running .transform() with no arguments still fixes the format of the schema!
.transform()
>>> db["log"].add_column("foo", str) <Table log (id, name2, age, weight, foo)> >>> db["log"].add_column("bar", str) <Table log (id, name2, age, weight, foo, bar)> >>> db["log"].add_column("baz", str) <Table log (id, name2, age, weight, foo, bar, baz)> >>> print(db["log"].schema) CREATE TABLE "log" ( [id] INTEGER PRIMARY KEY, [name2] TEXT, [age] INTEGER, [weight] FLOAT , [foo] TEXT, [bar] TEXT, [baz] TEXT) >>> db["log"].transform() <Table log (id, name2, age, weight, foo, bar, baz)> >>> print(db["log"].schema) CREATE TABLE "log" ( [id] INTEGER PRIMARY KEY, [name2] TEXT, [age] INTEGER, [weight] FLOAT, [foo] TEXT, [bar] TEXT, [baz] TEXT )
Originally posted by @simonw in https://github.com/simonw/llm/issues/65#issuecomment-1618347727
Originally posted by @simonw in https://github.com/simonw/llm/issues/65#issuecomment-1618347727