0.1.5Updated 6 months ago
import { DataTypeQuery } from "@infinity-beyond/classes/query.ts";

export const ConsumeFromLedger = new DataTypeQuery<
  [
    /* $1  */ p_key: string,
    /* $2  */ p_amount: number,
    /* $3  */ p_source: string,
    /* $4  */ p_reference: string | undefined,
    /* $5  */ p_description: string | undefined,
    /* $6  */ p_request_id: string | undefined,
  ], {
    slug: string
  }, Ledger.Consumption.Function.Response
>(
  `SELECT * FROM {slug}_process_consumption($1, $2, $3, $4, $5, $6)`
);