@webshop/root - v1.0.0
    Preparing search index...

    Service to communicate with a pre-configured database

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Opens a connection to a pre-configured database

      Returns Promise<PoolConnection>

      Connection to the database

      Do not forget to release() the connection when you are done with it

    • Use an existing connection to execute a query

      Type Parameters

      • T = unknown

        Optional type to use for the query result, unknown if omitted.

      Parameters

      • connection: Connection

        Connection to the database

      • query: string

        Query, optionally a prepared statement, to execute on the database.

      • Optionalvalues: unknown[]

        Optional values to use for the prepared statement

      Returns Promise<T>

      Query result of type T