Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 



DB_DIRECT_SUPER_CLASS

Represents the names of super classes (if any) of the class for which the current user has access authorization to a database.

Attribute Name

Data Type

Description

class_name

VARCHAR(255)

Class name

super_class_name

VARCHAR(255)

super class name

Definition

CREATE VCLASS db_direct_super_class (class_name, super_class_name)

AS

SELECT c.class_name, s.class_name

FROM _db_class c, TABLE(c.super_classes) AS t(s)

WHERE (CURRENT_USER = 'DBA' OR

              {c.owner.name} subseteq (

                              SELECT set{CURRENT_USER} + coalesce(sum(set{t.g.name}), set{})

                              from db_user u, table(groups) as t(g)

                              where u.name = CURRENT_USER ) OR

              {c} subseteq (

SELECT sum(set{au.class_of})

                              FROM _db_auth au

                              WHERE {au.grantee.name} subseteq (

                                                      SELECT set{CURRENT_USER} + coalesce(sum(set{t.g.name}), set{})

                                                      from db_user u, table(groups) as t(g)

                                                      where u.name = CURRENT_USER ) AND

                                                                      au.auth_type = 'SELECT'))

Example

The following example shows how to retrieve super classes of the 'female_event' class (see ADD SUPERCLASS Clause).

SELECT super_class_name

FROM db_direct_super_class

WHERE class_name = 'female_event';

  super_class_name

======================

  'event'

The following example shows how to retrieve super classes of the class owned by the current user (PUBLIC user).

SELECT c.class_name, s.super_class_name

FROM db_class c, db_direct_super_class s

WHERE c.class_name = s.class_name AND c.owner_name = user

ORDER BY 1;

  class_name            super_class_name

============================================

  'female_event'        'event'