Annotation Type SessionContextProviderResource


  • @Documented
    @Retention(RUNTIME)
    @Target(FIELD)
    public @interface SessionContextProviderResource
    Annotates a field for injecting a SessionContext into a user defined functions.

    Here is how injection would typically happen:

         public class MyFunctions {
             @SessionContextProviderResource
             public SessionContextProvider sesCtxProv;
    
             @QuerySqlFunction
             public String sessionId() {
                 SessionContext sesCtx = sesCtxProv.getSessionContext();
    
                 return sesCtx.getAttribute("SESSION_ID");
             }
         }
     

    Note, CacheInterceptor, QuerySqlFunction in the Calcite engine are supported.

    See Also:
    SessionContext