Add concatenation operator to Expr #2616
antoinecharbonneau
started this conversation in
Ideas
Replies: 2 comments
-
|
You can add corresponding functions and operators in sea query and add corresponding methods in ExprTrait. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
You can already achieve your goals with @Huliiiiii's suggestions are for convenience. Sure, I'd welcome a contribution like that! Here's an example of a recent PR that added new operators: SeaQL/sea-query#841. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In Postgres and many other database engine, you can concatenate columns using the
||operator such as this example:first_name || ' ' || last_name. Some database such as MariaDB use the CONCAT function with multiple parameters such asCONCAT(first_name, ' ', last_name)to achieve the same thing.This feature would allow, for instance, to use a single struct with QueryResult to aggregate data from multiple tables with similar purposes, such as tables that use Id and Label pattern, even if the label could be an aggregation of multiple columns like persons have a first and last name.
Provided a bit of guidance, I am open to spending a bit of my time to add the feature.
Beta Was this translation helpful? Give feedback.
All reactions