drupflare/worker - v1.0.4
    Preparing search index...

    Function performSql

    • One statement against the external database, answered in one JSON shape on both outcomes: a failure becomes a database error in Drupal, where a throw would freeze the chain.

      Parameters

      • statement: ParkSql
      • selection: BackendSelection
      • exec: (
            selection: BackendSelection,
            sql: string,
            params?: readonly unknown[],
            deps?: PgDeps,
        ) => Promise<BackendResult> = backendExec
          • (
                selection: BackendSelection,
                sql: string,
                params?: readonly unknown[],
                deps?: PgDeps,
            ): Promise<BackendResult>
          • Runs one statement and answers in the host's own result shape.

            pg uses rowCount for both reads and writes (measured on PostgreSQL 17.6), so a statement with no rows and a count is a write. These counts are not a Cloudflare meter: an external database is not metered per row.

            Parameters

            Returns Promise<BackendResult>

      Returns Promise<Uint8Array<ArrayBufferLike>>