3232
3333typedef SSHORT ObjectType ;
3434
35- const ObjectType obj_relation = 0 ;
36- const ObjectType obj_view = 1 ;
37- const ObjectType obj_trigger = 2 ;
38- const ObjectType obj_computed = 3 ;
39- const ObjectType obj_validation = 4 ;
40- const ObjectType obj_procedure = 5 ;
41- const ObjectType obj_index_expression = 6 ;
42- const ObjectType obj_exception = 7 ;
43- const ObjectType obj_user = 8 ;
44- const ObjectType obj_field = 9 ;
45- const ObjectType obj_index = 10 ;
46- const ObjectType obj_charset = 11 ;
47- const ObjectType obj_user_group = 12 ;
48- const ObjectType obj_sql_role = 13 ;
49- const ObjectType obj_generator = 14 ;
50- const ObjectType obj_udf = 15 ;
51- const ObjectType obj_blob_filter = 16 ;
52- const ObjectType obj_collation = 17 ;
53- const ObjectType obj_package_header = 18 ;
54- const ObjectType obj_package_body = 19 ;
55- const ObjectType obj_privilege = 20 ;
35+ inline constexpr ObjectType obj_relation = 0 ;
36+ inline constexpr ObjectType obj_view = 1 ;
37+ inline constexpr ObjectType obj_trigger = 2 ;
38+ inline constexpr ObjectType obj_computed = 3 ;
39+ inline constexpr ObjectType obj_validation = 4 ;
40+ inline constexpr ObjectType obj_procedure = 5 ;
41+ inline constexpr ObjectType obj_index_expression = 6 ;
42+ inline constexpr ObjectType obj_exception = 7 ;
43+ inline constexpr ObjectType obj_user = 8 ;
44+ inline constexpr ObjectType obj_field = 9 ;
45+ inline constexpr ObjectType obj_index = 10 ;
46+ inline constexpr ObjectType obj_charset = 11 ;
47+ inline constexpr ObjectType obj_user_group = 12 ;
48+ inline constexpr ObjectType obj_sql_role = 13 ;
49+ inline constexpr ObjectType obj_generator = 14 ;
50+ inline constexpr ObjectType obj_udf = 15 ;
51+ inline constexpr ObjectType obj_blob_filter = 16 ;
52+ inline constexpr ObjectType obj_collation = 17 ;
53+ inline constexpr ObjectType obj_package_header = 18 ;
54+ inline constexpr ObjectType obj_package_body = 19 ;
55+ inline constexpr ObjectType obj_privilege = 20 ;
5656
5757// objects types for ddl operations
58- const ObjectType obj_database = 21 ;
59- const ObjectType obj_relations = 22 ;
60- const ObjectType obj_views = 23 ;
61- const ObjectType obj_procedures = 24 ;
62- const ObjectType obj_functions = 25 ;
63- const ObjectType obj_packages = 26 ;
64- const ObjectType obj_generators = 27 ;
65- const ObjectType obj_domains = 28 ;
66- const ObjectType obj_exceptions = 29 ;
67- const ObjectType obj_roles = 30 ;
68- const ObjectType obj_charsets = 31 ;
69- const ObjectType obj_collations = 32 ;
70- const ObjectType obj_filters = 33 ;
58+ inline constexpr ObjectType obj_database = 21 ;
59+ inline constexpr ObjectType obj_relations = 22 ;
60+ inline constexpr ObjectType obj_views = 23 ;
61+ inline constexpr ObjectType obj_procedures = 24 ;
62+ inline constexpr ObjectType obj_functions = 25 ;
63+ inline constexpr ObjectType obj_packages = 26 ;
64+ inline constexpr ObjectType obj_generators = 27 ;
65+ inline constexpr ObjectType obj_domains = 28 ;
66+ inline constexpr ObjectType obj_exceptions = 29 ;
67+ inline constexpr ObjectType obj_roles = 30 ;
68+ inline constexpr ObjectType obj_charsets = 31 ;
69+ inline constexpr ObjectType obj_collations = 32 ;
70+ inline constexpr ObjectType obj_filters = 33 ;
7171
7272// Add new codes here if they are used in RDB$DEPENDENCIES or RDB$USER_PRIVILEGES or stored in backup
7373// Codes for DDL operations add in isDdlObject function as well (find it below).
74- const ObjectType obj_jobs = 34 ;
75- const ObjectType obj_tablespace = 35 ;
76- const ObjectType obj_tablespaces = 36 ;
77- const ObjectType obj_index_condition = 37 ;
74+ inline constexpr ObjectType obj_jobs = 34 ;
75+ inline constexpr ObjectType obj_tablespace = 35 ;
76+ inline constexpr ObjectType obj_tablespaces = 36 ;
77+ inline constexpr ObjectType obj_index_condition = 37 ;
7878
79- const ObjectType obj_schema = 38 ;
80- const ObjectType obj_schemas = 39 ;
79+ inline constexpr ObjectType obj_schema = 38 ;
80+ inline constexpr ObjectType obj_schemas = 39 ;
8181
82- const ObjectType obj_type_MAX = 40 ;
82+ inline constexpr ObjectType obj_type_MAX = 40 ;
8383
8484// used in the parser only / no relation with obj_type_MAX (should be greater)
85- const ObjectType obj_user_or_role = 100 ;
86- const ObjectType obj_parameter = 101 ;
87- const ObjectType obj_column = 102 ;
88- const ObjectType obj_publication = 103 ;
85+ inline constexpr ObjectType obj_user_or_role = 100 ;
86+ inline constexpr ObjectType obj_parameter = 101 ;
87+ inline constexpr ObjectType obj_column = 102 ;
88+ inline constexpr ObjectType obj_publication = 103 ;
8989
90- const ObjectType obj_any = 255 ;
90+ inline constexpr ObjectType obj_any = 255 ;
9191
9292
93- inline bool isSchemaBoundObject (ObjectType objectType )
93+ inline bool isSchemaBoundObject (ObjectType objectType ) noexcept
9494{
9595 switch (objectType )
9696 {
@@ -114,7 +114,7 @@ inline bool isSchemaBoundObject(ObjectType objectType)
114114}
115115
116116
117- inline bool isDdlObject (ObjectType objectType , bool * useSchema = nullptr )
117+ inline bool isDdlObject (ObjectType objectType , bool * useSchema = nullptr ) noexcept
118118{
119119 if (useSchema )
120120 * useSchema = false;
@@ -149,7 +149,7 @@ inline bool isDdlObject(ObjectType objectType, bool* useSchema = nullptr)
149149}
150150
151151
152- inline const char * getDllSecurityName (ObjectType object_type )
152+ inline constexpr const char * getDllSecurityName (ObjectType object_type ) noexcept
153153{
154154 switch (object_type )
155155 {
0 commit comments