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

PgUpdate

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

§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 PgUpdate(table: TTable, set: UpdateSet, session: PgSession, dialect: PgDialect)
[src]

§Properties

§
_prepare
[src]
§
config
[src]
§
dialect
[src]
§
session
[src]
§
_: {
readonly table: TTable;
readonly return: TReturning;
}
[src]
§
execute: ReturnType<this["prepare"]>["execute"]
[src]

§Methods

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