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

String formatting ang string concatenation #194

Open
dnicolodi opened this issue Jun 21, 2024 · 1 comment
Open

String formatting ang string concatenation #194

dnicolodi opened this issue Jun 21, 2024 · 1 comment
Labels
feature New feature

Comments

@dnicolodi
Copy link
Collaborator

There would be value in adding support for rendering values as strings with some control on the formatting, and for concatenating strings.

Formatting could be done with a format() function resembling the homonymous Python function, or the Python str class method. The latter would allow to format multiple values in one string, with the drawback of a more complex implementation, especially regarding typing in BQL. The former would be much simpler to implement.

String concatenation could be done with the + operator like in Python or with the || like in standard SQL. I like the + better.

@dnicolodi dnicolodi added the feature New feature label Jun 21, 2024
@dnicolodi
Copy link
Collaborator Author

PostgreSQL has a format(frmt, value, ...) function. Thus maybe this is the way to go for BQL too. https://www.postgresql.org/docs/current/functions-string.html#FUNCTIONS-STRING-FORMAT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

1 participant