Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for querying multiple databases via Idiom tracking #971

Open
schmitch opened this issue Nov 23, 2017 · 2 comments
Open

Support for querying multiple databases via Idiom tracking #971

schmitch opened this issue Nov 23, 2017 · 2 comments

Comments

@schmitch
Copy link
Contributor

currently It's possible to know that a query is only read only, transactionel or read/write.
however it's not possible to route the query to a different database once, because of type inference.

☝️ 23. November 2017 07:59

@mosyp
Copy link
Collaborator

mosyp commented Nov 23, 2017

@fwbrasil that's something I've been talking in #881 (comment).
I have been doing some research on this in https://github.com/mentegy/quill/blob/idiom-bound-quill/quill-core/src/main/scala/io/getquill/monad/IOMonad.scala#L56 and https://github.com/mentegy/quill/blob/idiom-bound-quill/quill-core/src/main/scala/io/getquill/idiom/Idiom.scala.

So the point is that Idiom will extends CoreDsl expect EncodingDsl, the latest will be still remained in contexts. All actions created within idiom will be IO monad and could be ran across several sources/contexts which support that idiom.
To track the idiom within IO I've enriched this with new type param trait IO[+T, -E <: Effect, I <: Idiom].

However I've not figured out yet how to do with type materialization, e.g. Run* -> context's bound type

@mosyp mosyp changed the title support for querying multiple databases via effect tracking Support for querying multiple databases via Idiom tracking Nov 23, 2017
@fwbrasil
Copy link
Collaborator

@mentegy the main challenge is the liftings and Quoted dependent type. I've tried something here but had a few problems. I'm not sure I understand your approach, could you give more details?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants