-
-
Notifications
You must be signed in to change notification settings - Fork 162
Expand file tree
/
Copy pathMongoDBPlugin.swift
More file actions
28 lines (24 loc) · 1.02 KB
/
MongoDBPlugin.swift
File metadata and controls
28 lines (24 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
// MongoDBPlugin.swift
// TablePro
//
import Foundation
import TableProPluginKit
final class MongoDBPlugin: NSObject, TableProPlugin, DriverPlugin {
static let pluginName = "MongoDB Driver"
static let pluginVersion = "1.0.0"
static let pluginDescription = "MongoDB support via libmongoc C driver"
static let capabilities: [PluginCapability] = [.databaseDriver]
static let databaseTypeId = "MongoDB"
static let databaseDisplayName = "MongoDB"
static let iconName = "leaf.fill"
static let defaultPort = 27017
static let additionalConnectionFields: [ConnectionField] = [
ConnectionField(id: "mongoAuthSource", label: "Auth Database", placeholder: "admin"),
ConnectionField(id: "mongoReadPreference", label: "Read Preference", placeholder: "primary"),
ConnectionField(id: "mongoWriteConcern", label: "Write Concern", placeholder: "majority")
]
func createDriver(config: DriverConnectionConfig) -> any PluginDatabaseDriver {
MongoDBPluginDriver(config: config)
}
}