Class: ClickHouse::Response::Factory
- Inherits:
-
Object
- Object
- ClickHouse::Response::Factory
- Defined in:
- lib/click_house/response/factory.rb
Class Method Summary collapse
Class Method Details
.[](faraday) ⇒ String, ResultSet
8 9 10 11 12 13 14 |
# File 'lib/click_house/response/factory.rb', line 8 def self.[](faraday) body = faraday.body return body if !body.is_a?(Hash) || !(body.key?('meta') && body.key?('data')) ResultSet.new(meta: body.fetch('meta'), data: body.fetch('data'), statistics: body['statistics']) end |