Skip to content

SelectBuilder does not allow usage of Condition in projection #1007

Closed
@nt-gt

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)

Metadata

Metadata

Assignees

Labels

in: selectbuilderSelectBuilder stands for the complete API for creating SQL statements programmatically.type: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions