Typegres API Reference - v0.3.1
    Preparing search index...

    Class Database<C>

    Type Parameters

    • C = any
    Index

    Constructors

    Properties

    name?: string

    Accessors

    • get defaultConnection(): Connection<C>

      The implicit execution context: when exactly one connection is attached (the Durable Object model — one object, one connection), the execute-family terminators fall back to it, so callers (and remote clients) can write .execute() with no token. Ambiguous (zero or several attached) throws — pass a Connection explicitly then, as transaction bodies always should (tx).

      Returns Connection<C>

    • get dialect(): DialectName

      Returns DialectName

    Methods

    • Type Parameters

      • R extends RowType
      • A extends string

      Parameters

      • from: Fromable<R, A>

      Returns QueryBuilder<{ [K in string]: R }, R, []>

    • Parameters

      • name: string

      Returns Ident

    • Type Parameters

      • Name extends string
      • LocalC = C

      Parameters

      • name: Name
      • opts: TableOptions = {}

      Returns typeof __class

    • Type Parameters

      • R extends RowType

      Parameters

      • vals0: R
      • ...valsRest: (NoInfer<R> | RowTypeToTsType<NoInfer<R>>)[]

      Returns QueryBuilder<{ values: R }, R, []>