Skip to content

Commit 04d549e

Browse files
committed
update example
1 parent 72d6b03 commit 04d549e

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

examples/bun-mysql2/src/db/query_sql.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ SELECT id, name, bio FROM authors
77
WHERE id = ? LIMIT 1`;
88

99
export interface GetAuthorArgs {
10-
id: number;
10+
id: string;
1111
}
1212

1313
export interface GetAuthorRow {
14-
id: number;
14+
id: string;
1515
name: string;
1616
bio: string | null;
1717
}
@@ -38,7 +38,7 @@ SELECT id, name, bio FROM authors
3838
ORDER BY name`;
3939

4040
export interface ListAuthorsRow {
41-
id: number;
41+
id: string;
4242
name: string;
4343
bio: string | null;
4444
}
@@ -82,7 +82,7 @@ DELETE FROM authors
8282
WHERE id = ?`;
8383

8484
export interface DeleteAuthorArgs {
85-
id: number;
85+
id: string;
8686
}
8787

8888
export async function deleteAuthor(client: Client, args: DeleteAuthorArgs): Promise<void> {
@@ -105,8 +105,8 @@ export interface TestRow {
105105
cMediumint: number | null;
106106
cInt: number | null;
107107
cInteger: number | null;
108-
cBigint: number | null;
109-
cSerial: number;
108+
cBigint: string | null;
109+
cSerial: string;
110110
cDecimal: string | null;
111111
cDec: string | null;
112112
cNumeric: string | null;

examples/node-mysql2/src/db/query_sql.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ SELECT id, name, bio FROM authors
77
WHERE id = ? LIMIT 1`;
88

99
export interface GetAuthorArgs {
10-
id: number;
10+
id: string;
1111
}
1212

1313
export interface GetAuthorRow {
14-
id: number;
14+
id: string;
1515
name: string;
1616
bio: string | null;
1717
}
@@ -38,7 +38,7 @@ SELECT id, name, bio FROM authors
3838
ORDER BY name`;
3939

4040
export interface ListAuthorsRow {
41-
id: number;
41+
id: string;
4242
name: string;
4343
bio: string | null;
4444
}
@@ -82,7 +82,7 @@ DELETE FROM authors
8282
WHERE id = ?`;
8383

8484
export interface DeleteAuthorArgs {
85-
id: number;
85+
id: string;
8686
}
8787

8888
export async function deleteAuthor(client: Client, args: DeleteAuthorArgs): Promise<void> {
@@ -105,8 +105,8 @@ export interface TestRow {
105105
cMediumint: number | null;
106106
cInt: number | null;
107107
cInteger: number | null;
108-
cBigint: number | null;
109-
cSerial: number;
108+
cBigint: string | null;
109+
cSerial: string;
110110
cDecimal: string | null;
111111
cDec: string | null;
112112
cNumeric: string | null;

0 commit comments

Comments
 (0)