Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6c419b9

Browse files
committed
feat: Support generating function comments
1 parent54496e9 commit6c419b9

File tree

11 files changed

+88
-17
lines changed

11 files changed

+88
-17
lines changed

‎examples/authors/mysql/query.sql‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ SELECT * FROM authors
77
ORDER BY name;
88

99
/* name: CreateAuthor :exec*/
10+
/* Create a new author.*/
1011
INSERT INTO authors (
1112
name, bio
1213
)VALUES (

‎examples/authors/postgresql/query.sql‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ SELECT * FROM authors
77
ORDER BY name;
88

99
-- name: CreateAuthor :one
10+
-- Create a new author.
11+
-- This is the second line.*/
12+
--/This is the third line.
1013
INSERT INTO authors (
1114
name, bio
1215
)VALUES (

‎examples/authors/sqlite/query.sql‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ SELECT * FROM authors
77
ORDER BY name;
88

99
-- name: CreateAuthor :exec
10+
-- Create a new author.
1011
INSERT INTO authors (
1112
name, bio
1213
)VALUES (

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ export interface CreateAuthorArgs {
7272
bio:string|null;
7373
}
7474

75+
/**
76+
* Create a new author.
77+
*/
7578
exportasyncfunctioncreateAuthor(client:Client,args:CreateAuthorArgs):Promise<void>{
7679
awaitclient.query({
7780
sql:createAuthorQuery,

‎examples/bun-pg/src/db/query_sql.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ export interface CreateAuthorRow {
8181
bio:string|null;
8282
}
8383

84+
/**
85+
* Create a new author.
86+
* This is the second line.*\/
87+
*\/This is the third line.
88+
*/
8489
exportasyncfunctioncreateAuthor(client:Client,args:CreateAuthorArgs):Promise<CreateAuthorRow|null>{
8590
constresult=awaitclient.query({
8691
text:createAuthorQuery,

‎examples/bun-postgres/src/db/query_sql.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ export interface CreateAuthorRow {
6969
bio:string|null;
7070
}
7171

72+
/**
73+
* Create a new author.
74+
* This is the second line.*\/
75+
*\/This is the third line.
76+
*/
7277
exportasyncfunctioncreateAuthor(sql:Sql,args:CreateAuthorArgs):Promise<CreateAuthorRow|null>{
7378
constrows=awaitsql.unsafe(createAuthorQuery,[args.name,args.bio]).values();
7479
if(rows.length!==1){

‎examples/node-better-sqlite3/src/db/query_sql.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ export interface CreateAuthorArgs {
5353
bio:any|null;
5454
}
5555

56+
/**
57+
* Create a new author.
58+
*/
5659
exportasyncfunctioncreateAuthor(database:Database,args:CreateAuthorArgs):Promise<void>{
5760
conststmt=database.prepare(createAuthorQuery);
5861
awaitstmt.run(args.name,args.bio);

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ export interface CreateAuthorArgs {
7272
bio:string|null;
7373
}
7474

75+
/**
76+
* Create a new author.
77+
*/
7578
exportasyncfunctioncreateAuthor(client:Client,args:CreateAuthorArgs):Promise<void>{
7679
awaitclient.query({
7780
sql:createAuthorQuery,

‎examples/node-pg/src/db/query_sql.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ export interface CreateAuthorRow {
8181
bio:string|null;
8282
}
8383

84+
/**
85+
* Create a new author.
86+
* This is the second line.*\/
87+
*\/This is the third line.
88+
*/
8489
exportasyncfunctioncreateAuthor(client:Client,args:CreateAuthorArgs):Promise<CreateAuthorRow|null>{
8590
constresult=awaitclient.query({
8691
text:createAuthorQuery,

‎examples/node-postgres/src/db/query_sql.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ export interface CreateAuthorRow {
6969
bio:string|null;
7070
}
7171

72+
/**
73+
* Create a new author.
74+
* This is the second line.*\/
75+
*\/This is the third line.
76+
*/
7277
exportasyncfunctioncreateAuthor(sql:Sql,args:CreateAuthorArgs):Promise<CreateAuthorRow|null>{
7378
constrows=awaitsql.unsafe(createAuthorQuery,[args.name,args.bio]).values();
7479
if(rows.length!==1){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp