Skip to content

feat: include concat operator#43

Open
Michad wants to merge 1 commit intoflorajs:mainfrom
Michad:feature/support-concat
Open

feat: include concat operator#43
Michad wants to merge 1 commit intoflorajs:mainfrom
Michad:feature/support-concat

Conversation

@Michad
Copy link
Copy Markdown

@Michad Michad commented Mar 27, 2026

Currently you get an error if you use SQL with concatenation. As far as I'm aware, the || operator is part of ANSI SQL and it seems simple to support.

I noticed there's a comment

/**
 * Borrowed from PL/SQL ,the priority of below list IS ORDER BY DESC
 * ---------------------------------------------------------------------------------------------------
 * | +, -                                                     | identity, negation                   |
 * | *, /                                                     | multiplication, division             |
 * | +, -                                                     | addition, subtraction, concatenation |
 * | =, <, >, <=, >=, <>, !=, IS, LIKE, BETWEEN, IN           | comparion                            |
 * | !, NOT                                                   | logical negation                     |
 * | AND                                                      | conjunction                          |
 * | OR                                                       | inclusion                            |
 * ---------------------------------------------------------------------------------------------------
 */

Which seems to suggest concatenation should be grouped in with addition and subtraction, so that's what I did.

@mbaumgartl
Copy link
Copy Markdown
Collaborator

Thanks for the pull request! Unfortunately, it currently doesn’t handle operator precedence correctly and it also lacks tests. In addition, implementing the operator properly would add complexity to the codebase for what is essentially syntactic sugar.

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

Successfully merging this pull request may close these issues.

2 participants