faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
_whitelogger has joined #amber
<FromGitter> <bweave> I'm attempting to roll my own little paginator class, but having trouble with types. I'd love some feedback on https://gist.github.com/bweave/3ff909fca4a6dc1db6332ecd86aa677d ⏎ ⏎ Am I even doing it right? 😆
<FromGitter> <Blacksmoke16> could just be `Granite::Base` no?
<FromGitter> <Blacksmoke16> `Granite::Base.class`*
<FromGitter> <bweave> That's what I thought, too, but that blows up when trying to `map` over the records with ```In lib/granite/src/granite/query/assemblers/base.cr:86:9 ⏎ ⏎ 86 | add_aggregate_field expression[:field] ⏎ ⏎ ``` ^------------------``` ... [https://gitter.im/amberframework/amber?at=5e68edf3d17593652b78c9e9]
<FromGitter> <Blacksmoke16> can you run it with `--error-trace`?
<FromGitter> <bweave> Does this provide enough info? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5e68eebd85f81e18a8fcb1aa]
<FromGitter> <Blacksmoke16> what happens if you remove the `order` method
<FromGitter> <Blacksmoke16> `model.limit(10).offset(0)`
<FromGitter> <bweave> same error
<FromGitter> <bweave> FWIW, if I use `Pet.class` or `User.class` then it works, but of course that's not really helpful.
<FromGitter> <Blacksmoke16> prob an issue with using `Granite::Base.class` as the type
<FromGitter> <bweave> Ok, any suggestions? I *seems* like I should be able to do what I'm trying to do, but maybe not?
<FromGitter> <Blacksmoke16> its prob a bug with the query builder stuff
_whitelogger has joined #amber
confact has quit [Read error: Connection reset by peer]
confact has joined #amber