sec_lookup_property_not_cached (private)

 sec_lookup_property_not_cached id module name

Defined in packages/acs-tcl/tcl/security-procs.tcl

Look up a particular session property from the database and record the last hit when found.

Parameters:
id (required)
module (required)
name (required)
Returns:
empty, when no property is recorded or a list containing property_value and secure_p

Partial Call Graph (max 5 caller/called nodes):
test_sec_lookup_property_not_cached_db sec_lookup_property_not_cached_db (test acs-tcl) sec_lookup_property_not_cached sec_lookup_property_not_cached test_sec_lookup_property_not_cached_db->sec_lookup_property_not_cached db_0or1row db_0or1row (public) sec_lookup_property_not_cached->db_0or1row db_dml db_dml (public) sec_lookup_property_not_cached->db_dml db_driverkey db_driverkey (public) sec_lookup_property_not_cached->db_driverkey ad_set_client_property ad_set_client_property (public) ad_set_client_property->sec_lookup_property_not_cached

Testcases:
sec_lookup_property_not_cached_db
Source code:
    if {[db_driverkey ""] eq "postgresql"} {
        # A cache miss needs only one round trip and one lookup on PostgreSQL.
        set new_last_hit [clock seconds]
        if {[db_0or1row property_lookup_touch_sec {
            update sec_session_properties
            set last_hit = :new_last_hit
            where session_id = :id
              and module = :module
              and property_name = :name
            returning property_value, secure_p
        }]} {
            return [list $property_value $secure_p]
        }
        return ""
    }

    # Keep the portable SELECT followed by UPDATE for Oracle and other drivers.
    if {
        ![db_0or1row property_lookup_sec {
            select property_value, secure_p
            from sec_session_properties
            where session_id = :id
            and module = :module
            and property_name = :name
        }]
    } {
        return ""
    }

    set new_last_hit [clock seconds]

    db_dml update_last_hit_dml {
        update sec_session_properties
        set last_hit = :new_last_hit
        where session_id = :id
          and module = :module
          and property_name = :name
    }

    return [list $property_value $secure_p]
Generic XQL file:
packages/acs-tcl/tcl/security-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/security-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/security-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: