DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
...
SessionContext is an entrypoint for accessing the attributes.SessionContext can be further extended to retrieve other non-tabular information, such as SecuritySubject, Transaction, ServiceCallContext, etc.QuerySqlFunction are static, CacheInterceptor is a singleton for cache).| Code Block | ||
|---|---|---|
| ||
/** SessionContext interface. It's an entrypoint for all non-tabular information. */
public class SessionContext {
/** @return Client attributes set for current thread. */
public static @Nullable Map<String, String> getClientAttributes();
}
/** Example, use it in QuerySqlFunction. */
public static class UserDefinedFunctions {
/** @return Session ID, client attribute. */
@QuerySqlFunction
public static String sessionId() {
Map<String, String> clnAttrs = SessionContext.getClientAttributes();
return clnAttrs == null ? null : clnInfo.getProperty(SESSION_ID);
}
}
|
...
...