Class: DuckDB::ExtractedStatements

Inherits:
ExtractedStatementsImpl show all
Includes:
Enumerable
Defined in:
lib/duckdb/extracted_statements.rb

Instance Method Summary collapse

Methods inherited from ExtractedStatementsImpl

#destroy, #prepared_statement, #size

Constructor Details

#initialize(con, sql) ⇒ ExtractedStatements

Returns a new instance of ExtractedStatements.



7
8
9
10
# File 'lib/duckdb/extracted_statements.rb', line 7

def initialize(con, sql)
  @con = con
  super(con, sql)
end

Instance Method Details

#eachObject



12
13
14
15
16
17
18
# File 'lib/duckdb/extracted_statements.rb', line 12

def each
  return to_enum(__method__) { size } unless block_given?

  size.times do |i|
    yield prepared_statement(@con, i)
  end
end