All files / blong-int-adapter/mysql/adapter/sql sqlSchemaProcedureBind.ts

63.63% Statements 14/22
100% Branches 1/1
0% Functions 0/1
63.63% Lines 14/22

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 231x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                 1x  
import {handler} from '@feasibleone/blong';
 
/**
 * sqlSchemaProcedureBind — calls the knex adapter's built-in `schemaProcedureBind`
 * method to discover stored procedures whose names start with `sql_schema` and
 * generate callable handler functions for each one.
 *
 * Returns the `handlers` and `schemas` maps so the test layer can invoke
 * the discovered procedures directly.
 */
export default handler(
    () =>
        async function sqlSchemaProcedureBind(
            _params: Record<string, unknown>,
            _$meta: Record<string, unknown>,
        ) {
            return (this.schemaProcedureBind as (...args: unknown[]) => Promise<{
                handlers: Record<string, (params: Record<string, unknown>) => Promise<unknown>>;
                schemas: Record<string, unknown>;
            }>)('sql_schema');
        },
);