/* tslint:disable */
/* eslint-disable */
export function debug_panic(panic_message?: string | null): void;
export function getBuildTimeInfo(): Version;
export interface Version {
    commit: string;
    version: string;
}

export interface TransactionOptions {
    /**
     * Whether or not to run a phantom query (i.e., a query that only influences Prisma event logs, but not the database itself)
     * before opening a transaction, committing, or rollbacking.
     */
    usePhantomQuery: boolean;
}

/**
 * Parameters defining the construction of an engine.
 */
export interface ConstructorOptions {
    datamodel: string;
    logLevel: string;
    logQueries?: boolean;
    enableTracing: boolean;
}

/**
 * The main query engine used by JS
 */
export class QueryEngine {
  free(): void;
  [Symbol.dispose](): void;
  /**
   * Disconnect and drop the core. Can be reconnected later with `#connect`.
   */
  disconnect(trace: string, request_id: string): Promise<void>;
  /**
   * If connected, attempts to start a transaction in the core and returns its ID.
   */
  startTransaction(input: string, trace: string, request_id: string): Promise<string>;
  /**
   * If connected, attempts to commit a transaction with id `tx_id` in the core.
   */
  commitTransaction(tx_id: string, trace: string, request_id: string): Promise<string>;
  /**
   * If connected, attempts to roll back a transaction with id `tx_id` in the core.
   */
  rollbackTransaction(tx_id: string, trace: string, request_id: string): Promise<string>;
  /**
   * Parse a validated datamodel and configuration to allow connecting later on.
   */
  constructor(options: ConstructorOptions, callback: Function, adapter: object);
  /**
   * If connected, sends a query to the core and returns the response.
   */
  query(body: string, trace: string, tx_id: string | null | undefined, request_id: string): Promise<string>;
  /**
   * Fetch the spans associated with a [`RequestId`]
   */
  trace(request_id: string): Promise<string | undefined>;
  /**
   * Connect to the database, allow queries to be run.
   */
  connect(trace: string, request_id: string): Promise<void>;
  metrics(json_options: string): Promise<void>;
}
