doobie
doobie copied to clipboard
[Feature Request] Add high level CLOB support
Currently to read CLOBs the low level API is required. It would be great if there was support for CLOBs in the high level API.
If I were able to get som pointers as to what this ought to look like and where to start I could have a go at contibuting this (if my Scala is up to the task!)
Maybe you can say a little bit about how you'd like it to work.
So my naive instinct is that CLOBs should be supported in the high level API just as any other field with their type being Stream[F, Char]
, so for example with a table containg two VARCHARs and a CLOB you could produce a case class Foo(String, String, Stream[F, Char]), it would then be the consumers responsibility to consume the CLOB stream.
A complicating factor is that the lifetime of the CLOB is bounded by the transaction so it will be hard to make this safe. I'll think about it.
Thinking about this some more, having the CLOB already consumed and serialised out into a simple String would actually be a preffered solution to the way that I am using it, though I appreciate others may want the more fine-grained control of managing the stream themselves.
I just need to insert a CLOB in Oracle using doobie, Is this now possible? I see these comments are from 3 years ago
I'm curious about this too. I'm working on an application in Scala 3 and Doobie seems be the only Scala database library with proper support for Scala 3. I am hoping I can get CLOB/BLOB support at some point as I would like 6o use it.