/usr/lib/ruby/vendor_ruby/sequel/adapters/swift/sqlite.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 | require 'swift/db/sqlite3'
Sequel.require 'adapters/shared/sqlite'
module Sequel
module Swift
# Database and Dataset instance methods for SQLite specific
# support via Swift.
module SQLite
# Database instance methods for SQLite databases accessed via Swift.
module DatabaseMethods
extend Sequel::Database::ResetIdentifierMangling
include Sequel::SQLite::DatabaseMethods
# Set the correct pragmas on the connection.
def connect(opts)
c = super
connection_pragmas.each{|s| log_yield(s){c.execute(s)}}
c
end
end
# Dataset class for SQLite datasets accessed via Swift.
class Dataset < Swift::Dataset
include Sequel::SQLite::DatasetMethods
private
# Use Swift's escape method for quoting.
def literal_string_append(sql, s)
sql << APOS << db.synchronize(@opts[:server]){|c| c.escape(s)} << APOS
end
end
end
end
end
|