# File lib/sdb/active_sdb.rb, line 284 def find_with_metadata(*args) options = args.last.is_a?(Hash) ? args.pop : {} case args.first when nil then raise "Invalid parameters passed to find: nil." when :all then sql_select(options) when :first then sql_select(options.merge(:limit => 1)) when :count then res = sql_select(options.merge(:count => true)) res else select_from_ids args, options end end