Skip to content

Conversation

@evnm
Copy link

@evnm evnm commented Mar 19, 2015

Currently, the only means by which to issue a SELECT query and operate on a high-level representation of the results is to use Client.select and provide a function to map over any Rows that are returned. In cases where one wants to e.g. perform some computation on the entire result set rather than on individual rows, they must use Client.fetch. Thus, they're forced to deal with the raw Fields and DataRows, in most cases duplicating the private[this] conversion code in Client.scala.

This change moves the SelectResult => List[Row] conversion function into a new public function, SelectResult.toRowList, which can be used in conjunction with Client.fetch to issue one-shot SELECTs and operate on the entire result set.

@coveralls
Copy link

Coverage Status

Coverage increased (+8.82%) to 25.83% when pulling 275a140 on evnm:factor-out-selectresult-helper-function into 86a1ac5 on finagle:master.

@evnm
Copy link
Author

evnm commented Jul 13, 2015

ping

@vkostyukov
Copy link
Collaborator

Hey @evnm! Any chance you want to rebase this PR so we can get this merged?

@evnm evnm force-pushed the factor-out-selectresult-helper-function branch from 275a140 to 8706af4 Compare November 2, 2015 19:39
@evnm
Copy link
Author

evnm commented Nov 2, 2015

Branch updated. Tests still pass.

@jeremyrsmith
Copy link
Collaborator

I'm going to close this because it's stale - feel free to open again after rebasing to master and I'll take a look. Sorry it never got merged before (looks like it's from before my time).

I think you might find that this idea is no longer necessary, as there are query methods that get you a Future[Seq[T]].

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

Successfully merging this pull request may close these issues.

4 participants