Skip to content

postgrelize / GetConnectionOptions

Type Alias: GetConnectionOptions ​

GetConnectionOptions = Readonly<{ type?: "read" | "write" | "SELECT"; useMaster?: boolean; uuid?: string; }>

Defined in: src/connection/connection-types.ts:74

Options of sequelize.connectionManager.getConnection() (Sequelize v6 GetConnectionOptions).

Example ​

ts
const options: GetConnectionOptions = { type: 'read', useMaster: false };
const connection = await sequelize.connectionManager.getConnection(options);
await sequelize.connectionManager.releaseConnection(connection);

Released under the MIT License.