mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fix: add directConnection options to MongoDB connection (#9955)
Co-authored-by: afournier <afournier@solocal.com>
This commit is contained in:
parent
68aa573262
commit
e0165e75ee
@ -506,6 +506,8 @@ Different RDBMS-es have their own specific options.
|
||||
|
||||
- `authMechanism` - Sets the authentication mechanism that MongoDB will use to authenticate the connection.
|
||||
|
||||
- `directConnection` - Specifies whether to force dispatch all operations to the specified host.
|
||||
|
||||
## `sql.js` data source options
|
||||
|
||||
- `database`: The raw UInt8Array database that should be imported.
|
||||
|
||||
@ -375,6 +375,8 @@
|
||||
|
||||
- `authMechanism` - 设置MongoDB用于验证连接的身份验证机制。
|
||||
|
||||
- `directConnection` - 指定是否强制将所有操作分派到指定的主机。
|
||||
|
||||
> 注: 由于译者对MongoDB理解不够深入,故一些翻译直接使用了机翻,因此会有些词不达意,如有更好的翻译选项,请提交PR进行完善。
|
||||
|
||||
## `sql.js`
|
||||
|
||||
@ -46,6 +46,11 @@ export interface MongoConnectionOptions extends BaseDataSourceOptions {
|
||||
*/
|
||||
readonly database?: string
|
||||
|
||||
/**
|
||||
* Specifies whether to force dispatch all operations to the specified host. Default: false
|
||||
*/
|
||||
readonly directConnection?: boolean
|
||||
|
||||
/**
|
||||
* The driver object
|
||||
* This defaults to require("mongodb")
|
||||
|
||||
@ -217,6 +217,7 @@ export class MongoDriver implements Driver {
|
||||
"useUnifiedTopology",
|
||||
"autoEncryption",
|
||||
"retryWrites",
|
||||
"directConnection",
|
||||
]
|
||||
|
||||
cteCapabilities: CteCapabilities = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user