-
-
Notifications
You must be signed in to change notification settings - Fork 110
Added fetchField function to Selection #74
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
Conversation
|
@foxycode You need to set php.ini http://tester.nette.org/#toc-vlastni-php-ini |
src/Database/Table/Selection.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about select($column) before fetch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dg Makes sense, but shouldn't be then select added to fetchPairs too? And it will probably not work for int column key which is default for fetchField function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ActiveRow supports indexed keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I see, it does not. So I can add select() as you proposed and make $column without default value. Or I can try to update ActiveRow to support indexed keys. What would you like reather?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ActiveRow should not support indexed keys. $column default value can be NULL to allow $table->select('xx')->fetchSingle() too.
|
@JanTvrdik Thanks |
|
@dg Let me know if this is sufficient. I'll try to write some test then. |
|
Updated and with test. |
|
@dg What should I do to push this further? |
|
Thanks. Can you change commit message to |
|
@dg Changed and rebased from current master |
|
Thanks! |
Added fetchField function to Selection
|
@dg Glad to contribute. Hope you plan new release early :) |
I don't understand why
fetchFieldwasn't added toSelectionearlier. I am missing it here every day. Hope this will be accepted.I wanted to create some tests for Selection too, but I can't get existing tests running. Testers show me this: http://i.imgur.com/13EzLhg.png But I am sure that I have pdo installed and enabled.