Skip to content

Commit 591e8a5

Browse files
committed
chore: bump version to 1.0.6 in package.json and update delete method signature in Repository class
1 parent 4df3909 commit 591e8a5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sqlkit",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "A lightweight SQL builder for TypeScript",
55
"license": "MIT",
66
"author": {

src/repository/repository.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,13 @@ export class Repository<T> {
105105
}
106106

107107
async delete(
108-
where: WhereCondition<T>,
109-
returning?: Array<keyof T>
108+
arg: {
109+
where: WhereCondition<T>;
110+
returning?: Array<keyof T>;
111+
}
110112
): Promise<T | null> {
111113
const builder = new DeleteQueryBuilder<T>(this.tableName, this.executor);
112-
const result = await builder.where(where).returning(returning).commit();
114+
const result = await builder.where(arg.where).returning(arg.returning).commit();
113115
return result.rows[0] ?? null;
114116
}
115117
}

0 commit comments

Comments
 (0)