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 superclasses (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)

Superclass 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
  • Example 1
  • The following is an example of retrieving superclasses of the 'female_event' class (see Adding a Superclass).

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'

  • Example 2
  • The following is an example of retrieving superclasses 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'
.