Multplication math in field selection breaks select #56

Closed
opened 2020-05-11 07:28:30 +00:00 by jamie · 4 comments
jamie commented 2020-05-11 07:28:30 +00:00 (Migrated from git.hazaar.io)

The asterisk (*) is used in field grouping, but the output code is not specific enough about which asterisks to match. This is supposed to match a column selection such as:

array('type' => 't.*')

And return all fields in the table with alias t as an object. However, if I was to select a column such as:

array('date_created' => 'EXTRACT(EPOCH FROM date_created) * 1000')

The SQL generator will get confused and thinks this is a field group selection, which it is not. The use of * should be pretty strict so this code needs to be updated to only select asterisks which are preceeded by words and a dot, such as table.*.

The asterisk (*) is used in field grouping, but the output code is not specific enough about which asterisks to match. This is supposed to match a column selection such as: ```php array('type' => 't.*') ``` And return all fields in the table with alias `t` as an object. However, if I was to select a column such as: ```php array('date_created' => 'EXTRACT(EPOCH FROM date_created) * 1000') ``` The SQL generator will get confused and thinks this is a field group selection, which it is not. The use of `*` should be pretty strict so this code needs to be updated to only select asterisks which are preceeded by words and a dot, such as `table.*`.
jamie commented 2020-05-11 07:28:33 +00:00 (Migrated from git.hazaar.io)

mentioned in merge request !30

mentioned in merge request !30
jamie commented 2020-05-11 07:28:33 +00:00 (Migrated from git.hazaar.io)

created merge request !30 to address this issue

created merge request !30 to address this issue
jamie commented 2020-05-11 07:29:39 +00:00 (Migrated from git.hazaar.io)

closed via merge request !30

closed via merge request !30
jamie commented 2020-05-11 07:29:39 +00:00 (Migrated from git.hazaar.io)

mentioned in commit b6f35673bb

mentioned in commit b6f35673bb7e72e49f0ffce8bba2b1ff1c29674f
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hazaar/hazaar-dbi#56
No description provided.