Genie Discord forum
![Author Avatar](https://cdn.discordapp.com/avatars/796964196217520149/5fd3ef769491d89432ebcb75cdef6560.png?size=512)
SELECT DISTINCT e.* FROM employeeprograms ep JOIN employees e ON ep.reports_to = e.id WHERE ep.employee_id = 8 AND ep.program_id = 1;
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
I think queries like that are beyond what Searchlight can do now. You'd have to directly use the query itself
![Author Avatar](https://cdn.discordapp.com/avatars/796964196217520149/5fd3ef769491d89432ebcb75cdef6560.png?size=512)
Can you tell me how do I directly execute a query using Searchlight?
I am in a bit of struggle with finding documentation or examples to learn what functions to call and how to use? Would be great if I could find a pointer towards where to look.
![Author Avatar](https://cdn.discordapp.com/avatars/796964196217520149/5fd3ef769491d89432ebcb75cdef6560.png?size=512)
I just figured out that I could use DBInterface to directly connect and execute some queries like the one I mentioned. Wondering if there are any implications to using SearchLight ORM along with DBInterface where I need some complex queries?
Are there any other mature ORM solutions that I can use with Genie framework that support different relationships and complex queries when required.
I came across FunSQL.jl and want to be trying that out a bit.
When I need to use different db libraries in the same app, can I use some connection pool from which I can share connections between different DB libraries?