Skip to content

Adds interval data type related test cases #553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create example query with interval.
Yasiru Kassapa committed Nov 27, 2023

Unverified

No user is associated with the committer email.
commit acd1efaa3713e061090ef596744ca30492d9b2ae
30 changes: 30 additions & 0 deletions packages/example/src/audio_books/audio_books.queries.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/** Types generated for queries found in "src/audio_books/audio_books.sql" */
import { PreparedQuery } from '@pgtyped/runtime';

/** 'GetAudioBooks' parameters type */
export type IGetAudioBooksParams = void;

/** 'GetAudioBooks' return type */
export interface IGetAudioBooksResult {
duration: string;
id: number;
text_book_id: number | null;
}

/** 'GetAudioBooks' query type */
export interface IGetAudioBooksQuery {
params: IGetAudioBooksParams;
result: IGetAudioBooksResult;
}

const getAudioBooksIR: any = {"usedParamSet":{},"params":[],"statement":"select * from audio_books"};

/**
* Query generated from SQL:
* ```
* select * from audio_books
* ```
*/
export const getAudioBooks = new PreparedQuery<IGetAudioBooksParams,IGetAudioBooksResult>(getAudioBooksIR);


2 changes: 2 additions & 0 deletions packages/example/src/audio_books/audio_books.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* @name getAudioBooks */
select * from audio_books;