Class: RubySnowflake::Client::SingleThreadInMemoryStrategy
- Inherits:
-
Object
- Object
- RubySnowflake::Client::SingleThreadInMemoryStrategy
- Defined in:
- lib/ruby_snowflake/client/single_thread_in_memory_strategy.rb
Class Method Summary collapse
Class Method Details
.result(statement_json_body, retreive_proc) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/ruby_snowflake/client/single_thread_in_memory_strategy.rb', line 6 def self.result(statement_json_body, retreive_proc) partitions = statement_json_body["resultSetMetaData"]["partitionInfo"] result = Result.new(partitions.size, statement_json_body["resultSetMetaData"]["rowType"]) result[0] = statement_json_body["data"] partitions.each_with_index do |partition, index| next if index == 0 # already have the first partition result[index] = retreive_proc.call(index) end result end |