typeorm
Version:
Data-Mapper ORM for TypeScript and ES2023+. Supports MySQL/MariaDB, PostgreSQL, MS SQL Server, Oracle, SAP HANA, SQLite, MongoDB databases.
60 lines (59 loc) • 2.15 kB
TypeScript
import type { BaseDataSourceOptions } from "../../data-source/BaseDataSourceOptions";
import type { SapConnectionCredentialsOptions } from "./SapConnectionCredentialsOptions";
/**
* SAP Hana specific connection options.
*/
export interface SapDataSourceOptions extends BaseDataSourceOptions, SapConnectionCredentialsOptions {
/**
* Database type.
*/
readonly type: "sap";
/**
* Database schema.
*/
readonly schema?: string;
/**
* The driver objects
* This defaults to require("@sap/hana-client")
*/
readonly driver?: any;
/**
* Pool options.
*/
readonly pool?: {
/**
* Maximum number of open connections created by the pool, each of which
* may be in the pool waiting to be reused or may no longer be in the
* pool and actively being used (default: 10).
*/
readonly maxConnectedOrPooled?: number;
/**
* Defines the maximum time, in seconds, that connections are allowed to
* remain in the pool before being marked for eviction (default: 30).
*/
readonly maxPooledIdleTime?: number;
/**
* Defines the maximum time, in milliseconds, to wait for a connection
* to become available once the specified number of `maxConnectedOrPooled`
* open connections have been reached (default: 0, no wait).
*
* @remarks Requires `@sap/hana-client` version `2.27` or later.
*/
readonly maxWaitTimeoutIfPoolExhausted?: number;
/**
* Determines whether or not the pooled connection should be tested for
* viability before being reused (default: false).
*/
readonly pingCheck?: boolean;
/**
* Maximum number of connections allowed to be in the pool, waiting to
* be reused (default: 0, no limit).
*/
readonly poolCapacity?: number;
/**
* Function handling errors thrown by drivers pool.
* Defaults to logging error with `warn` level.
*/
readonly poolErrorHandler?: (err: any) => any;
};
}