Module: Arango::Database::AQLQueries
- Included in:
- Arango::Database
- Defined in:
- lib/arango/database/aql_queries.rb
Overview
Arango Database AQLQueries
Instance Method Summary collapse
- #batch_execute_aql(query:, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
- #batch_execute_query(query, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
- #clear_slow_queries_list ⇒ Object
- #execute_aql(query:, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
- #execute_query(query, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
- #kill_query(aql_id) ⇒ Object
- #new_aql(query:, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
- #new_query(query, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
- #query_tracking_properties ⇒ Object
- #running_queries ⇒ Object
- #set_query_tracking_properties(props) ⇒ Object
- #slow_queries ⇒ Object
Instance Method Details
#batch_execute_aql(query:, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/arango/database/aql_queries.rb', line 56 def batch_execute_aql(query:, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) aql = Arango::AQL.new(database: self, query: query, batch_size: batch_size, bind_vars: bind_vars, cache: cache, count: count, fail_on_warning: fail_on_warning, full_count: full_count, intermediate_commit_count: intermediate_commit_count, intermediate_commit_size: intermediate_commit_size, max_plans: max_plans, max_transaction_size: max_transaction_size, max_warning_count: max_warning_count, memory_limit: memory_limit, optimizer_rules: optimizer_rules, profile: profile, satellite_sync_wait: satellite_sync_wait, skip_inaccessible_collections: skip_inaccessible_collections, ttl: ttl, block: block, &ruby_block) aql.batch_execute end |
#batch_execute_query(query, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/arango/database/aql_queries.rb', line 69 def batch_execute_query(query, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) aql = Arango::AQL.new(database: self, query: query, batch_size: batch_size, bind_vars: bind_vars, cache: cache, count: count, fail_on_warning: fail_on_warning, full_count: full_count, intermediate_commit_count: intermediate_commit_count, intermediate_commit_size: intermediate_commit_size, max_plans: max_plans, max_transaction_size: max_transaction_size, max_warning_count: max_warning_count, memory_limit: memory_limit, optimizer_rules: optimizer_rules, profile: profile, satellite_sync_wait: satellite_sync_wait, skip_inaccessible_collections: skip_inaccessible_collections, ttl: ttl, block: block, &ruby_block) aql.batch_execute end |
#clear_slow_queries_list ⇒ Object
102 103 104 105 |
# File 'lib/arango/database/aql_queries.rb', line 102 def clear_slow_queries_list result = Arango::Requests::AQL::DeleteSlowQueryList.execute(server: @server) true end |
#execute_aql(query:, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/arango/database/aql_queries.rb', line 30 def execute_aql(query:, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) aql = Arango::AQL.new(database: self, query: query, batch_size: batch_size, bind_vars: bind_vars, cache: cache, count: count, fail_on_warning: fail_on_warning, full_count: full_count, intermediate_commit_count: intermediate_commit_count, intermediate_commit_size: intermediate_commit_size, max_plans: max_plans, max_transaction_size: max_transaction_size, max_warning_count: max_warning_count, memory_limit: memory_limit, optimizer_rules: optimizer_rules, profile: profile, satellite_sync_wait: satellite_sync_wait, skip_inaccessible_collections: skip_inaccessible_collections, ttl: ttl, block: block, &ruby_block) aql.execute end |
#execute_query(query, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/arango/database/aql_queries.rb', line 43 def execute_query(query, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) aql = Arango::AQL.new(database: self, query: query, batch_size: batch_size, bind_vars: bind_vars, cache: cache, count: count, fail_on_warning: fail_on_warning, full_count: full_count, intermediate_commit_count: intermediate_commit_count, intermediate_commit_size: intermediate_commit_size, max_plans: max_plans, max_transaction_size: max_transaction_size, max_warning_count: max_warning_count, memory_limit: memory_limit, optimizer_rules: optimizer_rules, profile: profile, satellite_sync_wait: satellite_sync_wait, skip_inaccessible_collections: skip_inaccessible_collections, ttl: ttl, block: block, &ruby_block) aql.execute end |
#kill_query(aql_id) ⇒ Object
107 108 109 110 111 112 113 |
# File 'lib/arango/database/aql_queries.rb', line 107 def kill_query(aql_id) id = if id.class == String then id elsif id.class == Arango::AQL then id.id end result = Arango::Requests::AQL::KillQuery.execute(server: @server, args: {id: id}) true end |
#new_aql(query:, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/arango/database/aql_queries.rb', line 6 def new_aql(query:, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) Arango::AQL.new(database: self, query: query, batch_size: batch_size, bind_vars: bind_vars, cache: cache, count: count, fail_on_warning: fail_on_warning, full_count: full_count, intermediate_commit_count: intermediate_commit_count, intermediate_commit_size: intermediate_commit_size, max_plans: max_plans, max_transaction_size: max_transaction_size, max_warning_count: max_warning_count, memory_limit: memory_limit, optimizer_rules: optimizer_rules, profile: profile, satellite_sync_wait: satellite_sync_wait, skip_inaccessible_collections: skip_inaccessible_collections, ttl: ttl, block: block, &ruby_block) end |
#new_query(query, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/arango/database/aql_queries.rb', line 18 def new_query(query, batch_size: nil, bind_vars: nil, cache: nil, count: nil, fail_on_warning: nil, full_count: nil, intermediate_commit_count: nil, intermediate_commit_size: nil, max_plans: nil, max_transaction_size: nil, max_warning_count: nil, memory_limit: nil, optimizer_rules: nil, profile: nil, satellite_sync_wait: nil, skip_inaccessible_collections: nil, ttl: nil, block: nil, &ruby_block) Arango::AQL.new(database: self, query: query, batch_size: batch_size, bind_vars: bind_vars, cache: cache, count: count, fail_on_warning: fail_on_warning, full_count: full_count, intermediate_commit_count: intermediate_commit_count, intermediate_commit_size: intermediate_commit_size, max_plans: max_plans, max_transaction_size: max_transaction_size, max_warning_count: max_warning_count, memory_limit: memory_limit, optimizer_rules: optimizer_rules, profile: profile, satellite_sync_wait: satellite_sync_wait, skip_inaccessible_collections: skip_inaccessible_collections, ttl: ttl, block: block, &ruby_block) end |
#query_tracking_properties ⇒ Object
82 83 84 |
# File 'lib/arango/database/aql_queries.rb', line 82 def query_tracking_properties Arango::Requests::AQL::GetQueryTrackingProperties.execute(server: @server) end |
#running_queries ⇒ Object
92 93 94 95 |
# File 'lib/arango/database/aql_queries.rb', line 92 def running_queries result = Arango::Requests::AQL::CurrentQueries.execute(server: @server) result.map { |query_hash| Arango::AQL.from_result(query_hash) } end |
#set_query_tracking_properties(props) ⇒ Object
86 87 88 89 90 |
# File 'lib/arango/database/aql_queries.rb', line 86 def set_query_tracking_properties(props) body = props.to_h body.transform_keys! { |k| k.to_s.camelize(:lower).to_sym } Arango::Requests::AQL::SetQueryTrackingProperties.execute(server: @server, body: props.to_h) end |