import { CSN, EventContext, LinkedModel } from "cds-internal-tool"; import "colors"; import { ConnectionWithPool, MysqlDatabaseOptions } from "./types"; import { lazy } from "./utils"; /** * MySQL Database Adapter for SAP CAP Framework * */ export declare class MySQLDatabaseService extends lazy.BaseService { constructor(...args: any[]); options: MysqlDatabaseOptions; model: LinkedModel; private _queries; private _execute; private _read; private _insert; private _update; private _delete; private _run; private _logger; private _pools; /** * initialize function */ init(): Promise; private _registerCSVHandlers; private _registerEagerDeploy; private _initializeTenant; /** * get connection pool for tenant * * connection pool is independent for tenant * * @param tenant */ private _getPool; /** * acquire connection from pool * * @override * @param tenant_id tenant id */ acquire(tenant_id: string): Promise; acquire(context: EventContext): Promise; /** * release connection to pool * * @param conn * @override */ release(conn: ConnectionWithPool): Promise; /** * disconnect from database, free all connections of all tenants * * @param tenant optional tenant id, if with `*`, close all pools */ disconnect(tenant?: "*" | string): Promise; /** * implement deployment service * * @internal * @param ds * @returns */ private _implDeploymentService; private _implExtensibilityService; /** * deploy (migrate) schema to (tenant) database * * @param model plain CSN object * @param options deployment options * @returns */ deploy(model: CSN, options?: { tenant: string; }): Promise; }