Created
July 31, 2015 10:56
-
-
Save schmitch/6964a342f441bcff9d67 to your computer and use it in GitHub Desktop.
Demo DBIO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object Demo { | |
| def simple = { | |
| SimpleDBIO[Long]{d => | |
| val lobj = d.connection.unwrap(classOf[PGConnection]).getLargeObjectAPI | |
| val oid = lobj.createLO(LargeObjectManager.READWRITE) | |
| val lo = lobj.open(oid, LargeObjectManager.WRITE) | |
| val out = lo.getOutputStream // Use this outputstream to write directly to the database | |
| // Write to the outputstream, call close | |
| oid | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment