Skip to content

Commit 0ca4cc9

Browse files
authored
docs(sql): docs of frontend Database select method (#1963)
1 parent 9dcad78 commit 0ca4cc9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changes/change-pr-1963.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"sql-js": patch
3+
---
4+
5+
Fixed incorrect documentation of the select method in the Database class.

plugins/sql/guest-js/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ export default class Database {
129129
* ```ts
130130
* // for sqlite & postgres
131131
* const result = await db.select(
132-
* "SELECT * from todos WHERE id = $1", id
132+
* "SELECT * from todos WHERE id = $1", [ id ]
133133
* );
134134
*
135135
* // for mysql
136136
* const result = await db.select(
137-
* "SELECT * from todos WHERE id = ?", id
137+
* "SELECT * from todos WHERE id = ?", [ id ]
138138
* );
139139
* ```
140140
*/

0 commit comments

Comments
 (0)