-
Notifications
You must be signed in to change notification settings - Fork 1
packages sess.get_context
Jan Kvetina edited this page Sep 27, 2020
·
3 revisions
Repository spec: sess.get_context
,
body: sess.get_context
See sess.set_context
for examples.
FUNCTION get_context (
in_name VARCHAR2,
in_format VARCHAR2 := NULL,
in_raise VARCHAR2 := 'Y' -- boolean for SQL
)
RETURN VARCHAR2;
Show code (23 lines)
FUNCTION get_context (
--
-- @TODO: get_item, _number, _date
--
in_name VARCHAR2,
in_format VARCHAR2 := NULL,
in_raise VARCHAR2 := 'Y' -- boolean for SQL
)
RETURN VARCHAR2 AS
BEGIN
IF in_format IS NOT NULL THEN
RETURN TO_CHAR(sess.get_context_date(UPPER(in_name)), in_format);
END IF;
--
RETURN SYS_CONTEXT(sess.app_namespace, UPPER(in_name));
EXCEPTION
WHEN OTHERS THEN
IF in_raise = 'Y' THEN
RAISE_APPLICATION_ERROR(tree.app_exception_code, 'GET_CONTEXT_FAILED', TRUE);
END IF;
--
RETURN NULL;
END;