lib/sequel/adapters/tinytds.rb in sequel-4.47.0 vs lib/sequel/adapters/tinytds.rb in sequel-4.48.0
- old
+ new
@@ -186,27 +186,22 @@
include Sequel::MSSQL::DatasetMethods
Database::DatasetClass = self
Sequel::Deprecation.deprecate_constant(Database, :DatasetClass)
- # SQLite already supports named bind arguments, so use directly.
module ArgumentMapper
include Sequel::Dataset::ArgumentMapper
protected
- # Return a hash with the same values as the given hash,
- # but with the keys converted to strings.
def map_to_prepared_args(hash)
args = {}
hash.each{|k,v| args[k.to_s.gsub('.', '__')] = v}
args
end
private
- # SQLite uses a : before the name of the argument for named
- # arguments.
def prepared_arg(k)
LiteralString.new("@#{k.to_s.gsub('.', '__')}")
end
# Always assume a prepared argument.