Closed dantownsend closed 3 months ago
We recently added some basic string functions, like Upper. It would be good to have a Concat function, for combining strings.
Upper
Concat
It's currently possible in Piccolo through queries such as:
await Band.update({Band.name: Band.name + "!!!"}, force=True)
Note how Band.name + "!!!" gets converted under the hood into the following SQL name || '!!!' (where || is the concat operator).
Band.name + "!!!"
name || '!!!'
||
But it will be nice to have an explicit Concat function.
>>> await Band.select(Concat(Band.name, '-', Band.manager._.name, alias="name")) [{"name": "Pythonistas-Guido"}]
We recently added some basic string functions, like
Upper
. It would be good to have aConcat
function, for combining strings.It's currently possible in Piccolo through queries such as:
Note how
Band.name + "!!!"
gets converted under the hood into the following SQLname || '!!!'
(where||
is the concat operator).But it will be nice to have an explicit
Concat
function.