Closed tvh closed 9 years ago
Some questions about this:
DBSelect
module, for example https://github.com/alevy/mappend/blob/master/Blog/Controllers/PostsController.hs#L45 . Does it make sense to just implement in terms of that module, since it already exposes a safer interface to "offset" and "limit" keywords?" at the end of a function name is that it's not at all clear what the extension is to the original function, especially with something as rich as SQL. Perhaps something like
findPage`?Maybe
so we can easily re-use it from findAll
, but two separate parameters seems more meaningful, IMO. I think it might be better in this case to just duplicate the code but have more a meaningful type signature.Oh, thanks. I think I just missed that. In that case it may make more sense to just use that and not define a special function just for this.
OK. If you find yourself using it a lot and find it cumbersome, we should probably find a way to sensibly make a combinator for it.
To make 'findAll' more useful outside a debugging environment, I added an option to use it with pagination.