Hey! If I create a db with d1, can I access the database from pgAdmin4 on my laptop to read and writ
Hey! If I create a db with d1, can I access the database from pgAdmin4 on my laptop to read and write data?
npx wrangler --env dev d1 execute workers-db --command="DROP TABLE account"account, user, comment but it responds withnear "comment": syntax error at offset 19 [code: 7500]--local flag and once without incomplete input [code: 7500]CREATE TRIGGER update_channels_updatedAt
AFTER UPDATE ON channels
FOR EACH ROW
BEGIN
UPDATE channels SET updatedAt = CURRENT_TIMESTAMP WHERE _id = NEW._id;
END;.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.npx wrangler --env dev d1 execute workers-db --command="DROP TABLE account"account, user, commentnear "comment": syntax error at offset 19 [code: 7500]--local incomplete input [code: 7500]CREATE TRIGGER update_channels_updatedAt
AFTER UPDATE ON channels
FOR EACH ROW
BEGIN
UPDATE channels SET updatedAt = CURRENT_TIMESTAMP WHERE _id = NEW._id;
END;.get().get()db.prepare(blah).bind(somevar).get().first().first()wrangler d1 createINSERT IGNOREdb.prepare(query).all(params)db.prepare(query).all()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];