Merge pull request #7673 from dolthub/fulghum/docs

CLI Docs: Adding docs for `system_variables` field in config.yaml for sql-server command
This commit is contained in:
Jason Fulghum
2024-04-01 15:05:34 -07:00
committed by GitHub
3 changed files with 5 additions and 0 deletions

View File

@@ -110,6 +110,8 @@ SUPPORTED CONFIG FILE FIELDS:
{{.EmphasisLeft}}remotesapi.read_only{{.EmphasisRight}}: Boolean flag which disables the ability to perform pushes against the server.
{{.EmphasisLeft}}system_variables{{.EmphasisRight}}: A map of system variable name to desired value for all system variable values to override.
{{.EmphasisLeft}}user_session_vars{{.EmphasisRight}}: A map of user name to a map of session variables to set on connection for each session.
{{.EmphasisLeft}}cluster{{.EmphasisRight}}: Settings related to running this server in a replicated cluster. For information on setting these values, see https://docs.dolthub.com/sql-reference/server/replication

View File

@@ -192,6 +192,7 @@ func YamlConfigFromFile(fs filesys.Filesys, path string) (ServerConfig, error) {
}
func ServerConfigAsYAMLConfig(cfg ServerConfig) *YAMLConfig {
systemVars := cfg.SystemVars()
return &YAMLConfig{
LogLevelStr: strPtr(string(cfg.LogLevel())),
MaxQueryLenInLogs: nillableIntPtr(cfg.MaxLoggedQueryLen()),
@@ -237,6 +238,7 @@ func ServerConfigAsYAMLConfig(cfg ServerConfig) *YAMLConfig {
ClusterCfg: clusterConfigAsYAMLConfig(cfg.ClusterConfig()),
PrivilegeFile: strPtr(cfg.PrivilegeFilePath()),
BranchControlFile: strPtr(cfg.BranchControlFilePath()),
SystemVars_: &systemVars,
Vars: cfg.UserVars(),
Jwks: cfg.JwksConfig(),
}

View File

@@ -105,6 +105,7 @@ jwks:
},
}
expected.DataDirStr = strPtr("some nonsense")
expected.SystemVars_ = nil
expected.Vars = []UserSessionVars{
{
Name: "user0",