Type Parameters

  • T extends GenericTable

Constructors

  • Type Parameters

    • T extends GenericTable

    Parameters

    • pool: PostgresJsDatabase<any>
    • generic: T

    Returns default<T>

Properties

generic: PgTableWithColumns<any>
pool: PostgresJsDatabase<any>

Methods

  • Parameters

    • id: unknown
    • values: object

    Returns Promise<
        {
            [K in string]: {
                [Key in string as Key]: T["_"]["columns"][Key]["_"]["notNull"] extends true
                    ? T["_"]["columns"][Key]["_"]["data"]
                    : null
                    | (...)[(...)]["columns"][Key]["_"]["data"]
            }[K]
        },
    >

  • Parameters

    • id: unknown

    Returns Promise<void>

  • Parameters

    • id: unknown

    Returns Promise<
        {
            [K in string]: {
                [Key in string as Key]: T["_"]["columns"][Key]["_"]["notNull"] extends true
                    ? T["_"]["columns"][Key]["_"]["data"]
                    : null
                    | (...)[(...)]["columns"][Key]["_"]["data"]
            }[K]
        },
    >

  • Parameters

    • values: {
          [K in string | number | symbol]: (
              {
                  [Key in string as RequiredKeyOnly<Key, T["_"]["columns"][Key]>]: T["_"]["columns"][Key]["_"]["notNull"] extends true
                      ? T["_"]["columns"][Key]["_"]["data"]
                      : null
                      | (...)[(...)]["columns"][Key]["_"]["data"]
              } & {
                  [Key in string as OptionalKeyOnly<Key, T["_"]["columns"][Key], false>]?: (
                      ...
                  )[(...)]["columns"][Key]["_"]["notNull"] extends true
                      ? (...)[(...)]["columns"][Key]["_"]["data"]
                      : null | (...)[(...)][Key]["_"]["data"]
              }
          )[K]
      }
    • Optionalopts: { upsert?: GenerateUpsert }

    Returns Promise<
        {
            [K in string]: {
                [Key in string as Key]: T["_"]["columns"][Key]["_"]["notNull"] extends true
                    ? T["_"]["columns"][Key]["_"]["data"]
                    : null
                    | (...)[(...)]["columns"][Key]["_"]["data"]
            }[K]
        },
    >

  • Parameters

    • key: string

    Returns PgColumn

  • Parameters

    Returns Promise<
        GenericList<
            {
                [K in string]: {
                    [Key in string as Key]: (...)[(...)]["columns"][Key]["_"]["notNull"] extends true
                        ? (...)[(...)]["columns"][Key]["_"]["data"]
                        : null | (...)[(...)][Key]["_"]["data"]
                }[K]
            },
        >,
    >

  • Returns null | PgColumn

  • Returns PgColumn