Skip to content

Commit

Permalink
chore: super express query example
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonShin committed Aug 26, 2023
1 parent ad13e14 commit 1df6e73
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/demo/typescript/expression/super.queries.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


export type SuperQueryParams = [];


export interface ISuperQueryResult {
id: number;
};


export interface ISuperQueryQuery {
params: SuperQueryParams;
result: ISuperQueryResult;
};

17 changes: 17 additions & 0 deletions tests/demo/typescript/expression/super.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { sql } from 'sqlx-ts'

class SuperClass {
constructor(sqlTest: string) {
console.log(sqlTest);
}
}

class ChildClass extends SuperClass {
constructor() {
super(sql`
-- @name: super query
SELECT id FROM items
`);
}
}

0 comments on commit 1df6e73

Please sign in to comment.