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_METHOD

Represents method information of a class for which the current user has access authorization to a database.

Attribute Name

Data Type

Description

meth_name

VARCHAR(255)

Method name

class_name

VARCHAR(255)

Name of the class to which the method belongs

meth_type

VARCHAR(8)

‘INSTANCE’ for an instance method, and 'CLASS' for a class method.

from_class_name

VARCHAR(255)

If the method is inherited, the super class in which it is defined is used otherwise NULL

from_meth_name

VARCHAR(255)

If the method is inherited and its name is changed to resolve a name conflict, the original name defined in the super class is used otherwise NULL

func_name

VARCHAR(255)

Name of the C function for the method

Definition

CREATE VCLASS db_method (

meth_name, class_name, meth_type, from_class_name, from_meth_name, func_name)

AS

 

SELECT m.meth_name, m.class_of.class_name,

            CASE WHEN m.meth_type = 0 THEN 'INSTANCE' ELSE 'CLASS' END,

            m.from_class_of.class_name, m.from_meth_name, s.func_name

FROM _db_method m, _db_meth_sig s

WHERE s.meth_of = m AND

              (CURRENT_USER = 'DBA' OR

              {m.class_of.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

              {m.class_of} 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 methods of the db_user class.

SELECT meth_name, meth_type, func_name

FROM db_method

WHERE class_name = 'db_user'

ORDER BY meth_type, meth_name;

  meth_name             meth_type             func_name

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

  'add_user'            'CLASS'               'au_add_user_method'

  'drop_user'           'CLASS'               'au_drop_user_method'

  'find_user'           'CLASS'               'au_find_user_method'

  'login'               'CLASS'               'au_login_method'

  'add_member'          'INSTANCE'            'au_add_member_method'

  'drop_member'         'INSTANCE'            'au_drop_member_method'

  'print_authorizations'  'INSTANCE'            'au_describe_user_method'

  'set_password'        'INSTANCE'            'au_set_password_method'

  'set_password_encoded'  'INSTANCE'            'au_set_password_encoded_method'

  'set_password_encoded_sha1'  'INSTANCE'            'au_set_password_encoded_sha1_method'