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 the method information of the class for which the current user has access authorization in the 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 is an example of retrieving methods of the ‘glo’ class.

csql> select meth_name, meth_type, func_name

csql> from db_method

csql> where class_name = 'glo'

csql> order by meth_type, meth_name

csql> xrun

 

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

 

  meth_name                        meth_type                        func_name

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

  'new'                                'CLASS'                            'esm_Glo_create'

  'new_fbo'                        'CLASS'                            'esm_Glo_create_fbo'

  'new_lo'                          'CLASS'                            'esm_Glo_create_lo'

  'new_lo_import'            'CLASS'                            'esm_Glo_import_lo'

  'append_data'                'INSTANCE'                      'esm_Glo_append'

  'binary_search'            'INSTANCE'                      'esm_Glo_binary_search'

  'compress_data'            'INSTANCE'                      'esm_Glo_compress'

  'copy_from'                    'INSTANCE'                      'esm_Glo_copy_from'

  'copy_to'                        'INSTANCE'                      'esm_Glo_copy_to'

  'data_pos'                      'INSTANCE'                      'esm_Glo_position'

  'data_seek'                    'INSTANCE'                      'esm_Glo_seek'

  'data_size'                    'INSTANCE'                      'esm_Glo_size'

  'delete_data'                'INSTANCE'                      'esm_Glo_delete'

  . . .