since I can't find documents on what data types that D1 supports.
since I can't find documents on what data types that D1 supports.
default current_timestamp and it is working wellIf the default value of a column is CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP, then the value used in the new row is a text representation of the current UTC date and/or time. For CURRENT_TIME, the format of the value is "HH:MM:SS". For CURRENT_DATE, "YYYY-MM-DD". The format for CURRENT_TIMESTAMP is "YYYY-MM-DD HH:MM:SS".from https://www.sqlite.org/lang_createtable.html
INTEGER and maintain the value by code logic..wrangler d1 info command. https://developers.cloudflare.com/workers/wrangler/commands/#info
too many SQL variables at offset seems d1 supports only 10 parameters, so even simple inserts like this will fail:offset in errors ? syntax error at offset 245 On what line I should look for the error to correct it.
{"D1_RESET_DO":true} Any idea what is this?
Error: D1_TYPE_ERROR: Type 'object' not supported for value '123string,134,123string,0,0.17,comercial@ (...)wrangler d1 infotoo many SQL variables at offsetoffsetsyntax error at offset 245{"D1_RESET_DO":true}Error: D1_TYPE_ERROR: Type 'object' not supported for value '123string,134,123string,0,0.17,comercial@const sqlite = new Database("db.sqlite");
const db = drizzle<typeof schema>(sqlite, { schema });
const books = new Array(35).fill({}).map((b, i) => ({
id: i.toString(),
title: "The Great Gatsby",
description: "A book about a rich guy",
}));
await db.insert(schema.books).values(books);