|
|
@@ -46,6 +46,7 @@ type Config struct {
|
|
|
ClientFoundRows bool // Return number of matching rows instead of rows changed
|
|
|
ColumnsWithAlias bool // Prepend table alias to column names
|
|
|
InterpolateParams bool // Interpolate placeholders into query string
|
|
|
+ MultiStatements bool // Allow multiple statements in one query
|
|
|
ParseTime bool // Parse time values to time.Time
|
|
|
Strict bool // Return warnings as errors
|
|
|
}
|
|
|
@@ -235,6 +236,14 @@ func parseDSNParams(cfg *Config, params string) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ // multiple statements in one query
|
|
|
+ case "multiStatements":
|
|
|
+ var isBool bool
|
|
|
+ cfg.MultiStatements, isBool = readBool(value)
|
|
|
+ if !isBool {
|
|
|
+ return errors.New("invalid bool value: " + value)
|
|
|
+ }
|
|
|
+
|
|
|
// time.Time parsing
|
|
|
case "parseTime":
|
|
|
var isBool bool
|