Class: Sqlx::Database::PgStmt
Overview
One SELECT's execution state. NOT executed at prepare: pending stays true
until first use, so a bind_* that follows prepare still lands in the SQL sent
to the server. Each prepare yields a FRESH object, so two interleaved readers
of the same SQL never alias (the sqlite sibling's stmt cache hands both the
same handle).
Instance Attribute Summary collapse
-
#dead ⇒ Object
Returns the value of attribute dead.
-
#ncols ⇒ Object
Returns the value of attribute ncols.
-
#params ⇒ Object
Returns the value of attribute params.
-
#pending ⇒ Object
Returns the value of attribute pending.
-
#res ⇒ Object
Returns the value of attribute res.
-
#row ⇒ Object
Returns the value of attribute row.
-
#sql ⇒ Object
Returns the value of attribute sql.
Instance Method Summary collapse
-
#initialize(sql) ⇒ PgStmt
constructor
A new instance of PgStmt.
Constructor Details
#initialize(sql) ⇒ PgStmt
Returns a new instance of PgStmt.
96 97 98 99 100 101 102 103 104 |
# File 'runtime/database/postgresql.rb', line 96 def initialize(sql) @sql = sql @params = [] @res = nil @row = -1 @pending = true @dead = false @ncols = 0 end |
Instance Attribute Details
#dead ⇒ Object
Returns the value of attribute dead.
94 95 96 |
# File 'runtime/database/postgresql.rb', line 94 def dead @dead end |
#ncols ⇒ Object
Returns the value of attribute ncols.
94 95 96 |
# File 'runtime/database/postgresql.rb', line 94 def ncols @ncols end |
#params ⇒ Object
Returns the value of attribute params.
94 95 96 |
# File 'runtime/database/postgresql.rb', line 94 def params @params end |
#pending ⇒ Object
Returns the value of attribute pending.
94 95 96 |
# File 'runtime/database/postgresql.rb', line 94 def pending @pending end |
#res ⇒ Object
Returns the value of attribute res.
94 95 96 |
# File 'runtime/database/postgresql.rb', line 94 def res @res end |
#row ⇒ Object
Returns the value of attribute row.
94 95 96 |
# File 'runtime/database/postgresql.rb', line 94 def row @row end |
#sql ⇒ Object
Returns the value of attribute sql.
94 95 96 |
# File 'runtime/database/postgresql.rb', line 94 def sql @sql end |