-
Notifications
You must be signed in to change notification settings - Fork 29
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
Issue/10 - Adds support to fetch all fields in get_results. #11
base: master
Are you sure you want to change the base?
Conversation
…d of the full array. #10
@alexstandiford If you add |
I've spent a few days on & off thinking about this, and have concluded that there is something I do not love about it to merge it outright. I do think the I do not like that it's a hardcoded string used as a shortcut to mean "all columns." It makes me think we should legitimize the idea of "all columns" further, throughout the project, rather than insert a single unique intercept point via a symbol that is widely understood – but not universally understood – to mean "everything".
Thoughts? |
@JJJ Seems like a good thought to me. I'll ponder a little more. |
Just dropping a note that I've been looking into this again. 👀 My opinion about I'd like to benchmark how Perhaps empty columns should just default to all columns instead? I'm not sure if that's counterintuitive or not, but it also seems unlikely anyone would intentionally call |
I think this makes a lot of sense. It is consistent with what generally happens with the Query constructor. I think the consistency would be nice. |
Fixes #10
This makes it possible to pass an asterisk in the
$cols
argument, and fetch all fields for the current table.This isn't a true 1:1 representation of
SELECT *
, instead, there's a tiny bit of logic that tellsget_results
to transform*
into the column names viaget_column_names()
. I believe this will ensure compatibility with other facets of this class.