Eko
Eko
DTDrizzle Team
Created by Eko on 6/13/2023 in #help
Drizzle npm package not working
Hey guys, I have tried to create an npm package with my drizzle schema and types but when installing it and importing I keep getting this
Error: node_modules/drizzle-orm/db.d-a6fe1b19.d.ts:521:15 - error TS2515: Non-abstract class 'PgSelect<TTableName, TSelection, TSelectMode, TNullabilityMap>' does not implement inherited abstract member 'getSQL' from class 'PgSelectQueryBuilder<PgSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'.

521 declare class PgSelect<TTableName extends string | undefined, TSelection, TSelectMode extends SelectMode, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, 'not-null'> : {}> extends PgSelectQueryBuilder<PgSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap> {
~~~~~~~~


Error: node_modules/drizzle-orm/db.d-a6fe1b19.d.ts:654:15 - error TS2420: Class 'PgDelete<TTable, TQueryResult, TReturning>' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'PgDelete<TTable, TQueryResult, TReturning>' but required in type 'SQLWrapper'.

654 declare class PgDelete<TTable extends AnyPgTable, TQueryResult extends QueryResultHKT, TReturning extends Record<string, unknown> | undefined = undefined> extends QueryPromise<TReturning extends undefined ? QueryResultKind<TQueryResult, never> : TReturning[]> implements SQLWrapper {
~~~~~~~~

node_modules/drizzle-orm/column.d-66a08b85.d.ts:258:5
258 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.
Error: node_modules/drizzle-orm/db.d-a6fe1b19.d.ts:521:15 - error TS2515: Non-abstract class 'PgSelect<TTableName, TSelection, TSelectMode, TNullabilityMap>' does not implement inherited abstract member 'getSQL' from class 'PgSelectQueryBuilder<PgSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'.

521 declare class PgSelect<TTableName extends string | undefined, TSelection, TSelectMode extends SelectMode, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, 'not-null'> : {}> extends PgSelectQueryBuilder<PgSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap> {
~~~~~~~~


Error: node_modules/drizzle-orm/db.d-a6fe1b19.d.ts:654:15 - error TS2420: Class 'PgDelete<TTable, TQueryResult, TReturning>' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'PgDelete<TTable, TQueryResult, TReturning>' but required in type 'SQLWrapper'.

654 declare class PgDelete<TTable extends AnyPgTable, TQueryResult extends QueryResultHKT, TReturning extends Record<string, unknown> | undefined = undefined> extends QueryPromise<TReturning extends undefined ? QueryResultKind<TQueryResult, never> : TReturning[]> implements SQLWrapper {
~~~~~~~~

node_modules/drizzle-orm/column.d-66a08b85.d.ts:258:5
258 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.
1 replies
DTDrizzle Team
Created by Eko on 5/23/2023 in #help
Select with relation
Is there a way to get relations when using db.select().from(table)I can't get the db.query.table.findManyto work, so if someone could help me get that setup that would be fine too
21 replies