The host name. Note, this relies on the host name being configured and resolvable using DNS
Instantiate the Transaction subclass that’s appropriate for this uri scheme
# File lib/data_objects/transaction.rb, line 19 def self.create_for_uri(uri) uri = uri.is_a?(String) ? URI::parse(uri) : uri DataObjects.const_get(uri.scheme.capitalize)::Transaction.new(uri) end
Creates a Transaction bound to a connection for the given DataObjects::URI
# File lib/data_objects/transaction.rb, line 27 def initialize(uri, connection = nil) @connection = connection || DataObjects::Connection.new(uri) # PostgreSQL can't handle the full 64 bytes. This should be enough for everyone. @id = Digest::SHA256.hexdigest("#{HOST}:#{$$}:#{Time.now.to_f}:#{@@counter += 1}")[0..-2] end
# File lib/data_objects/transaction.rb, line 38 def begin run "BEGIN" end
# File lib/data_objects/transaction.rb, line 51 def begin_prepared; not_implemented; end
Close the connection for this Transaction
# File lib/data_objects/transaction.rb, line 34 def close @connection.close end
# File lib/data_objects/transaction.rb, line 42 def commit run "COMMIT" end
# File lib/data_objects/transaction.rb, line 52 def commit_prepared; not_implemented; end
# File lib/data_objects/transaction.rb, line 50 def prepare; not_implemented; end
Generated with the Darkfish Rdoc Generator 2.