Class StoredProcedure


  • public class StoredProcedure
    extends Object
    This reference to a Stored Procedure which can be created by Session.sproc().register methods, and used in Session.storedProcedure() method.

    For example:

    
     StoredProcedure sproc = session.sproc.registerTemporary(
       (Session session, Integer num) -> {
         int result = session.sql("select " + num).collect()[0].getInt(0);
         return result + 100;
       }, DataTypes.IntegerType, DataTypes.IntegerType
     );
     session.storedProcedure(sproc, 123).show();
     
    Since:
    1.8.0
    • Method Detail

      • getName

        public Optional<String> getName()
        Get the name of the given stored procedure
        Returns:
        the name of the given stored procedure
        Since:
        1.8.0