import type { Knex } from "knex"; import type InformationSchemaRoutine from "../information_schema/InformationSchemaRoutine.ts"; import type PgType from "./PgType.ts"; declare const parameterModeMap: { readonly i: "IN"; readonly o: "OUT"; readonly b: "INOUT"; readonly v: "VARIADIC"; readonly t: "TABLE"; }; type ParameterMode = (typeof parameterModeMap)[keyof typeof parameterModeMap]; export type ProcedureParameter = { name: string; type: string; mode: ParameterMode; hasDefault: boolean; ordinalPosition: number; }; declare const parallelSafetyMap: { readonly s: "SAFE"; readonly r: "RESTRICTED"; readonly u: "UNSAFE"; }; type FunctionParallelSafety = (typeof parallelSafetyMap)[keyof typeof parallelSafetyMap]; export type ProcedureDetails = { name: string; schemaName: string; kind: "procedure"; comment: string | null; parameters: ProcedureParameter[]; language: string; definition: string; isSecurityDefiner: boolean; isLeakProof: boolean; parallelSafety: FunctionParallelSafety; estimatedCost: number; informationSchemaValue: InformationSchemaRoutine; }; declare function extractProcedure(db: Knex, pgType: PgType<"procedure">): Promise; export default extractProcedure;