Sha256: e410ea19112d5eb5d9e7e4bbe72b1f7c4e017b7b635af87de38168766aa4084c
Contents?: true
Size: 848 Bytes
Versions: 20
Compression:
Stored size: 848 Bytes
Contents
module Blazer module Adapters class DrillAdapter < BaseAdapter def run_statement(statement, comment) columns = [] rows = [] error = nil begin # remove trailing semicolon response = drill.query(statement.sub(/;\s*\z/, "")) rows = response.map { |r| r.values } columns = rows.any? ? response.first.keys : [] rescue => e error = e.message end [columns, rows, error] end # https://drill.apache.org/docs/lexical-structure/#string def quoting :single_quote_escape end # https://issues.apache.org/jira/browse/DRILL-5079 def parameter_binding # not supported end private def drill @drill ||= ::Drill.new(url: settings["url"]) end end end end
Version data entries
20 entries across 20 versions & 3 rubygems