Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize system variables #188

Open
apstndb opened this issue Sep 6, 2024 · 0 comments
Open

Generalize system variables #188

apstndb opened this issue Sep 6, 2024 · 0 comments

Comments

@apstndb
Copy link
Collaborator

apstndb commented Sep 6, 2024

It is a random idea about general system variable concept.

It may be overgeneralize for current status, but I think it is worth to remember when feature enhancement become hard.

This issue is forked from this comment: #183 (comment)

Motivation

Although spanner-cli has evolved alongside Cloud Spanner as a product, it can be difficult to extend its functionality consistently.

  • Some features are implemented as spanner-cli statements.
  • Some features are implemented as go-flags options.
  • Some of them can't be changed in a spanner-cli session.
  • The current value of some of them can't be displayed.
    • No prompt variables and no show commands.

These could be barriers to future feature expansion.

I assume that introducing general system variable may solve some problem.

  • Generalize some statements into SET, and SHOW VARIABLE.
    • spanner-cli can borrow JDBC session management commands (GoogleSQL) of the Cloud Spanner JDBC driver.
      • It may help users who use both of spanner-cli and JDBC drivers.
      • Additionally, some of features in the JDBC drivers are not yet implemented in spanner-cli, it may help future discussion of enhancement.
  • Generalize command line options.
  • SET statement can be used in spanner-cli session.
    • spanner-cli can reject it when modifying is non-sense.
  • System variables can be displayed as generalized prompt variable like \v{VARIABLE_NAME}.
    • SHOW VARIABLE statement can display system variable value as on-demand.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant