Skip to content

Commit

Permalink
docs: sync Database.run docs with types (#9993)
Browse files Browse the repository at this point in the history
  • Loading branch information
zpix1 authored Jul 9, 2024
1 parent a703d2d commit 68ba6b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/bun-types/sqlite.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ declare module "bun:sqlite" {
* ```ts
* const db = new Database("mydb.sqlite");
* db.run("CREATE TABLE foo (bar TEXT)");
* db.run("INSERT INTO foo VALUES (?)", "baz");
* db.run("INSERT INTO foo VALUES (?)", ["baz"]);
* console.log(db.query("SELECT * FROM foo").all());
* ```
*
Expand All @@ -47,7 +47,7 @@ declare module "bun:sqlite" {
* ```ts
* const db = new Database(":memory:");
* db.run("CREATE TABLE foo (bar TEXT)");
* db.run("INSERT INTO foo VALUES (?)", "hiiiiii");
* db.run("INSERT INTO foo VALUES (?)", ["hiiiiii"]);
* console.log(db.query("SELECT * FROM foo").all());
* ```
*
Expand Down Expand Up @@ -158,7 +158,7 @@ declare module "bun:sqlite" {
* @example
* ```ts
* db.run("CREATE TABLE foo (bar TEXT)");
* db.run("INSERT INTO foo VALUES (?)", "baz");
* db.run("INSERT INTO foo VALUES (?)", ["baz"]);
* ```
*
* Useful for queries like:
Expand Down Expand Up @@ -268,9 +268,9 @@ declare module "bun:sqlite" {
* @example
* ```ts
* db.run("CREATE TABLE foo (bar TEXT)");
* db.run("INSERT INTO foo VALUES (?)", "baz");
* db.run("INSERT INTO foo VALUES (?)", ["baz"]);
* db.run("BEGIN");
* db.run("INSERT INTO foo VALUES (?)", "qux");
* db.run("INSERT INTO foo VALUES (?)", ["qux"]);
* console.log(db.inTransaction());
* ```
*/
Expand Down

0 comments on commit 68ba6b9

Please sign in to comment.