Class: ADBC::Connection

Inherits:
Object
  • Object
show all
Includes:
ConnectionOperations
Defined in:
lib/adbc/connection.rb

Instance Method Summary collapse

Methods included from ConnectionOperations

#info, #ingest, #query

Instance Method Details

#get_info(codes) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/adbc/connection.rb', line 29

def get_info(codes)
  c_abi_array_stream = get_info_raw(codes)
  begin
    reader = Arrow::RecordBatchReader.import(c_abi_array_stream)
    begin
      yield(reader.read_all)
    ensure
      reader.unref
    end
  ensure
    GLib.free(c_abi_array_stream)
  end
end

#get_info_rawObject



28
# File 'lib/adbc/connection.rb', line 28

alias_method :get_info_raw, :get_info

#open_statement(&block) ⇒ Object



24
25
26
# File 'lib/adbc/connection.rb', line 24

def open_statement(&block)
  Statement.open(self, &block)
end