Skip to content
Advertisement

How to do SQL from Akka?

What is the idiomatic Akka way to issue SQL statements from an Akka application?

Specifically, I have an Akka Http REST endpoint that wants to do SQL commands. Is there some official SQL support or async or message passing style SQL library?

Advertisement

Answer

Answering your specific question, “what is the idiomatic akka way to issue sql”, I would agree with the commentators that Slick is the usual choice.

Further, I disagree that slick is only a “full complex frm system”. You can always use the plain sql queries functionality within slick. And slick comes with streaming which is obviously “idiomatic” with akka-stream:

elements are streamed directly from the result set through a Reactive Streams Publisher, which can be processed and consumed by Akka Streams.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement