Skip to content

Commit

Permalink
feat: Add DO NOT EDIT comment to files (#17)
Browse files Browse the repository at this point in the history
* feat: Add DO NOT EDIT comment to files

* Update examples
  • Loading branch information
kyleconroy authored Mar 3, 2024
1 parent cb1253f commit 27833be
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/bun-mysql2/src/db/query_sql.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Code generated by sqlc. DO NOT EDIT.

import mysql, { RowDataPacket } from "mysql2/promise";

type Client = mysql.Connection | mysql.Pool;
Expand Down
2 changes: 2 additions & 0 deletions examples/bun-pg/src/db/query_sql.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Code generated by sqlc. DO NOT EDIT.

import { QueryArrayConfig, QueryArrayResult } from "pg";

interface Client {
Expand Down
2 changes: 2 additions & 0 deletions examples/bun-postgres/src/db/query_sql.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Code generated by sqlc. DO NOT EDIT.

import { Sql } from "postgres";

export const getAuthorQuery = `-- name: GetAuthor :one
Expand Down
2 changes: 2 additions & 0 deletions examples/node-better-sqlite3/src/db/query_sql.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Code generated by sqlc. DO NOT EDIT.

import { Database } from "better-sqlite3";

export const getAuthorQuery = `-- name: GetAuthor :one
Expand Down
2 changes: 2 additions & 0 deletions examples/node-mysql2/src/db/query_sql.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Code generated by sqlc. DO NOT EDIT.

import mysql, { RowDataPacket } from "mysql2/promise";

type Client = mysql.Connection | mysql.Pool;
Expand Down
2 changes: 2 additions & 0 deletions examples/node-pg/src/db/query_sql.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Code generated by sqlc. DO NOT EDIT.

import { QueryArrayConfig, QueryArrayResult } from "pg";

interface Client {
Expand Down
2 changes: 2 additions & 0 deletions examples/node-postgres/src/db/query_sql.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Code generated by sqlc. DO NOT EDIT.

import { Sql } from "postgres";

export const getAuthorQuery = `-- name: GetAuthor :one
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ function printNode(nodes: Node[]): string {
ScriptKind.TS
);
const printer = createPrinter({ newLine: NewLineKind.LineFeed });
let output = "";
let output = "// Code generated by sqlc. DO NOT EDIT.\n\n";
for (let node of nodes) {
output += printer.printNode(EmitHint.Unspecified, node, resultFile);
output += "\n\n";
Expand Down

0 comments on commit 27833be

Please sign in to comment.