Entity
    Preparing search index...

    Class PostgresEntityDatabaseAdapter<TFields, TIDField>

    Type Parameters

    • TFields extends Record<string, any>
    • TIDField extends keyof TFields

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    entityConfiguration: EntityConfiguration<TFields, TIDField>
    fieldTransformerMap: FieldTransformerMap

    Accessors

    Methods

    • Delete an object by ID.

      Type Parameters

      • K extends string | number | symbol

      Parameters

      • queryContext: EntityQueryContext

        query context with which to perform the deletion

      • idField: K

        the field in the object that is the ID

      • id: any

        the value of the ID field in the object

      Returns Promise<void>

    • Insert an object.

      Parameters

      • queryContext: EntityQueryContext

        query context with which to perform the insert

      • object: Readonly<Partial<TFields>>

        the object to insert

      Returns Promise<Readonly<TFields>>

      the inserted object

    • Update an object.

      Type Parameters

      • K extends string | number | symbol

      Parameters

      • queryContext: EntityQueryContext

        query context with which to perform the update

      • idField: K

        the field in the object that is the ID

      • id: any

        the value of the ID field in the object

      • object: Readonly<Partial<TFields>>

        the object to update

      Returns Promise<Readonly<TFields>>

      the updated object