Class: OCI::DatabaseManagement::Models::LoadSqlPlanBaselinesFromCursorCacheDetails
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::LoadSqlPlanBaselinesFromCursorCacheDetails
- Defined in:
- lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb
Overview
The details of SQL statements and plans to be loaded from cursor cache. You can specify the plans to load using SQL ID, plan identifier, or filterName and filterValue pair. You can also control the SQL plan baseline into which the plans are loaded using either SQL text or SQL handle.
Constant Summary collapse
- FILTER_NAME_ENUM =
[ FILTER_NAME_SQL_TEXT = 'SQL_TEXT'.freeze, FILTER_NAME_PARSING_SCHEMA_NAME = 'PARSING_SCHEMA_NAME'.freeze, FILTER_NAME_MODULE = 'MODULE'.freeze, FILTER_NAME_ACTION = 'ACTION'.freeze ].freeze
Instance Attribute Summary collapse
-
#credentials ⇒ OCI::DatabaseManagement::Models::ManagedDatabaseCredential
This attribute is required.
-
#filter_name ⇒ String
The name of the filter.
-
#filter_value ⇒ String
The filter value.
-
#is_enabled ⇒ BOOLEAN
Indicates whether the loaded plans are enabled (
true
) or not (false
). -
#is_fixed ⇒ BOOLEAN
Indicates whether the plans are loaded as fixed plans (
true
) or non-fixed plans (false
). -
#job_description ⇒ String
The description of the job.
-
#job_name ⇒ String
[Required] The name of the database job used for loading SQL plan baselines.
-
#plan_hash ⇒ Float
The plan identifier.
-
#sql_handle ⇒ String
The SQL handle to use in identifying the SQL plan baseline into which the plans are loaded.
-
#sql_id ⇒ String
The SQL statement identifier.
-
#sql_text ⇒ String
The SQL text to use in identifying the SQL plan baseline into which the plans are loaded.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ LoadSqlPlanBaselinesFromCursorCacheDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ LoadSqlPlanBaselinesFromCursorCacheDetails
Initializes the object
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 139 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.job_name = attributes[:'jobName'] if attributes[:'jobName'] raise 'You cannot provide both :jobName and :job_name' if attributes.key?(:'jobName') && attributes.key?(:'job_name') self.job_name = attributes[:'job_name'] if attributes[:'job_name'] self.job_description = attributes[:'jobDescription'] if attributes[:'jobDescription'] raise 'You cannot provide both :jobDescription and :job_description' if attributes.key?(:'jobDescription') && attributes.key?(:'job_description') self.job_description = attributes[:'job_description'] if attributes[:'job_description'] self.sql_id = attributes[:'sqlId'] if attributes[:'sqlId'] raise 'You cannot provide both :sqlId and :sql_id' if attributes.key?(:'sqlId') && attributes.key?(:'sql_id') self.sql_id = attributes[:'sql_id'] if attributes[:'sql_id'] self.plan_hash = attributes[:'planHash'] if attributes[:'planHash'] raise 'You cannot provide both :planHash and :plan_hash' if attributes.key?(:'planHash') && attributes.key?(:'plan_hash') self.plan_hash = attributes[:'plan_hash'] if attributes[:'plan_hash'] self.sql_text = attributes[:'sqlText'] if attributes[:'sqlText'] raise 'You cannot provide both :sqlText and :sql_text' if attributes.key?(:'sqlText') && attributes.key?(:'sql_text') self.sql_text = attributes[:'sql_text'] if attributes[:'sql_text'] self.sql_handle = attributes[:'sqlHandle'] if attributes[:'sqlHandle'] raise 'You cannot provide both :sqlHandle and :sql_handle' if attributes.key?(:'sqlHandle') && attributes.key?(:'sql_handle') self.sql_handle = attributes[:'sql_handle'] if attributes[:'sql_handle'] self.filter_name = attributes[:'filterName'] if attributes[:'filterName'] raise 'You cannot provide both :filterName and :filter_name' if attributes.key?(:'filterName') && attributes.key?(:'filter_name') self.filter_name = attributes[:'filter_name'] if attributes[:'filter_name'] self.filter_value = attributes[:'filterValue'] if attributes[:'filterValue'] raise 'You cannot provide both :filterValue and :filter_value' if attributes.key?(:'filterValue') && attributes.key?(:'filter_value') self.filter_value = attributes[:'filter_value'] if attributes[:'filter_value'] self.is_fixed = attributes[:'isFixed'] unless attributes[:'isFixed'].nil? raise 'You cannot provide both :isFixed and :is_fixed' if attributes.key?(:'isFixed') && attributes.key?(:'is_fixed') self.is_fixed = attributes[:'is_fixed'] unless attributes[:'is_fixed'].nil? self.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil? raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled') self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil? self.credentials = attributes[:'credentials'] if attributes[:'credentials'] end |
Instance Attribute Details
#credentials ⇒ OCI::DatabaseManagement::Models::ManagedDatabaseCredential
This attribute is required.
82 83 84 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 82 def credentials @credentials end |
#filter_name ⇒ String
The name of the filter.
-
SQL_TEXT: Search pattern to apply to SQL text.
-
PARSING_SCHEMA_NAME: Name of the parsing schema.
-
MODULE: Name of the module.
-
ACTION: Name of the action.
60 61 62 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 60 def filter_name @filter_name end |
#filter_value ⇒ String
The filter value. It is upper-cased except when it is enclosed in double quotes or filter name is SQL_TEXT
.
66 67 68 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 66 def filter_value @filter_value end |
#is_enabled ⇒ BOOLEAN
Indicates whether the loaded plans are enabled (true
) or not (false
). By default, they are enabled.
78 79 80 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 78 def is_enabled @is_enabled end |
#is_fixed ⇒ BOOLEAN
Indicates whether the plans are loaded as fixed plans (true
) or non-fixed plans (false
). By default, they are loaded as non-fixed plans.
72 73 74 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 72 def is_fixed @is_fixed end |
#job_description ⇒ String
The description of the job.
28 29 30 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 28 def job_description @job_description end |
#job_name ⇒ String
[Required] The name of the database job used for loading SQL plan baselines.
24 25 26 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 24 def job_name @job_name end |
#plan_hash ⇒ Float
The plan identifier. By default, all plans present in the cursor cache for the SQL statement identified by sqlId
are captured.
38 39 40 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 38 def plan_hash @plan_hash end |
#sql_handle ⇒ String
The SQL handle to use in identifying the SQL plan baseline into which the plans are loaded.
50 51 52 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 50 def sql_handle @sql_handle end |
#sql_id ⇒ String
The SQL statement identifier. Identifies a SQL statement in the cursor cache.
32 33 34 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 32 def sql_id @sql_id end |
#sql_text ⇒ String
The SQL text to use in identifying the SQL plan baseline into which the plans are loaded. If the SQL plan baseline does not exist, it is created.
44 45 46 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 44 def sql_text @sql_text end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 85 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'job_name': :'jobName', 'job_description': :'jobDescription', 'sql_id': :'sqlId', 'plan_hash': :'planHash', 'sql_text': :'sqlText', 'sql_handle': :'sqlHandle', 'filter_name': :'filterName', 'filter_value': :'filterValue', 'is_fixed': :'isFixed', 'is_enabled': :'isEnabled', 'credentials': :'credentials' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 104 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'job_name': :'String', 'job_description': :'String', 'sql_id': :'String', 'plan_hash': :'Float', 'sql_text': :'String', 'sql_handle': :'String', 'filter_name': :'String', 'filter_value': :'String', 'is_fixed': :'BOOLEAN', 'is_enabled': :'BOOLEAN', 'credentials': :'OCI::DatabaseManagement::Models::ManagedDatabaseCredential' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 223 def ==(other) return true if equal?(other) self.class == other.class && job_name == other.job_name && job_description == other.job_description && sql_id == other.sql_id && plan_hash == other.plan_hash && sql_text == other.sql_text && sql_handle == other.sql_handle && filter_name == other.filter_name && filter_value == other.filter_value && is_fixed == other.is_fixed && is_enabled == other.is_enabled && credentials == other.credentials end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 263 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
243 244 245 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 243 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
252 253 254 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 252 def hash [job_name, job_description, sql_id, plan_hash, sql_text, sql_handle, filter_name, filter_value, is_fixed, is_enabled, credentials].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
296 297 298 299 300 301 302 303 304 305 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 296 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
290 291 292 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_cursor_cache_details.rb', line 290 def to_s to_hash.to_s end |