Class: Sqlx::Database::Stmt

Inherits:
Object show all
Defined in:
runtime/database/sqlite.rb

Overview

One cache entry: the composed SQL and its prepared stmt ptr. A concrete class rather than a bare ptr, so an Array of them types concretely and length/[] resolve.

Instance Method Summary collapse

Constructor Details

#initialize(sql, ptr) ⇒ Stmt

Returns a new instance of Stmt.



155
156
157
158
# File 'runtime/database/sqlite.rb', line 155

def initialize(sql, ptr)
  @sql = sql
  @ptr = ptr
end

Instance Method Details

#ptr ⇒ Object



164
165
166
# File 'runtime/database/sqlite.rb', line 164

def ptr
  @ptr
end

#sql ⇒ Object



160
161
162
# File 'runtime/database/sqlite.rb', line 160

def sql
  @sql
end