def first(options = {})
      opts = options.dup
      opts.merge!(:limit => [0, 1])

      if opts[:by]
        sort_by(opts.delete(:by), opts).first
      else
        sort(opts).first
      end
    end
def first(options = {})
      opts = options.dup
      opts.merge!(:limit => [0, 1])

      if opts[:by]
        sort_by(opts.delete(:by), opts).first
      else
        sort(opts).first
      end
    end
Returns the first record of the set. Internally uses `sort` or
 `sort_by` if a `:by` option is given. Accepts all options supported
 by `sort`.

   class User < Ohm::Model
     attribute :name
   end

   User.create(name: "alice")
   User.create(name: "bob")
   User.create(name: "eve")

   User.all.first.name # => "alice"
   User.all.first(by: :name).name # => "alice"

   User.all.first(order: "ASC")  # => "alice"
   User.all.first(order: "DESC") # => "eve"

 You can use the `:order` option to bring the last record:

   User.all.first(order: "DESC").name             # => "eve"
   User.all.first(by: :name, order: "ALPHA DESC") # => "eve"