import { Q as QueryHandlerOptions, P as PromiseTuple } from './utils-BsS_PV7b.js';
import { GetQuery, SetQuery, AddQuery, RemoveQuery, CountQuery, ListQuery, CreateQuery, AlterQuery, ModelField, ModelIndex, ModelPreset, DropQuery } from 'shiro-compiler';
import { DeepCallable } from 'shiro-syntax/queries';
import { Model } from 'shiro-syntax/schema';
import 'node:async_hooks';

/**
 * Creates a syntax factory for generating and executing queries.
 *
 * @param options - An optional object of options for the query execution.
 *
 * Alternatively, a function that returns the object may be provided instead,
 * which is useful for cases in which the config must be generated dynamically
 * whenever a query is executed.
 *
 * @returns An object with methods for generating and executing different types
 * of queries.
 *
 * ### Usage
 * ```typescript
 * const { get, set, add, remove, count } = createSyntaxFactory({
 *   token: '...'
 * });
 *
 * await get.accounts();
 *
 * await set.account({
 *   with: {
 *     email: 'mike@gmail.com',
 *   },
 *   to: {
 *     status: 'active',
 *   },
 * });
 *
 * await add.account({ with: { email: 'mike@gmail.com' } });
 *
 * await remove.accounts.with.emailVerified.notBeing(true);
 *
 * await count.accounts();
 *
 * // Execute a batch of operations
 * const batchResult = await batch(() => [
 *   get.accounts(),
 *   get.account.with.email('mike@gmail.com')
 * ]);
 * ```
 */
declare const createSyntaxFactory: (options: QueryHandlerOptions | (() => QueryHandlerOptions)) => {
    get: DeepCallable<GetQuery>;
    set: DeepCallable<SetQuery>;
    add: DeepCallable<AddQuery>;
    remove: DeepCallable<RemoveQuery>;
    count: DeepCallable<CountQuery, number>;
    list: DeepCallable<ListQuery>;
    create: DeepCallable<CreateQuery, Model>;
    alter: DeepCallable<AlterQuery, Model | ModelField | ModelIndex | ModelPreset>;
    drop: DeepCallable<DropQuery, Model>;
    batch: <T extends [Promise<any>, ...Array<Promise<any>>] | Array<Promise<any>>>(operations: () => T, queryOptions?: Record<string, unknown>) => Promise<PromiseTuple<T>>;
    sql: (strings: TemplateStringsArray, ...values: Array<unknown>) => Promise<any>;
    sqlBatch: <T extends [Promise<any>, ...Array<Promise<any>>] | Array<Promise<any>>>(operations: () => T, queryOptions?: Record<string, unknown>) => Promise<PromiseTuple<T>>;
};
declare const get: DeepCallable<GetQuery>;
declare const set: DeepCallable<SetQuery>;
declare const add: DeepCallable<AddQuery>;
declare const remove: DeepCallable<RemoveQuery>;
declare const count: DeepCallable<CountQuery, number>;
declare const list: DeepCallable<ListQuery>;
declare const create: DeepCallable<CreateQuery, Model>;
declare const alter: DeepCallable<AlterQuery, Model | ModelField | ModelIndex | ModelPreset>;
declare const drop: DeepCallable<DropQuery, Model>;
declare const batch: <T extends [Promise<any>, ...Array<Promise<any>>] | Array<Promise<any>>>(operations: () => T, queryOptions?: Record<string, unknown>) => Promise<PromiseTuple<T>>;
declare const sql: (strings: TemplateStringsArray, ...values: Array<unknown>) => Promise<any>;
declare const sqlBatch: <T extends [Promise<any>, ...Array<Promise<any>>] | Array<Promise<any>>>(operations: () => T, queryOptions?: Record<string, unknown>) => Promise<PromiseTuple<T>>;

export { add, alter, batch, count, create, createSyntaxFactory, createSyntaxFactory as default, drop, get, list, remove, set, sql, sqlBatch };
