Fork me on GitHub
#sql
<
2019-06-12
>
emccue17:06:09

is there a way to have hugsql use two different adapters for different sql statements

emccue17:06:02

I have a "query all the things" usecase that seems like would be alot easier if i could wire up hugsql defined queries to two sql datasources separately

emccue17:06:43

(well, more specificially it feels like all it would take would be a custom adapter to make hugsql work perfectly with cassandra's CQL)

curtis.summers17:06:23

Yes, you can pass in the :adapter in the options map during the db function call. See the last example in this section of the docs: https://www.hugsql.org/#adapter-other

mpenet17:06:39

I think I recall somebody mentioning a lib that mixed hugsql and c*

mpenet17:06:27

Here you go

nickmbailey17:06:42

i played around with arche/hugsql awhile ago and found it pretty easy to get up and going

emccue17:06:14

well i feel alot less original, but im glad its been done successfully