// Generated by nautilus-codegen. Do not edit manually.

import { NautilusClient } from './_internal/_client.js';
import { IsolationLevel, TransactionClient } from './_internal/_transaction.js';
{%- for model in models %}
import { {{ model.delegate_name }} } from './models/{{ model.snake_name }}.js';
{%- endfor %}

const _SCHEMA_PATH = '{{ schema_path }}';

export class Nautilus extends NautilusClient {
  constructor(options) {
    super(_SCHEMA_PATH, options);
{%- for model in models %}
    this.{{ model.camel_name }} = new {{ model.delegate_name }}(this);
    this._delegates['{{ model.camel_name }}'] = this.{{ model.camel_name }};
{%- endfor %}
  }

  async $transaction(fn, options) {
    return this._runTransactionCallback(fn, options);
  }

  async $transactionBatch(operations, options) {
    return this._runTransactionBatch(operations, options);
  }
}

export { IsolationLevel };
