import { ExecutableStep } from "grafast";
import type { SQL } from "pg-sql2";
import type { PgResource } from "./datasource.ts";
import type { PgClassSingleStep, PgCodec, PgConditionLike, PgQueryBuilder, PgSQLCallbackOrDirect, PgTypedStep } from "./interfaces.ts";
export declare function assertPgClassSingleStep<TResource extends PgResource<any, any, any, any, any>>(step: ExecutableStep | PgClassSingleStep<TResource>): asserts step is PgClassSingleStep<TResource>;
export type RuntimeEmbeddable = PgQueryBuilder | PgConditionLike;
/**
 * At plantime we can embed a PgTypedStep, or anything that can be embedded at
 * runtime (since if an argument is a constant rather than variable, we may be
 * able to evaluate its value at plantime as an optimization).
 */
export type PlantimeEmbeddable = PgTypedStep<PgCodec> | RuntimeEmbeddable;
export type RuntimeSQLThunk = PgSQLCallbackOrDirect<SQL, RuntimeEmbeddable>;
export declare function makeScopedSQL<TThis extends {
    placeholder(value: any): SQL;
}>(that: TThis): <T>(cb: PgSQLCallbackOrDirect<T, TThis | PlantimeEmbeddable>) => T;
export declare function runtimeScopedSQL<T>(cb: PgSQLCallbackOrDirect<T, RuntimeEmbeddable>): T;
//# sourceMappingURL=utils.d.ts.map