Summary: | Add the Koha::Objects->get_column method | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | kyle, m.de.rooy, veron |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 18295 | ||
Attachments: |
Bug 18093: Add Koha::Objects->get_column
Bug 18093: Add Koha::Objects->get_column Bug 18093: Koha::Objects->get_column should not return a DBIC object Bug 18093: Add Koha::Objects->get_column Bug 18093: Koha::Objects->get_column should not return a DBIC object |
Description
Jonathan Druart
2017-02-10 08:39:49 UTC
Created attachment 60104 [details] [review] Bug 18093: Add Koha::Objects->get_column Test plan: prove t/db_dependent/Koha/Objects.t Should return green Created attachment 60115 [details] [review] Bug 18093: Add Koha::Objects->get_column Test plan: prove t/db_dependent/Koha/Objects.t Should return green Followed test plan, result as expected Signed-off-by: Marc Véron <veron@veron.ch> This method now returns a DBIx::Class::ResultSetColumn object. I am wondering if we should do that. It seems not to fit in the current design of Koha::Object[s]. Maybe you need to elaborate first on how we are going to use this method first ? I wanted to add a follow-up for something but finally did not need it. It is not important for now, but we may need it later. (In reply to Jonathan Druart from comment #4) > I wanted to add a follow-up for something but finally did not need it. > It is not important for now, but we may need it later. How would you use it? Koha Objects more-or-less encapsulate DBIx, but here you do not. Would returning an array of values be enough? Created attachment 61154 [details] [review] Bug 18093: Koha::Objects->get_column should not return a DBIC object (In reply to Marcel de Rooy from comment #5) > (In reply to Jonathan Druart from comment #4) > > I wanted to add a follow-up for something but finally did not need it. > > It is not important for now, but we may need it later. > > How would you use it? I would have used it how I did in the test. > Koha Objects more-or-less encapsulate DBIx, but here you do not. > Would returning an array of values be enough? Do you think it's better with this second patch? Created attachment 61155 [details] [review] Bug 18093: Add Koha::Objects->get_column Test plan: prove t/db_dependent/Koha/Objects.t Should return green Followed test plan, result as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 61156 [details] [review] Bug 18093: Koha::Objects->get_column should not return a DBIC object Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Pushed to master for 17.05, thanks Jonathan! This won't get ported back to 16.11.x as it is an enhancement. |