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

MsSQL Limit Clause #18

Closed
kwhat opened this issue Jan 21, 2016 · 4 comments
Closed

MsSQL Limit Clause #18

kwhat opened this issue Jan 21, 2016 · 4 comments

Comments

@kwhat
Copy link
Collaborator

kwhat commented Jan 21, 2016

I don't have a suggestion for this one yet, but if something dawns on me, I'll create a pull request. So the select limit clause needs a check for MS SQL as it use a differen SELECT TOP n * FROM table; notation.

@kwhat
Copy link
Collaborator Author

kwhat commented Jan 21, 2016

Nice work on this library. It's one of the best standalone query builders I have seen on packagist. This issue should be fairly simple to fix in short term. If most of the private members and functions in SelectStatement were changed to protected, I could extended it and override getSelect() to implement the MsSQL limit. The same sort of thing will probably apply to other classes. The long term solution here is to have a set of interfaces that are implemented for each RDBMS flavor and specified via the config, but that will take quite a bit more effort.

@FaaPz
Copy link
Owner

FaaPz commented Jan 21, 2016

Thanks @kwhat! I like your idea making Slim-PDO more extendable. The long term solution you're suggesting might be something more for a V2, but changing some members and functions to protected should do the job for now without breaking things indeed. 😄

@kwhat
Copy link
Collaborator Author

kwhat commented Jan 21, 2016

Yah, thats what I figured. I can put in a Pull Request at some point today.

@FaaPz
Copy link
Owner

FaaPz commented Jan 21, 2016

Perfect! 👌

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

No branches or pull requests

2 participants