lib/dbi/base_classes/statement.rb in dbi-0.4.0 vs lib/dbi/base_classes/statement.rb in dbi-0.4.1
- old
+ new
@@ -6,10 +6,13 @@
#
# As with the other `Base` classes, the terms "DBD Required" and "DBD
# Optional" are defined in DBI::BaseDatabase.
#
class BaseStatement < Base
+
+ attr_accessor :raise_error
+
def initialize(attr=nil)
@attr = attr || {}
end
#
@@ -152,9 +155,10 @@
#
# Get statement attributes.
#
def [](attr)
+ @attr ||= { }
@attr[attr]
end
#
# Set statement attributes. DBD Optional.