Class: OCI::DatabaseManagement::Models::LoadSqlTuningSetDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database_management/models/load_sql_tuning_set_details.rb

Overview

The details required to load the Sql statements into the Sql tuning set.

Constant Summary collapse

LOAD_TYPE_ENUM =
[
  LOAD_TYPE_INCREMENTAL_CURSOR_CACHE = 'INCREMENTAL_CURSOR_CACHE'.freeze,
  LOAD_TYPE_CURRENT_CURSOR_CACHE = 'CURRENT_CURSOR_CACHE'.freeze,
  LOAD_TYPE_AWR = 'AWR'.freeze
].freeze
RECURSIVE_SQL_ENUM =
[
  RECURSIVE_SQL_HAS_RECURSIVE_SQL = 'HAS_RECURSIVE_SQL'.freeze,
  RECURSIVE_SQL_NO_RECURSIVE_SQL = 'NO_RECURSIVE_SQL'.freeze
].freeze
RANKING_MEASURE1_ENUM =
[
  RANKING_MEASURE1_ELAPSED_TIME = 'ELAPSED_TIME'.freeze,
  RANKING_MEASURE1_CPU_TIME = 'CPU_TIME'.freeze,
  RANKING_MEASURE1_OPTIMIZER_COST = 'OPTIMIZER_COST'.freeze,
  RANKING_MEASURE1_BUFFER_GETS = 'BUFFER_GETS'.freeze,
  RANKING_MEASURE1_DISK_READS = 'DISK_READS'.freeze,
  RANKING_MEASURE1_DIRECT_WRITES = 'DIRECT_WRITES'.freeze
].freeze
RANKING_MEASURE2_ENUM =
[
  RANKING_MEASURE2_ELAPSED_TIME = 'ELAPSED_TIME'.freeze,
  RANKING_MEASURE2_CPU_TIME = 'CPU_TIME'.freeze,
  RANKING_MEASURE2_OPTIMIZER_COST = 'OPTIMIZER_COST'.freeze,
  RANKING_MEASURE2_BUFFER_GETS = 'BUFFER_GETS'.freeze,
  RANKING_MEASURE2_DISK_READS = 'DISK_READS'.freeze,
  RANKING_MEASURE2_DIRECT_WRITES = 'DIRECT_WRITES'.freeze
].freeze
RANKING_MEASURE3_ENUM =
[
  RANKING_MEASURE3_ELAPSED_TIME = 'ELAPSED_TIME'.freeze,
  RANKING_MEASURE3_CPU_TIME = 'CPU_TIME'.freeze,
  RANKING_MEASURE3_OPTIMIZER_COST = 'OPTIMIZER_COST'.freeze,
  RANKING_MEASURE3_BUFFER_GETS = 'BUFFER_GETS'.freeze,
  RANKING_MEASURE3_DISK_READS = 'DISK_READS'.freeze,
  RANKING_MEASURE3_DIRECT_WRITES = 'DIRECT_WRITES'.freeze
].freeze
CAPTURE_OPTION_ENUM =
[
  CAPTURE_OPTION_INSERT = 'INSERT'.freeze,
  CAPTURE_OPTION_UPDATE = 'UPDATE'.freeze,
  CAPTURE_OPTION_MERGE = 'MERGE'.freeze
].freeze
CAPTURE_MODE_ENUM =
[
  CAPTURE_MODE_MODE_REPLACE_OLD_STATS = 'MODE_REPLACE_OLD_STATS'.freeze,
  CAPTURE_MODE_MODE_ACCUMULATE_STATS = 'MODE_ACCUMULATE_STATS'.freeze
].freeze
LOAD_OPTION_ENUM =
[
  LOAD_OPTION_INSERT = 'INSERT'.freeze,
  LOAD_OPTION_UPDATE = 'UPDATE'.freeze,
  LOAD_OPTION_MERGE = 'MERGE'.freeze
].freeze
UPDATE_OPTION_ENUM =
[
  UPDATE_OPTION_REPLACE = 'REPLACE'.freeze,
  UPDATE_OPTION_ACCUMULATE = 'ACCUMULATE'.freeze
].freeze
UPDATE_CONDITION_ENUM =
[
  UPDATE_CONDITION_OLD = 'OLD'.freeze,
  UPDATE_CONDITION_NEW = 'NEW'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LoadSqlTuningSetDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 374

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.credential_details = attributes[:'credentialDetails'] if attributes[:'credentialDetails']

  raise 'You cannot provide both :credentialDetails and :credential_details' if attributes.key?(:'credentialDetails') && attributes.key?(:'credential_details')

  self.credential_details = attributes[:'credential_details'] if attributes[:'credential_details']

  self.show_sql_only = attributes[:'showSqlOnly'] if attributes[:'showSqlOnly']

  raise 'You cannot provide both :showSqlOnly and :show_sql_only' if attributes.key?(:'showSqlOnly') && attributes.key?(:'show_sql_only')

  self.show_sql_only = attributes[:'show_sql_only'] if attributes[:'show_sql_only']

  self.owner = attributes[:'owner'] if attributes[:'owner']
  self.owner = "null" if owner.nil? && !attributes.key?(:'owner') # rubocop:disable Style/StringLiterals

  self.name = attributes[:'name'] if attributes[:'name']

  self.load_type = attributes[:'loadType'] if attributes[:'loadType']
  self.load_type = "INCREMENTAL_CURSOR_CACHE" if load_type.nil? && !attributes.key?(:'loadType') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :loadType and :load_type' if attributes.key?(:'loadType') && attributes.key?(:'load_type')

  self.load_type = attributes[:'load_type'] if attributes[:'load_type']
  self.load_type = "INCREMENTAL_CURSOR_CACHE" if load_type.nil? && !attributes.key?(:'loadType') && !attributes.key?(:'load_type') # rubocop:disable Style/StringLiterals

  self.basic_filter = attributes[:'basicFilter'] if attributes[:'basicFilter']
  self.basic_filter = "null" if basic_filter.nil? && !attributes.key?(:'basicFilter') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :basicFilter and :basic_filter' if attributes.key?(:'basicFilter') && attributes.key?(:'basic_filter')

  self.basic_filter = attributes[:'basic_filter'] if attributes[:'basic_filter']
  self.basic_filter = "null" if basic_filter.nil? && !attributes.key?(:'basicFilter') && !attributes.key?(:'basic_filter') # rubocop:disable Style/StringLiterals

  self.recursive_sql = attributes[:'recursiveSql'] if attributes[:'recursiveSql']
  self.recursive_sql = "HAS_RECURSIVE_SQL" if recursive_sql.nil? && !attributes.key?(:'recursiveSql') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :recursiveSql and :recursive_sql' if attributes.key?(:'recursiveSql') && attributes.key?(:'recursive_sql')

  self.recursive_sql = attributes[:'recursive_sql'] if attributes[:'recursive_sql']
  self.recursive_sql = "HAS_RECURSIVE_SQL" if recursive_sql.nil? && !attributes.key?(:'recursiveSql') && !attributes.key?(:'recursive_sql') # rubocop:disable Style/StringLiterals

  self.result_percentage = attributes[:'resultPercentage'] if attributes[:'resultPercentage']
  self.result_percentage = 1.0 if result_percentage.nil? && !attributes.key?(:'resultPercentage') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :resultPercentage and :result_percentage' if attributes.key?(:'resultPercentage') && attributes.key?(:'result_percentage')

  self.result_percentage = attributes[:'result_percentage'] if attributes[:'result_percentage']
  self.result_percentage = 1.0 if result_percentage.nil? && !attributes.key?(:'resultPercentage') && !attributes.key?(:'result_percentage') # rubocop:disable Style/StringLiterals

  self.result_limit = attributes[:'resultLimit'] if attributes[:'resultLimit']

  raise 'You cannot provide both :resultLimit and :result_limit' if attributes.key?(:'resultLimit') && attributes.key?(:'result_limit')

  self.result_limit = attributes[:'result_limit'] if attributes[:'result_limit']

  self.ranking_measure1 = attributes[:'rankingMeasure1'] if attributes[:'rankingMeasure1']
  self.ranking_measure1 = "null" if ranking_measure1.nil? && !attributes.key?(:'rankingMeasure1') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :rankingMeasure1 and :ranking_measure1' if attributes.key?(:'rankingMeasure1') && attributes.key?(:'ranking_measure1')

  self.ranking_measure1 = attributes[:'ranking_measure1'] if attributes[:'ranking_measure1']
  self.ranking_measure1 = "null" if ranking_measure1.nil? && !attributes.key?(:'rankingMeasure1') && !attributes.key?(:'ranking_measure1') # rubocop:disable Style/StringLiterals

  self.ranking_measure2 = attributes[:'rankingMeasure2'] if attributes[:'rankingMeasure2']
  self.ranking_measure2 = "null" if ranking_measure2.nil? && !attributes.key?(:'rankingMeasure2') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :rankingMeasure2 and :ranking_measure2' if attributes.key?(:'rankingMeasure2') && attributes.key?(:'ranking_measure2')

  self.ranking_measure2 = attributes[:'ranking_measure2'] if attributes[:'ranking_measure2']
  self.ranking_measure2 = "null" if ranking_measure2.nil? && !attributes.key?(:'rankingMeasure2') && !attributes.key?(:'ranking_measure2') # rubocop:disable Style/StringLiterals

  self.ranking_measure3 = attributes[:'rankingMeasure3'] if attributes[:'rankingMeasure3']
  self.ranking_measure3 = "null" if ranking_measure3.nil? && !attributes.key?(:'rankingMeasure3') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :rankingMeasure3 and :ranking_measure3' if attributes.key?(:'rankingMeasure3') && attributes.key?(:'ranking_measure3')

  self.ranking_measure3 = attributes[:'ranking_measure3'] if attributes[:'ranking_measure3']
  self.ranking_measure3 = "null" if ranking_measure3.nil? && !attributes.key?(:'rankingMeasure3') && !attributes.key?(:'ranking_measure3') # rubocop:disable Style/StringLiterals

  self.total_time_limit = attributes[:'totalTimeLimit'] if attributes[:'totalTimeLimit']

  raise 'You cannot provide both :totalTimeLimit and :total_time_limit' if attributes.key?(:'totalTimeLimit') && attributes.key?(:'total_time_limit')

  self.total_time_limit = attributes[:'total_time_limit'] if attributes[:'total_time_limit']

  self.repeat_interval = attributes[:'repeatInterval'] if attributes[:'repeatInterval']

  raise 'You cannot provide both :repeatInterval and :repeat_interval' if attributes.key?(:'repeatInterval') && attributes.key?(:'repeat_interval')

  self.repeat_interval = attributes[:'repeat_interval'] if attributes[:'repeat_interval']

  self.capture_option = attributes[:'captureOption'] if attributes[:'captureOption']
  self.capture_option = "MERGE" if capture_option.nil? && !attributes.key?(:'captureOption') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :captureOption and :capture_option' if attributes.key?(:'captureOption') && attributes.key?(:'capture_option')

  self.capture_option = attributes[:'capture_option'] if attributes[:'capture_option']
  self.capture_option = "MERGE" if capture_option.nil? && !attributes.key?(:'captureOption') && !attributes.key?(:'capture_option') # rubocop:disable Style/StringLiterals

  self.capture_mode = attributes[:'captureMode'] if attributes[:'captureMode']
  self.capture_mode = "MODE_REPLACE_OLD_STATS" if capture_mode.nil? && !attributes.key?(:'captureMode') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :captureMode and :capture_mode' if attributes.key?(:'captureMode') && attributes.key?(:'capture_mode')

  self.capture_mode = attributes[:'capture_mode'] if attributes[:'capture_mode']
  self.capture_mode = "MODE_REPLACE_OLD_STATS" if capture_mode.nil? && !attributes.key?(:'captureMode') && !attributes.key?(:'capture_mode') # rubocop:disable Style/StringLiterals

  self.attribute_list = attributes[:'attributeList'] if attributes[:'attributeList']
  self.attribute_list = "TYPICAL" if attribute_list.nil? && !attributes.key?(:'attributeList') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :attributeList and :attribute_list' if attributes.key?(:'attributeList') && attributes.key?(:'attribute_list')

  self.attribute_list = attributes[:'attribute_list'] if attributes[:'attribute_list']
  self.attribute_list = "TYPICAL" if attribute_list.nil? && !attributes.key?(:'attributeList') && !attributes.key?(:'attribute_list') # rubocop:disable Style/StringLiterals

  self.load_option = attributes[:'loadOption'] if attributes[:'loadOption']
  self.load_option = "INSERT" if load_option.nil? && !attributes.key?(:'loadOption') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :loadOption and :load_option' if attributes.key?(:'loadOption') && attributes.key?(:'load_option')

  self.load_option = attributes[:'load_option'] if attributes[:'load_option']
  self.load_option = "INSERT" if load_option.nil? && !attributes.key?(:'loadOption') && !attributes.key?(:'load_option') # rubocop:disable Style/StringLiterals

  self.update_option = attributes[:'updateOption'] if attributes[:'updateOption']
  self.update_option = "REPLACE" if update_option.nil? && !attributes.key?(:'updateOption') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :updateOption and :update_option' if attributes.key?(:'updateOption') && attributes.key?(:'update_option')

  self.update_option = attributes[:'update_option'] if attributes[:'update_option']
  self.update_option = "REPLACE" if update_option.nil? && !attributes.key?(:'updateOption') && !attributes.key?(:'update_option') # rubocop:disable Style/StringLiterals

  self.update_attributes = attributes[:'updateAttributes'] if attributes[:'updateAttributes']
  self.update_attributes = "null" if update_attributes.nil? && !attributes.key?(:'updateAttributes') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :updateAttributes and :update_attributes' if attributes.key?(:'updateAttributes') && attributes.key?(:'update_attributes')

  self.update_attributes = attributes[:'update_attributes'] if attributes[:'update_attributes']
  self.update_attributes = "null" if update_attributes.nil? && !attributes.key?(:'updateAttributes') && !attributes.key?(:'update_attributes') # rubocop:disable Style/StringLiterals

  self.update_condition = attributes[:'updateCondition'] if attributes[:'updateCondition']
  self.update_condition = "null" if update_condition.nil? && !attributes.key?(:'updateCondition') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :updateCondition and :update_condition' if attributes.key?(:'updateCondition') && attributes.key?(:'update_condition')

  self.update_condition = attributes[:'update_condition'] if attributes[:'update_condition']
  self.update_condition = "null" if update_condition.nil? && !attributes.key?(:'updateCondition') && !attributes.key?(:'update_condition') # rubocop:disable Style/StringLiterals

  self.is_ignore_null = attributes[:'isIgnoreNull'] unless attributes[:'isIgnoreNull'].nil?
  self.is_ignore_null = true if is_ignore_null.nil? && !attributes.key?(:'isIgnoreNull') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :isIgnoreNull and :is_ignore_null' if attributes.key?(:'isIgnoreNull') && attributes.key?(:'is_ignore_null')

  self.is_ignore_null = attributes[:'is_ignore_null'] unless attributes[:'is_ignore_null'].nil?
  self.is_ignore_null = true if is_ignore_null.nil? && !attributes.key?(:'isIgnoreNull') && !attributes.key?(:'is_ignore_null') # rubocop:disable Style/StringLiterals

  self.commit_rows = attributes[:'commitRows'] if attributes[:'commitRows']

  raise 'You cannot provide both :commitRows and :commit_rows' if attributes.key?(:'commitRows') && attributes.key?(:'commit_rows')

  self.commit_rows = attributes[:'commit_rows'] if attributes[:'commit_rows']

  self.begin_snapshot = attributes[:'beginSnapshot'] if attributes[:'beginSnapshot']
  self.begin_snapshot = 1 if begin_snapshot.nil? && !attributes.key?(:'beginSnapshot') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :beginSnapshot and :begin_snapshot' if attributes.key?(:'beginSnapshot') && attributes.key?(:'begin_snapshot')

  self.begin_snapshot = attributes[:'begin_snapshot'] if attributes[:'begin_snapshot']
  self.begin_snapshot = 1 if begin_snapshot.nil? && !attributes.key?(:'beginSnapshot') && !attributes.key?(:'begin_snapshot') # rubocop:disable Style/StringLiterals

  self.end_snapshot = attributes[:'endSnapshot'] if attributes[:'endSnapshot']
  self.end_snapshot = 2 if end_snapshot.nil? && !attributes.key?(:'endSnapshot') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :endSnapshot and :end_snapshot' if attributes.key?(:'endSnapshot') && attributes.key?(:'end_snapshot')

  self.end_snapshot = attributes[:'end_snapshot'] if attributes[:'end_snapshot']
  self.end_snapshot = 2 if end_snapshot.nil? && !attributes.key?(:'endSnapshot') && !attributes.key?(:'end_snapshot') # rubocop:disable Style/StringLiterals

  self.baseline_name = attributes[:'baselineName'] if attributes[:'baselineName']
  self.baseline_name = "null" if baseline_name.nil? && !attributes.key?(:'baselineName') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :baselineName and :baseline_name' if attributes.key?(:'baselineName') && attributes.key?(:'baseline_name')

  self.baseline_name = attributes[:'baseline_name'] if attributes[:'baseline_name']
  self.baseline_name = "null" if baseline_name.nil? && !attributes.key?(:'baselineName') && !attributes.key?(:'baseline_name') # rubocop:disable Style/StringLiterals
end

Instance Attribute Details

#attribute_listString

Specifies the list of Sql statement attributes to return in the result. Note that this parameter cannot be made an enum since custom value can take a list of comma separated attribute names. Attribute list can take one of the following values. TYPICAL - Specifies BASIC plus Sql plan (without row source statistics) and without object reference list (default). BASIC - Specifies all attributes (such as execution statistics and binds) except the plans. The execution context is always part of the result. ALL - Specifies all attributes. CUSTOM - Comma-separated list of the following attribute names. - EXECUTION_STATISTICS - BIND_LIST - OBJECT_LIST - SQL_PLAN - SQL_PLAN_STATISTICS Usage examples: 1. "attributeList": "TYPICAL" 2. "attributeList": "ALL" 3. "attributeList": "EXECUTION_STATISTICS,OBJECT_LIST,SQL_PLAN"

Returns:

  • (String)


175
176
177
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 175

def attribute_list
  @attribute_list
end

#baseline_nameString

Specifies the name of the AWR baseline period. When loading the sql statements from AWR, following inputs has to be provided: beginSnapshot and endSnapshot OR baselineName

Returns:

  • (String)


272
273
274
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 272

def baseline_name
  @baseline_name
end

#basic_filterString

Specifies the Sql predicate to filter the Sql from the Sql tuning set defined on attributes of the SQLSET_ROW. User could use any combination of the following columns with appropriate values as Sql predicate Refer to the documentation docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_SQLTUNE.html#GUID-1F4AFB03-7B29-46FC-B3F2-CB01EC36326C

Returns:

  • (String)


103
104
105
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 103

def basic_filter
  @basic_filter
end

#begin_snapshotInteger

Defines the beginning AWR snapshot (non-inclusive).

Returns:

  • (Integer)


259
260
261
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 259

def begin_snapshot
  @begin_snapshot
end

#capture_modeString

Specifies the capture mode. Note that this parameter is applicable only for UPDATE and MERGE capture options. Capture mode can take one of the following values - MODE_REPLACE_OLD_STATS Replaces statistics when the number of executions is greater than the number stored in the Sql tuning set - MODE_ACCUMULATE_STATS Adds new values to current values for Sql that is already stored. Note that this mode detects if a statement has been aged out, so the final value for a statistics is the sum of the statistics of all cursors that statement existed under.

Returns:

  • (String)


155
156
157
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 155

def capture_mode
  @capture_mode
end

#capture_optionString

Specifies whether to insert new statements, update existing statements, or both.

Returns:

  • (String)


144
145
146
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 144

def capture_option
  @capture_option
end

#commit_rowsInteger

Specifies whether to commit statements after DML. If a value is provided, then the load commits after each specified number of statements is inserted. If NULL is provided, then the load commits only once, at the end of the operation.

Returns:

  • (Integer)


255
256
257
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 255

def commit_rows
  @commit_rows
end

#credential_detailsOCI::DatabaseManagement::Models::SqlTuningSetAdminCredentialDetails

This attribute is required.



79
80
81
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 79

def credential_details
  @credential_details
end

#end_snapshotInteger

Defines the ending AWR snapshot (inclusive).

Returns:

  • (Integer)


263
264
265
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 263

def end_snapshot
  @end_snapshot
end

#is_ignore_nullBOOLEAN

Specifies whether to update attributes when the new value is NULL. If TRUE, then the procedure does not update an attribute when the new value is NULL. That is, do not override with NULL values unless intentional. Possible values - true or false

Returns:

  • (BOOLEAN)


248
249
250
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 248

def is_ignore_null
  @is_ignore_null
end

#load_optionString

Specifies which statements are loaded into the Sql tuning set. The possible values are. - INSERT (default) Adds only new statements. - UPDATE Updates existing the Sql statements and ignores any new statements. - MERGE Inserts new statements and updates the information of the existing ones.

Returns:

  • (String)


187
188
189
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 187

def load_option
  @load_option
end

#load_typeString

[Required] Specifies the loading method into the Sql tuning set.

Returns:

  • (String)


96
97
98
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 96

def load_type
  @load_type
end

#nameString

[Required] The name of the Sql tuning set.

Returns:

  • (String)


92
93
94
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 92

def name
  @name
end

#ownerString

The owner of the Sql tuning set.

Returns:

  • (String)


88
89
90
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 88

def owner
  @owner
end

#ranking_measure1String

Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures.

Returns:

  • (String)


122
123
124
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 122

def ranking_measure1
  @ranking_measure1
end

#ranking_measure2String

Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures.

Returns:

  • (String)


127
128
129
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 127

def ranking_measure2
  @ranking_measure2
end

#ranking_measure3String

Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures.

Returns:

  • (String)


132
133
134
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 132

def ranking_measure3
  @ranking_measure3
end

#recursive_sqlString

Specifies that the filter must include recursive Sql in the Sql tuning set.

Returns:

  • (String)


107
108
109
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 107

def recursive_sql
  @recursive_sql
end

#repeat_intervalInteger

Defines the amount of time, in seconds, to pause between sampling.

Returns:

  • (Integer)


140
141
142
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 140

def repeat_interval
  @repeat_interval
end

#result_limitInteger

The top limit Sql from the filtered source, ranked by the ranking measure.

Returns:

  • (Integer)


117
118
119
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 117

def result_limit
  @result_limit
end

#result_percentageFloat

Specifies a filter that picks the top n% according to the supplied ranking measure. Note that this parameter applies only if one ranking measure is supplied.

Returns:

  • (Float)


113
114
115
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 113

def result_percentage
  @result_percentage
end

#show_sql_onlyInteger

Flag to indicate whether to create the Sql tuning set or just display the plsql used to create Sql tuning set.

Returns:

  • (Integer)


84
85
86
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 84

def show_sql_only
  @show_sql_only
end

#total_time_limitInteger

Defines the total amount of time, in seconds, to execute.

Returns:

  • (Integer)


136
137
138
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 136

def total_time_limit
  @total_time_limit
end

#update_attributesString

Specifies the list of Sql statement attributes to update during a merge or update. Note that this parameter cannot be made an enum since custom value can take a list of comma separated attribute names. Update attributes can take one of the following values. NULL (default) - Specifies the content of the input cursor except the execution context. On other terms, it is equivalent to ALL without execution contexts such as module and action. BASIC - Specifies statistics and binds only. TYPICAL - Specifies BASIC with Sql plans (without row source statistics) and without an object reference list. ALL - Specifies all attributes, including the execution context attributes such as module and action. CUSTOM - List of comma separated attribute names to update EXECUTION_CONTEXT EXECUTION_STATISTICS SQL_BINDS SQL_PLAN SQL_PLAN_STATISTICS (similar to SQL_PLAN with added row source statistics) Usage examples: 1. "updateAttributes": "TYPICAL" 2. "updateAttributes": "BASIC" 3. "updateAttributes": "EXECUTION_STATISTICS,SQL_PLAN_STATISTICS,SQL_PLAN" 4. "updateAttributes": "EXECUTION_STATISTICS,SQL_PLAN"

Returns:

  • (String)


229
230
231
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 229

def update_attributes
  @update_attributes
end

#update_conditionString

Specifies when to perform the update. The procedure only performs the update when the specified condition is satisfied. The condition can refer to either the data source or destination. The condition must use the following prefixes to refer to attributes from the source or the destination: OLD u2014 Refers to statement attributes from the SQL tuning set (destination). NEW u2014 Refers to statement attributes from the input statements (source). NULL u2014 No updates are performed.

Returns:

  • (String)


240
241
242
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 240

def update_condition
  @update_condition
end

#update_optionString

Specifies how existing Sql statements are updated. This parameter is applicable only if load_option is specified with UPDATE or MERGE as an option. Update option can take one of the following values. REPLACE (default) - Updates the statement using the new statistics, bind list, object list, and so on. ACCUMULATE - Combines attributes when possible (for example, statistics such as elapsed_time), otherwise replaces the existing values (for example, module and action) with the provided values. Following Sql statement attributes can be accumulated. elapsed_time buffer_gets direct_writes disk_reads row_processed fetches executions end_of_fetch_count stat_period active_stat_period

Returns:

  • (String)


207
208
209
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 207

def update_option
  @update_option
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 275

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'credential_details': :'credentialDetails',
    'show_sql_only': :'showSqlOnly',
    'owner': :'owner',
    'name': :'name',
    'load_type': :'loadType',
    'basic_filter': :'basicFilter',
    'recursive_sql': :'recursiveSql',
    'result_percentage': :'resultPercentage',
    'result_limit': :'resultLimit',
    'ranking_measure1': :'rankingMeasure1',
    'ranking_measure2': :'rankingMeasure2',
    'ranking_measure3': :'rankingMeasure3',
    'total_time_limit': :'totalTimeLimit',
    'repeat_interval': :'repeatInterval',
    'capture_option': :'captureOption',
    'capture_mode': :'captureMode',
    'attribute_list': :'attributeList',
    'load_option': :'loadOption',
    'update_option': :'updateOption',
    'update_attributes': :'updateAttributes',
    'update_condition': :'updateCondition',
    'is_ignore_null': :'isIgnoreNull',
    'commit_rows': :'commitRows',
    'begin_snapshot': :'beginSnapshot',
    'end_snapshot': :'endSnapshot',
    'baseline_name': :'baselineName'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 309

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'credential_details': :'OCI::DatabaseManagement::Models::SqlTuningSetAdminCredentialDetails',
    'show_sql_only': :'Integer',
    'owner': :'String',
    'name': :'String',
    'load_type': :'String',
    'basic_filter': :'String',
    'recursive_sql': :'String',
    'result_percentage': :'Float',
    'result_limit': :'Integer',
    'ranking_measure1': :'String',
    'ranking_measure2': :'String',
    'ranking_measure3': :'String',
    'total_time_limit': :'Integer',
    'repeat_interval': :'Integer',
    'capture_option': :'String',
    'capture_mode': :'String',
    'attribute_list': :'String',
    'load_option': :'String',
    'update_option': :'String',
    'update_attributes': :'String',
    'update_condition': :'String',
    'is_ignore_null': :'BOOLEAN',
    'commit_rows': :'Integer',
    'begin_snapshot': :'Integer',
    'end_snapshot': :'Integer',
    'baseline_name': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 653

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    credential_details == other.credential_details &&
    show_sql_only == other.show_sql_only &&
    owner == other.owner &&
    name == other.name &&
    load_type == other.load_type &&
    basic_filter == other.basic_filter &&
    recursive_sql == other.recursive_sql &&
    result_percentage == other.result_percentage &&
    result_limit == other.result_limit &&
    ranking_measure1 == other.ranking_measure1 &&
    ranking_measure2 == other.ranking_measure2 &&
    ranking_measure3 == other.ranking_measure3 &&
    total_time_limit == other.total_time_limit &&
    repeat_interval == other.repeat_interval &&
    capture_option == other.capture_option &&
    capture_mode == other.capture_mode &&
    attribute_list == other.attribute_list &&
    load_option == other.load_option &&
    update_option == other.update_option &&
    update_attributes == other.update_attributes &&
    update_condition == other.update_condition &&
    is_ignore_null == other.is_ignore_null &&
    commit_rows == other.commit_rows &&
    begin_snapshot == other.begin_snapshot &&
    end_snapshot == other.end_snapshot &&
    baseline_name == other.baseline_name
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 708

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


688
689
690
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 688

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



697
698
699
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 697

def hash
  [credential_details, show_sql_only, owner, name, load_type, basic_filter, recursive_sql, result_percentage, result_limit, ranking_measure1, ranking_measure2, ranking_measure3, total_time_limit, repeat_interval, capture_option, capture_mode, attribute_list, load_option, update_option, update_attributes, update_condition, is_ignore_null, commit_rows, begin_snapshot, end_snapshot, baseline_name].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



741
742
743
744
745
746
747
748
749
750
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 741

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



735
736
737
# File 'lib/oci/database_management/models/load_sql_tuning_set_details.rb', line 735

def to_s
  to_hash.to_s
end