Skip to content
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

feat: added array type handler & completed well known defs for all PG data types #51

Merged
merged 21 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { hydrate } from './hydrate';
import { SynthqlError } from '../../../SynthqlError';

// Use the OIDs imported from pg.types to set custom type parsers
types.setTypeParser(types.builtins.TIME, (value) => value);
jimezesinachi marked this conversation as resolved.
Show resolved Hide resolved
types.setTypeParser(types.builtins.TIMETZ, (value) => value);
types.setTypeParser(types.builtins.DATE, (value) => value);
types.setTypeParser(types.builtins.TIMESTAMP, (value) => value);
types.setTypeParser(types.builtins.TIMESTAMPTZ, (value) => value);
Expand Down
15 changes: 10 additions & 5 deletions packages/backend/src/tests/generated/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ export type PgCatalogNumeric = string;
* The mpaa_rating enum from the public schema
*/
export type PublicMpaaRatingEnum = 'G' | 'PG' | 'PG-13' | 'R' | 'NC-17';
/**
* A PG text
*/
export type PgCatalogText2 = string;
export type PgCatalogText1 = PgCatalogText2[];
jimezesinachi marked this conversation as resolved.
Show resolved Hide resolved
/**
* A PG tsvector
*/
Expand All @@ -65,10 +70,6 @@ export type PgCatalogTsvector = string;
* A PG bpchar
*/
export type PgCatalogBpchar = string;
/**
* A PG bytea
*/
export type PgCatalogBytea = string;

/**
* Your database's schema
Expand Down Expand Up @@ -698,7 +699,7 @@ export interface TableFilm {
* - Generated: NEVER
*/
special_features: {
type: PgCatalogText;
type: PgCatalogText1;
selectable: true;
includable: true;
whereable: true;
Expand Down Expand Up @@ -1814,6 +1815,10 @@ export interface TableStaff {
};
};
}
/**
* A PG bytea
*/
export interface PgCatalogBytea {}
/**
* Table details:
*
Expand Down
Loading