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 names of super classes (if any) of the class for which the current user has access authorization in the 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 is an example of retrieving super classes of the 'female_event' class (see Adding a Super Class).

csql> select super_class_name

csql> from db_direct_super_class

csql> where class_name = 'female_event'

csql> xrun

 

=== < Result of SELECT Command in Line 1> ===

 

  super_class_name

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

  'event'

  • The following is an example of retrieving super classes of the class owned by the current user (PUBLIC user).

csql> select c.class_name, s.super_class_name

csql> from db_class c, db_direct_super_class s

csql> where c.class_name = s.class_name and

csql>             c.owner_name = user

csql> order by 1

csql> xrun

 

=== < Result of SELECT Command in Line 1> ===

 

  class_name                      super_class_name

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

  'female_event'              'event'