UNPKG

lakutata

Version:

An IoC-based universal application framework.

109 lines (105 loc) 2.58 kB
import { BaseDataSourceOptions } from './TypeDef.internal.33.js'; /** * SAP Hana specific connection credential options. */ interface SapConnectionCredentialsOptions { /** * Database host. */ readonly host?: string; /** * Database host port. */ readonly port?: number; /** * Database username. */ readonly username?: string; /** * Database password. */ readonly password?: string; /** * Database name to connect to. */ readonly database?: string; /** * Encrypt database connection */ readonly encrypt?: boolean; /** * Validate database certificate */ readonly sslValidateCertificate?: boolean; /** * Key for encrypted connection */ readonly key?: string; /** * Cert for encrypted connection */ readonly cert?: string; /** * Ca for encrypted connection */ readonly ca?: string; } /** * SAP Hana specific connection options. */ interface SapConnectionOptions extends BaseDataSourceOptions, SapConnectionCredentialsOptions { /** * Database type. */ readonly type: "sap"; /** * Database schema. */ readonly schema?: string; /** * The driver objects * This defaults to require("hdb-pool") */ readonly driver?: any; /** * The driver objects * This defaults to require("@sap/hana-client") */ readonly hanaClientDriver?: any; /** * Pool options. */ readonly pool?: { /** * Max number of connections. */ readonly max?: number; /** * Minimum number of connections. */ readonly min?: number; /** * Maximum number of waiting requests allowed. (default=0, no limit). */ readonly maxWaitingRequests?: number; /** * Max milliseconds a request will wait for a resource before timing out. (default=5000) */ readonly requestTimeout?: number; /** * How often to run resource timeout checks. (default=0, disabled) */ readonly checkInterval?: number; /** * Idle timeout */ readonly idleTimeout?: number; /** * Function handling errors thrown by drivers pool. * Defaults to logging error with `warn` level. */ readonly poolErrorHandler?: (err: any) => any; }; readonly poolSize?: never; } export type { SapConnectionCredentialsOptions, SapConnectionOptions };