Search code examples
spring-bootkotlinstored-procedureskotlin-exposed

Spring Boot Kotlin Exposed Stored Procedure


is it posible to call stored procedure from Exposed and map result to object? I'am using Spring Boot with MS SQL.


Solution

  • Of course. You can use a transaction and run your own sql statement in it (calling the procedure) and create a mapping function for that object, where you map the fields of the result set to the ones of the object.

    e: you can have a look in here, how to call simple sql statement and map the resultset

    Is there a way to run raw sql with Kotlin's Exposed library