func SetStrict(ok bool) Setting {
	return func(source string) string {
		return boolSetting(source, "strict", ok)
	}
}
SetStrict strict=true enables the strict mode in which MySQL warnings are treated as errors.
package manager
import (
	"database/sql"
	"fmt"
	"strconv"
	"strings"
	"time"
)
const (
	defaultDriver = "mysql"
	defaultPort   = 3306
	cDSNFormat    = "%s%s=%s&"
)
type Setting func(string) string
func boolSetting(source, param string, ok bool) string {
	return fmt.Sprintf(cDSNFormat, source, param, strconv.FormatBool(ok))
}
func timeSetting(source, param string, t time.Duration) string {
	if t < time.Millisecond || t >= 24*time.Hour {
		return ""
	}
	return fmt.Sprintf(cDSNFormat, source, param, t)
}
func stringSetting(source, param, value string) string {
	if "" == value {
		return ""
	}
	return fmt.Sprintf(cDSNFormat, source, param, value)
}
func SetCharset(v string) Setting {
	return func(source string) string {
		return stringSetting(source, "charset", v)
	}
}
func SetLoc(v string) Setting {
	return func(source string) string {
		return stringSetting(source, "loc", v)
	}
}
func SetCollation(v string) Setting {
	return func(source string) string {
		return stringSetting(source, "collation", v)
	}
}
func SetAllowCleartextPasswords(ok bool) Setting {
	return func(source string) string {
		return boolSetting(source, "allowCleartextPasswords", ok)
	}
}
func SetAllowNativePasswords(ok bool) Setting {
	return func(source string) string {
		return boolSetting(source, "allowNativePasswords", ok)
	}
}
func SetAutoCommit(ok bool) Setting {
	return func(source string) string {
		return boolSetting(source, "autocommit", ok)
	}
}
func SetParseTime(ok bool) Setting {
	return func(source string) string {
		return boolSetting(source, "parseTime", ok)
	}
}
func SetAllowAllFiles(ok bool) Setting {
	return func(source string) string {
		return boolSetting(source, "allowAllFiles", ok)
	}
}
func SetClientFoundRows(ok bool) Setting {
	return func(source string) string {
		return boolSetting(source, "clientFoundRows", ok)
	}
}
func SetColumnsWithAlias(ok bool) Setting {
	return func(source string) string {
		return boolSetting(source, "columnsWithAlias", ok)
	}
}
func SetInterpolateParams(ok bool) Setting {
	return func(source string) string {
		return boolSetting(source, "interpolateParams", ok)
	}
}