Hmm, interesting. Can you post the generated code for your GetClosestTimeSlot class? I suspect there may have bene something wrong with its generation...
2017-03-21 12:09 GMT+01:00 Sheldon D'Souza <[email protected]>: > DELIMITER ;; > CREATE PROCEDURE get_closest_time_slot(IN queueId INT, IN joinTime TIME, > IN dayOfWeek TINYINT,OUT group_id INT,OUT start_time TIME, OUT end_time > TIME, OUT slot_id MEDIUMINT,OUT appointmentTime TIME) > BEGIN > SELECT > a.group_id,a.start_time,a.end_time,ABS(TIMEDIFF(joinTime,a.start_time)) > + ABS(TIMEDIFF(joinTime,a.end_time)) AS closest_group, MAX(b.slot_id) AS > max_slot_id,MAX(b.start_time_slot) as maxAppointmentTime,MIN(b.slot_id) > AS min_slot_id,MIN(b.start_time_slot) as minAppointmentTime FROM > Calendar_time_slot_group AS a JOIN Calendar_time_slot AS b on a.group_id = > b.group_id WHERE a.queue_id = queueId AND a.day = dayOfWeek GROUP BY > a.group_id ORDER BY closest_group ASC LIMIT 1; > END ;; > DELIMITER ; > > > On Tue, Mar 21, 2017 at 4:20 PM, Lukas Eder <[email protected]> wrote: > >> Hi Sheldon, >> >> Thank you for your message. A few questions on my side: >> >> - You're using MySQL, correct? >> - What's the CREATE PROCEDURE declaration of your procedure? >> - What exactly is null that shouldn't be? >> >> Cheers, >> Lukas >> >> 2017-03-21 11:23 GMT+01:00 Sheldon D'Souza <[email protected]>: >> >>> We are facing an issue with Procedure calls >>> >>> when we call the procedure from CLI >>> >>> call `db`.`get_closest_time_slot`(1, time '15:49:58', >>> 2,@group_id,@start_time,@end_time,@min_id,@max_id,@min_time,@max_time); >>> >>> >>> we get the output but when the same is called from Jooq >>> >>> >>> GetClosestTimeSlot output = new GetClosestTimeSlot(); >>> >>> Configuration configuration = this.configuration.derive(); >>> >>> configuration.settings().setRenderNameStyle(RenderNameStyle. >>> AS_IS); >>> >>> output.setQueueid(queueId); >>> >>> output.setDayofweek((byte)dayOfWeek); >>> >>> output.setJointime(selectJoinTime); >>> >>> LOGGER.info("Get closest time slot for {}, {}, {}", queueId, >>> selectJoinTime, dayOfWeek); >>> >>> output.execute(configuration); >>> >>> >>> The output is null, is there something we are missing? >>> >>> -- >>> 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 a topic in the >> Google Groups "jOOQ User Group" group. >> To unsubscribe from this topic, visit https://groups.google.com/d/to >> pic/jooq-user/jkStC1GkicA/unsubscribe. >> To unsubscribe from this group and all its topics, 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. > -- 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.
