|
@@ -53,14 +53,17 @@ func generateConnectionString(datasource *models.DataSource) string {
|
|
|
|
|
|
|
|
server, port := hostParts[0], hostParts[1]
|
|
server, port := hostParts[0], hostParts[1]
|
|
|
encrypt := datasource.JsonData.Get("encrypt").MustString("false")
|
|
encrypt := datasource.JsonData.Get("encrypt").MustString("false")
|
|
|
- return fmt.Sprintf("server=%s;port=%s;database=%s;user id=%s;password=%s;encrypt=%s;",
|
|
|
|
|
|
|
+ connStr := fmt.Sprintf("server=%s;port=%s;database=%s;user id=%s;password=%s;",
|
|
|
server,
|
|
server,
|
|
|
port,
|
|
port,
|
|
|
datasource.Database,
|
|
datasource.Database,
|
|
|
datasource.User,
|
|
datasource.User,
|
|
|
password,
|
|
password,
|
|
|
- encrypt,
|
|
|
|
|
)
|
|
)
|
|
|
|
|
+ if encrypt != "false" {
|
|
|
|
|
+ connStr += fmt.Sprintf("encrypt=%s;", encrypt)
|
|
|
|
|
+ }
|
|
|
|
|
+ return connStr
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type mssqlRowTransformer struct {
|
|
type mssqlRowTransformer struct {
|