import type { ProjectOptions } from '../core/config/interfaces.js'; import type { DatabaseAdapter, ExecutionArgs, ExecutionResult, FlexSearchTokenizable } from '../core/database/database-adapter.js'; import type { Field } from '../core/model/implementation/field.js'; import { Model } from '../core/model/implementation/model.js'; import type { QueryNode } from '../core/query-tree/base.js'; import type { FlexSearchTokenization } from '../core/query-tree/flex-search.js'; import type { ArangoDBConfig } from './config.js'; import { type ModelDatabaseObjects } from './database-objects.js'; import { type SchemaMigration } from './schema-migration/migrations.js'; import type { VectorIndexStatus } from './schema-migration/vector-index/vector-index-status.js'; import type { ArangoDBVersion } from './version-helper.js'; export declare class ArangoDBAdapter implements DatabaseAdapter { private readonly config; private schemaContext?; private readonly db; private readonly logger; private readonly analyzer; private readonly migrationPerformer; private readonly vectorIndexAnalyzer; private readonly cancellationManager; private readonly versionHelper; private readonly doNonMandatoryMigrations; private readonly arangoExecutionFunction; constructor(config: ArangoDBConfig, schemaContext?: ProjectOptions | undefined); /** * Gets the javascript source code for a function that executes a transaction * @returns {string} */ private buildUpArangoExecutionFunction; execute(queryTree: QueryNode): Promise; executeExt({ queryTree, queryTreeVariableOrigins, ...options }: ExecutionArgs): Promise; /** * Explains each query without executing anything (for explainOnly) */ private explainQueries; private processDatabaseError; private executeTransactionWithRetries; private isRetryableError; private executeTransactionOnce; /** * Gets the collections, indexes and views this adapter uses for the given model, with the * names they have in ArangoDB (including the collectionNamePrefix) * * Does not access the database, so the objects might not exist yet. Can be used to map names * in ArangoDB (e.g. in query plans) back to the model. */ getDatabaseObjects(model: Model): ModelDatabaseObjects; /** * Compares the model with the database and determines migrations to do */ getOutstandingMigrations(model: Model): Promise>; /** * Performs a single mutation */ performMigration(migration: SchemaMigration): Promise; /** * Performs schema migration as configured with autocreateIndices/autoremoveIndices */ updateSchema(model: Model): Promise; getArangoDBVersion(): Promise; /** * Returns the status of a single vector-indexed field. * The field must have a @vectorIndex directive and belong to a root entity type. */ getVectorIndexStatus(field: Field): Promise; /** * Force-rebuilds a vector index using A/B slot rotation, even if the current * index matches the model. Throws if the collection has no documents. */ recreateVectorIndex(field: Field): Promise; tokenizeExpressions(tokenizations: ReadonlyArray): Promise>; }