diff options
author | 2022-05-16 17:40:33 -0700 | |
---|---|---|
committer | 2022-05-16 17:40:33 -0700 | |
commit | e31f44c3d192efa427bb774846b38eb649ed934a (patch) | |
tree | af4df57d81db26d94d4557d1c88ec192d73d3c45 | |
parent | 0d12a1f9ee8b19393ae2dd95d8c4007e84a63ca9 (diff) | |
download | bun-e31f44c3d192efa427bb774846b38eb649ed934a.tar.gz bun-e31f44c3d192efa427bb774846b38eb649ed934a.tar.zst bun-e31f44c3d192efa427bb774846b38eb649ed934a.zip |
Update README.md
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2128,14 +2128,14 @@ db.run( // Statement object var statement = db.query("SELECT * FROM foo WHERE count = ?"); -// return all the query results as an array of arrays, binding 2 to "count" +// return the first row as an object, binding 2 to the count parameter statement.get(2); // => { id: 1, greeting: "Welcome to bun!", count: 2 } // Statement object, but with named parameters var statement = db.query("SELECT * FROM foo WHERE count = $count"); -// return all the query results as an array of arrays, binding 2 to "count" +// return the first row as an object, binding 2 to the count parameter statement.get({ $count: 2 }); // => { id: 1, greeting: "Welcome to bun!", count: 2 } ``` |