Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/lib/data/adapters/postgres.ts>PostgresRepository

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
class PostgresRepository
implements Repository<T>
import { PostgresRepository } from "https://deno.land/x/hex@0.6.5/src/lib/data/adapters/postgres.ts";

Constructors

new
PostgresRepository(connection: PostgresConnection<T>, table: string)

Properties

connection: PostgresConnection
table: string

Methods

add<R = T>(data: R): Promise<string>
find<F>(_filter: F): Promise<T | undefined>
findAll<F>(_filter: F): Promise<T[]>
get(id: string): Promise<T | undefined>
getAll(): Promise<T[]>
remove(id: string): Promise<void>
replace<R = T>(id: string, data: R): Promise<void>
update<R = T>(id: string, data: R): Promise<void>