lib/dbd/pg/statement.rb in dbd-pg-0.3.8 vs lib/dbd/pg/statement.rb in dbd-pg-0.3.9

- old
+ new

@@ -12,11 +12,11 @@ def initialize(db, sql) super(db) @db = db @sql = sql - @stmt_name = PG_STMT_NAME_PREFIX + self.object_id.to_s + @stmt_name = PG_STMT_NAME_PREFIX + self.object_id.to_s + Time.now.to_f.to_s @result = nil @bindvars = [] @prepared = false rescue PGError => err raise DBI::ProgrammingError.new(err.message) @@ -31,21 +31,21 @@ # # This method will make use of PostgreSQL's native BLOB support if # DBI::Binary objects are passed in. # def execute - # replace DBI::Binary object by oid returned by lo_import + # replace DBI::Binary object by oid returned by lo_import @bindvars.collect! do |var| if var.is_a? DBI::Binary then oid = @db.__blob_create(PGconn::INV_WRITE) @db.__blob_write(oid, var.to_s) - oid + oid else var end end - + internal_prepare if not @db['AutoCommit'] then # if not SQL.query?(boundsql) and not @db['AutoCommit'] then @db.start_transaction unless @db.in_transaction? @@ -91,11 +91,11 @@ end end # # Attributes: - # + # # If +pg_row_count+ is requested and the statement has already executed, # postgres will return what it believes is the row count. # def [](attr) case attr @@ -108,10 +108,10 @@ else @attr[attr] end end - private + private # # A native binding helper. # class DummyQuoter