Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
chientrm committed Aug 24, 2023
1 parent dd4b8a7 commit ea8adff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/proxies/d1_database/prepared_statement/all/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class D1DatabasePreparedStatementAllProxy extends Proxy<Metadata> {
const d1 = env[this.name] as D1Database,
{ query, values } = this.metadata,
statement1 = d1.prepare(query),
statement2 = values ? statement1.bind(values) : statement1,
statement2 = values ? statement1.bind(...values) : statement1,
result = await statement2.all();
return new Response(JSON.stringify(result), jsonInit);
}
Expand Down
2 changes: 1 addition & 1 deletion src/proxies/d1_database/prepared_statement/first/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class D1DatabasePreparedStatementFirstProxy extends Proxy<Metadata> {
const d1 = env[this.name] as D1Database,
{ query, values, colName } = this.metadata!,
statement1 = d1.prepare(query),
statement2 = values ? statement1.bind(values) : statement1,
statement2 = values ? statement1.bind(...values) : statement1,
statement3 = colName ? statement2.first(colName) : statement2.first(),
result = await statement3;
return new Response(JSON.stringify(result), jsonInit);
Expand Down
2 changes: 1 addition & 1 deletion src/proxies/d1_database/prepared_statement/run/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class D1DatabasePreparedStatementRunProxy extends Proxy<Metadata> {
const d1 = env[this.name] as D1Database,
{ query, values } = this.metadata!,
statement1 = d1.prepare(query),
statement2 = values ? statement1.bind(values) : statement1,
statement2 = values ? statement1.bind(...values) : statement1,
result = await statement2.run();
return new Response(JSON.stringify(result), jsonInit);
}
Expand Down

0 comments on commit ea8adff

Please sign in to comment.