rails/activerecord/lib/arel/errors.rb
Matthew Draper f71fc8312b Disallow Arel.sql with mixed named and positional binds
This should be a much closer match to the existing AR sanitize_sql
behaviour.
2023-01-29 08:40:30 +10:30

20 lines
331 B
Ruby

# frozen_string_literal: true
module Arel # :nodoc: all
class ArelError < StandardError
end
class EmptyJoinError < ArelError
end
class BindError < ArelError
def initialize(message, sql = nil)
if sql
super("#{message} in: #{sql.inspect}")
else
super(message)
end
end
end
end