Skip to content

SelectBuilder does not allow usage of Condition in projection #1007

Closed

Description

@nt-gt

Hi,

Continuning my findings from #995, I noticed that SelectBuilder is too restrictive in regards to Select columns. Consider the valid query SELECT COUNT(*) > 100 FROM table_of_choice;. When run in postgres, you will receive a response like:

postgres=# SELECT COUNT(*) > 100 FROM table_of_choice;
 ?column?
----------
 f
(1 row)

The select(...) methods in SelectBuilder all assume that columns will be instances of Expressions. However, X > Y is a Condition and a Condition is not an instanceof Expression... :-/

My reason for trying this in the first place was to work around #995 / #1003 by leveraging a subselect (which counts as a Expression)

Activity

  1. added
    type: enhancement
    and removed
    status: waiting-for-triage
    on Jul 19, 2021
  2. added
    in: selectbuilder
    on Jul 21, 2021
  3. added a commit that references this issue on Nov 4, 2021
    787c932
  4. added a commit that references this issue on Nov 8, 2021
  5. changed the title [-]SelectBuilder is too restrictive on select clauses[/-] [+]`SelectBuilder` does not allow usage of `Condition` in projection[/+] on Nov 8, 2021
  6. added a commit that references this issue on Apr 1, 2024
    bd8b3c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: selectbuildertype: enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions