mfwgenerics / koala

SQL generation for Kotlin
https://mfwgenerics.github.io/koala/
MIT License
13 stars 4 forks source link

Call stored procedure #63

Open megamirio opened 8 months ago

megamirio commented 8 months ago

Is the a way to call stored procedure in koala: for example in SQL this are:

call someStoredProcedure('param1','param2'):

Thant you, in advance for help.

mfwgenerics commented 8 months ago

Hi Eugene,

Koala doesn't support stored procedures, but I am open to adding some support.

Does your use case require reading back results from your stored procedure? If so, indicate which of the following you will need:

As an aside, I would recommend against using stored procedures except as a last line of optimization.

If you are dead set on using them and you need a quick workaround, you could always downcast the io.koalaql.DataConnection to io.koalaql.jdbc.JdbcConnection and then access the jdbc property to use the JDBC prepareCall method directly.

megamirio commented 8 months ago

Thank you for answering my questions.

I'll use it.

On Wed, Feb 21, 2024, 12:06 mfwgenerics @.***> wrote:

Hi Eugene,

Koala doesn't support stored procedures, but I am open to adding some support.

Does your use case require reading back results from your stored procedure? If so, indicate which of the following you will need:

  • Out parameters
  • Result sets
  • Multiple result sets

As an aside, I would recommend against using stored procedures except as a last line of optimization.

If you are dead set on using them and you need a quick workaround, you could always downcast the io.koalaql.DataConnection to io.koalaql.jdbc.JdbcConnection and then access the jdbc property to use the JDBC prepareCall method directly.

— Reply to this email directly, view it on GitHub https://github.com/mfwgenerics/koala/issues/63#issuecomment-1957328513, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJ5Y26VTM6EQ2XYBQBHU7DYUYSQHAVCNFSM6AAAAABDTJGFROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJXGMZDQNJRGM . You are receiving this because you authored the thread.Message ID: @.***>