/usr/lib/ruby/vendor_ruby/sequel/adapters/do/postgres.rb is in ruby-sequel 4.15.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | Sequel::DataObjects.load_driver 'do_postgres'
Sequel.require 'adapters/shared/postgres'
module Sequel
Postgres::CONVERTED_EXCEPTIONS << ::DataObjects::Error
module DataObjects
Sequel.synchronize do
DATABASE_SETUP[:postgres] = proc do |db|
db.extend(Sequel::DataObjects::Postgres::DatabaseMethods)
db.extend_datasets Sequel::Postgres::DatasetMethods
end
end
# Adapter, Database, and Dataset support for accessing a PostgreSQL
# database via DataObjects.
module Postgres
# Methods to add to Database instances that access PostgreSQL via
# DataObjects.
module DatabaseMethods
extend Sequel::Database::ResetIdentifierMangling
include Sequel::Postgres::DatabaseMethods
# Add the primary_keys and primary_key_sequences instance variables,
# so we can get the correct return values for inserted rows.
def self.extended(db)
super
db.send(:initialize_postgres_adapter)
end
private
# Extend the adapter with the DataObjects PostgreSQL AdapterMethods
def setup_connection(conn)
conn = super(conn)
connection_configuration_sqls.each{|sql| log_yield(sql){conn.create_command(sql).execute_non_query}}
conn
end
end
end
end
end
|