If you have a table where every column has a default configured you should be able to insert empty objects into it and have everything work - but instead you get this error:
uv run --with sqlite-utils python -c '
import sqlite_utils
db = sqlite_utils.Database(memory=True)
db.execute("""
CREATE TABLE has_defaults (
id INTEGER PRIMARY KEY,
timestamp TEXT DEFAULT CURRENT_TIMESTAMP
);
""")
db.execute("INSERT INTO has_defaults DEFAULT VALUES")
print(list(db.execute("SELECT id, timestamp FROM has_defaults")))
db.table("has_defaults").insert({})
'
batch_size = max(1, min(batch_size, SQLITE_MAX_VARS // num_columns)) ~~~~~~~~~~~~~~~~^^~~~~~~~~~~~~
ZeroDivisionError: division by zero
If you have a table where every column has a default configured you should be able to insert empty objects into it and have everything work - but instead you get this error: