Skip to content

Instantly share code, notes, and snippets.

@Didriksson
Created November 17, 2017 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Didriksson/204be9ae7e9897a31299307b5cd27708 to your computer and use it in GitHub Desktop.
Save Didriksson/204be9ae7e9897a31299307b5cd27708 to your computer and use it in GitHub Desktop.
(j/with-db-connection [conn oracle-db]
(with-open [stmt (.prepareCall (j/get-connection conn) "{ call dbms_pipe.pack_message(?) }")]
(doto stmt
(.setString 1 "Testing testing")
(.execute))
)
(with-open [stmt (.prepareCall (j/get-connection conn) "{? = call dbms_pipe.send_message('pipename') }")]
(doto stmt
(.registerOutParameter 1 java.sql.Types/INTEGER)
(.execute))
(. stmt getObject 1))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment