▲ | ryanrasti 3 days ago | |
> but I don't we've solved the map problem. Agreed! If we use `map` directly, Cap'n Web is still constrained by the ORM. The solution would be what you're getting at -- something that directly composes the query builder primitives. In Typegres, that would look like this: ``` let friendsWithPhotos = friendsPromise.select((f) => ({...f, photo: f.photo()}) // `photo()` is a scalar subquery -- it could also be a join ``` i.e., use promise pipelining to build up the query on the server. The idea is that Cap'n Web would allow you to pipeline the Typegres query builder operations. Note this should be possible in other fluent-based query builders (e.g., Kysely/Drizzle). But where Typegres really synergizes with Cap'n Web is that everything is already expressed as methods on classes, so the architecture is capability-ready. P.S. Thanks for your generous offer to help! My contact info is in my HN profile. Would love to connect. |