-
-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Labels
Description
... and it turns out running
.transform()
with no arguments still fixes the format of the schema!
>>> 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 simonw/llm#65 (comment)
chapmanjacobd