Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing of special bindings #117

Open
g105b opened this issue Sep 28, 2018 · 0 comments
Open

Parsing of special bindings #117

g105b opened this issue Sep 28, 2018 · 0 comments

Comments

@g105b
Copy link
Member

g105b commented Sep 28, 2018

"Special bindings" (order by, limit, group by, offset) can not be injected by PDO natively, so they must be injected into the SQL string. Currently the implementation does basic escaping of characters, but it would be very neat to parse the different special bindings and escape each one properly according to the spec.

There is already placeholder code for this here:

switch($type) {
// [GROUP BY {col_name | expr | position}, ... [WITH ROLLUP]]
case "groupBy":
break;
// [ORDER BY {col_name | expr | position}
case "orderBy":
break;
// [LIMIT {[offset,] row_count | row_count OFFSET offset}]
case "limit":
break;
// [LIMIT {[offset,] row_count | row_count OFFSET offset}]
case "offset":
break;
}

g105b added a commit that referenced this issue Sep 28, 2018
@g105b g105b added this to the v2 milestone Sep 28, 2018
@g105b g105b removed this from the v2 milestone Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant