Wondering if last_insert_rowid will get wonky if multiple users are inserting concurrently.
Wondering if last_insert_rowid will get wonky if multiple users are inserting concurrently.
.get() method to retrieve a single row in the db. Not that it's the end of the world that I have to do .all()[0] but it seems... weird, that I can't just do db.prepare(blah).bind(somevar).get() ?.first()wrangler d1 create for each one https://developers.cloudflare.com/workers/wrangler/commands/#create
INSERT IGNORE?db.prepare(query).all(params)..first() instead of .get() is a separate "why would this be different" issue. Like, I don't want to sound rude, it just feels like there's no legitimate reason for these things to not use a more standardised sqlite APIdb.prepare(query).all() is valid.--json to wrangler.
please wait and consider throttling your request speed [code: 971]. What would be the best way to create a large amount (100k rows) in d1?Error: A prepared SQL statement must contain only one statement.
.get().get()db.prepare(blah).bind(somevar).get()wrangler d1 createINSERT IGNOREdb.prepare(query).all(params)db.prepare(query).all()npx wrangler d1 execute wow-classic-us-seasonal --command "SELECT * FROM characters ORDER BY pvp_rank DESC LIMIT 5"--json➜ wrangler d1 execute db-enam --command "PRAGMA table_list" --json | jq '.[].meta'
{
"duration": 0.1513,
"changes": 0,
"last_row_id": 0,
"changed_db": false,
"size_after": 1832153088,
"rows_read": 0,
"rows_written": 0
}please wait and consider throttling your request speed [code: 971]Error: A prepared SQL statement must contain only one statement.const table = this.#db
.prepare(
"SELECT count(*) FROM sqlite_master WHERE type='table' AND name = ?;",
).bind(this.#name).get();
// vs
const table = this.#db
.prepare(
"SELECT count(*) FROM sqlite_master WHERE type='table' AND name = ?;",
).bind(this.#name).all()[0];