Hello Sugeeth,

Thank you very much for your enquiry.
What are ID_PIN and PIN_NAME? Domains? Or some sort of subtype? There might
be a bug (or missing feature) in that case. The following procedure works
fine for me:

CREATE OR ALTER PROCEDURE MYTESTING (
    ID_PIN int)
RETURNS (
    PIN_NAME varchar(50))
AS
Begin
  For Select 1
  From RDB$DATABASE
  into :Pin_Name
  Do begin
     suspend;
     end
end


Regarding your questions:

So, my question is, Is it only support IN parameters and it does not
> support OUT parameters for Stored procedures ?
>

OUT parameters and table-valued functions are supported as well, but there
might be bugs of course.


> Or what could be the reason it does not create Routine classes when I use
> SP with Out parameters ?


What do you get when you run

    SELECT * FROM RDB$PROCEDURES;
    SELECT * FROM RDB$PROCEDURE_PARAMETERS;

Best,
Lukas

2015-01-14 5:55 GMT+01:00 Sugeeth Adassuriya <[email protected]>:

> Hi Lukas,
>
> I hope that you can help me to over come my problem in Generating
> jooq.Routines classes for my Stored procedure execution.
> I am using database Firebird 2.5 and my jooq version is 3.5.1 and I am
> generating jooq code via maven
>
> Here is sample of a Stored procedure I am using:
> ======================================
> CREATE OR ALTER PROCEDURE MYTESTING (
>     ID_PIN ID_PIN)
> RETURNS (
>     PIN_NAME PIN_NAME)
> AS
> Begin
>   For Select Pin_Name
>   From Pin
>   Where (Id_pin=:Id_Pin)
>   into :Pin_Name
>   Do begin
>      suspend;
>      end
> end
> ======================================
> When I try to generate the Routine classes, it does not generate Routine
> classes for this Stored procedure.
> If I "comment" the Return types (OUT parameters), and then it creates the
> routines class without any problem.
>
> For example:
> ======================================
> CREATE OR ALTER PROCEDURE MYTESTING (
>     ID_PIN ID_PIN)
> AS
> Declare VARIABLE pin_name  PIN_NAME;
> begin
>   Select Pin_name
>   From Pin
>   Where (Id_pin=:Id_Pin)
>   into pin_name;
>   if (ROW_COUNT = 0) Then
>     Exception GENERAL_PNA_EXCEPTION  ' - Pay Not Found';
> end
>
> And routine classes generated:
> ======================================
> public class Mytesting extends
> org.jooq.impl.AbstractRoutine<java.lang.Void> {
>
> private static final long serialVersionUID = -1124225687;
> public static final org.jooq.Parameter<java.lang.Integer> ID_PIN =
> createParameter("ID_PIN", org.jooq.impl.SQLDataType.INTEGER, false);
>
> public Mytesting() {
> super("MYTESTING", com.jooq.entity.DefaultSchema.DEFAULT_SCHEMA);
>
> addInParameter(ID_PIN);
> }
>
> public void setIdPin(java.lang.Integer value) {
> setValue(com.jooq.entity.routines.Mytesting.ID_PIN, value);
> }
> }
> ======================================
>
> So, my question is, Is it only support IN parameters and it does not
> support OUT parameters for Stored procedures ?
> Or what could be the reason it does not create Routine classes when I use
> SP with Out parameters ?
>
> Really appreciate if you could help me on this.
>
> Thanks
> Sugeeth
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to