Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Features
--------
* Options to limit size of LLM prompts; cache LLM prompt data.
* Add startup usage tips.
* Move `main.ssl_mode` config option to `connection.default_ssl_mode`.


Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion mycli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def __init__(
self.llm_prompt_section_truncate = 0

# set ssl_mode if a valid option is provided in a config file, otherwise None
ssl_mode = c["main"].get("ssl_mode", None)
ssl_mode = c["main"].get("ssl_mode", None) or c["connection"].get("default_ssl_mode", None)
if ssl_mode not in ("auto", "on", "off", None):
self.echo(f"Invalid config option provided for ssl_mode ({ssl_mode}); ignoring.", err=True, fg="red")
self.ssl_mode = None
Expand Down
14 changes: 7 additions & 7 deletions mycli/myclirc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
# after executing a SQL statement when applicable.
show_warnings = False

# Sets the desired behavior for handling secure connections to the database server.
# Possible values:
# auto = SSL is preferred. Will attempt to connect via SSL, but will fallback to cleartext as needed.
# on = SSL is required. Will attempt to connect via SSL and will fail if a secure connection is not established.
# off = do not use SSL. Will fail if the server requires a secure connection.
ssl_mode = auto

# Enables context sensitive auto-completion. If this is disabled the all
# possible completions will be listed.
smart_completion = True
Expand Down Expand Up @@ -157,6 +150,13 @@ default_character_set = utf8mb4
# whether to enable LOAD DATA LOCAL INFILE for connections without --local-infile being set
default_local_infile = False

# Sets the desired behavior for handling secure connections to the database server.
# Possible values:
# auto = SSL is preferred. Will attempt to connect via SSL, but will fallback to cleartext as needed.
# on = SSL is required. Will attempt to connect via SSL and will fail if a secure connection is not established.
# off = do not use SSL. Will fail if the server requires a secure connection.
default_ssl_mode = auto

# SSL CA file for connections without --ssl-ca being set
default_ssl_ca =

Expand Down
14 changes: 7 additions & 7 deletions test/myclirc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
# after executing a SQL statement when applicable.
show_warnings = False

# Sets the desired behavior for handling secure connections to the database server.
# Possible values:
# auto = SSL is preferred. Will attempt to connect via SSL, but will fallback to cleartext as needed.
# on = SSL is required. Will attempt to connect via SSL and will fail if a secure connection is not established.
# off = do not use SSL. Will fail if the server requires a secure connection.
ssl_mode = auto

# Enables context sensitive auto-completion. If this is disabled the all
# possible completions will be listed.
smart_completion = True
Expand Down Expand Up @@ -155,6 +148,13 @@ default_character_set = utf8mb4
# whether to enable LOAD DATA LOCAL INFILE for connections without --local-infile being set
default_local_infile = False

# Sets the desired behavior for handling secure connections to the database server.
# Possible values:
# auto = SSL is preferred. Will attempt to connect via SSL, but will fallback to cleartext as needed.
# on = SSL is required. Will attempt to connect via SSL and will fail if a secure connection is not established.
# off = do not use SSL. Will fail if the server requires a secure connection.
default_ssl_mode = auto

# SSL CA file for connections without --ssl-ca being set
default_ssl_ca =

Expand Down