underscoreio / essential-slick

Essential Slick Pandoc Source
https://underscore.io/books/essential-slick/
39 stars 8 forks source link

Something on dynamic filtering #34

Open d6y opened 9 years ago

d6y commented 9 years ago

User suggestion: http://underscore.io/blog/posts/2015/05/06/essential-slick.html#comment-2111361019

jonoabroad commented 8 years ago

Should this be in Chapter 5 or Chapter 2?

Either way, I'm having a look.

d6y commented 8 years ago

Oh yeah, it could be chapter 2 if we've introduced enough of how Queries work. I suspect it can be written and then decide where it goes :-)

If you're on this and getting progress on it, cool.

If not...

I'd forgotten about this. I'm tempted to say put it in the Icebox milestone for another time. But a user did ask for it, and it is something that came up at REDACTED too.

Perhaps we should think about "case studies", which is a concept that Essential Scala has for more application focused bits of code.

jonoabroad commented 8 years ago

Moved to ice box after discussion with Richard.

d6y commented 7 years ago

Related, dynamic sorting: http://stackoverflow.com/questions/42383842/dynamic-order-by-in-scala-slick-with-several-columns

via message on Slick mailing list from Antonio reKiem:

According to the slick documentation in this part:

Be aware that a single ORDER BY with multiple columns is not equivalent to multiple .sortBy calls but to a single .sortBy call passing a tuple

But what happend if i want to make a dynamic order by (variable number of colums)? , since i can not create dynamic sized tuples. I already asked this in stack overflow, but using the answer that I received, I am still generating chaining calls to sortBy. The query is created fine, but then why the documentation says is not equivalent?

d6y commented 6 years ago

See also: https://stackoverflow.com/questions/49838709/slick-pass-in-column-to-update/49873298#49873298

Daenyth commented 6 years ago

FWIW https://gist.github.com/Daenyth/75df5633b0649b94a98a99bbe35dd45c

d6y commented 6 years ago

Relates to: #163