Last active
November 22, 2022 04:02
-
-
Save ehatricksmith/01119643eb24823eb35fe35a330c4105 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { PreparedQuery } from '@pgtyped/query'; | |
export type file_retention_status = 'DELETED' | 'EXPIRED' | 'NOTIFIED' | 'PROCESSED'; | |
export type file_upload_status = 'CANCELLED' | 'DONE' | 'FAILED' | 'UPLOADING'; | |
export interface IGetFileByIdParams { | |
id: string; | |
} | |
export interface IGetFileByIdResult { | |
created_at: Date; | |
id: string; | |
size: number | null | |
type: string | null; | |
updated_at: Date; | |
upload_status: file_upload_status; | |
} | |
export interface IGetFileByIdQuery { | |
params: IGetFileByIdParams; | |
result: IGetFileByIdResult; | |
} | |
const getFileByIdIR: any = {"usedParamSet":{"id":true},"params":[{"name":"id","required":true,"transform":{"type":"scalar"},"locs":[{"a":39,"b":42}]}],"statement":"SELECT *\nFROM dovetail.file\nWHERE id = :id!"}; | |
/** | |
* Query generated from SQL: | |
* ``` | |
* SELECT * | |
* FROM dovetail.file | |
* WHERE id = :id! | |
* ``` | |
*/ | |
export const getFileById = new PreparedQuery<IGetFileByIdParams,IGetFileByIdResult>(getFileByIdIR); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment