# File lib/aws/record/scope.rb, line 92 def find id_or_mode, options = {} scope = _handle_options(options) case when id_or_mode == :all then scope when id_or_mode == :first then scope.limit(1).first when scope.send(:_empty?) then base_class[id_or_mode] else object = scope.where('itemName() = ?', id_or_mode).limit(1).first if object.nil? raise RecordNotFound, "no data found for record `#{id_or_mode}`" end object end end