Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

PgDelete

interface PgDelete <TTable extends AnyPgTable, TQueryResult extends QueryResultHKT, TReturning extends Record<string, unknown> | undefined = undefined> extends QueryPromise<TReturning extends undefined ? QueryResultKind<TQueryResult, never> : TReturning[]> {}
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 {
constructor(
table: TTable,
session: PgSession,
dialect: PgDialect,
);
private _prepare;
private config;
private dialect;
private session;
execute: ReturnType<this["prepare"]>["execute"];
 
prepare(name: string): PreparedQuery<PreparedQueryConfig & {
execute: TReturning extends undefined ? QueryResultKind<TQueryResult, never> : TReturning[];
}
>
;
returning(): PgDelete<TTable, TQueryResult, InferModel<TTable>>;
returning<TSelectedFields extends SelectedFieldsFlat>(fields: TSelectedFields): PgDelete<TTable, TQueryResult, SelectResultFields<TSelectedFields>>;
toSQL(): Simplify<Omit<Query, "typings">>;
where(where: SQL | undefined): Omit<this, "where">;
}

§Type Parameters

§
TTable extends AnyPgTable
[src]
§
TQueryResult extends QueryResultHKT
[src]
§
TReturning extends Record<string, unknown> | undefined = undefined
[src]

§Extends

§
QueryPromise<TReturning extends undefined ? QueryResultKind<TQueryResult, never> : TReturning[]>
[src]

§Type Parameters

§
TTable extends AnyPgTable
[src]
§
TQueryResult extends QueryResultHKT
[src]
§
TReturning extends Record<string, unknown> | undefined = undefined
[src]

§Extends

§
QueryPromise<TReturning extends undefined ? QueryResultKind<TQueryResult, never> : TReturning[]>
[src]

§Implements

§Constructors

§
new PgDelete(table: TTable, session: PgSession, dialect: PgDialect)
[src]

§Properties

§
_prepare
[src]
§
config
[src]
§
dialect
[src]
§
session
[src]
§
execute: ReturnType<this["prepare"]>["execute"]
[src]

§Methods

§
prepare(name: string): PreparedQuery<PreparedQueryConfig & {
execute: TReturning extends undefined ? QueryResultKind<TQueryResult, never> : TReturning[];
}
>
[src]
§
returning(): PgDelete<TTable, TQueryResult, InferModel<TTable>>
[src]
returning<TSelectedFields extends SelectedFieldsFlat>(fields: TSelectedFields): PgDelete<TTable, TQueryResult, SelectResultFields<TSelectedFields>>
[src]
§
toSQL(): Simplify<Omit<Query, "typings">>
[src]
§
where(where: SQL | undefined): Omit<this, "where">
[src]