def keys (options={})

      if @db.respond_to? :fwmkeys
        pref = options.fetch(:prefix, "")

        @db.fwmkeys(pref, options[:limit] || -1)
      elsif @db.respond_to? :range
        @db.range("[min,max]", nil)
      else
        raise NotImplementedError, "Database does not support keys()"
      end
    end
def keys (options={})

      if @db.respond_to? :fwmkeys
        pref = options.fetch(:prefix, "")

        @db.fwmkeys(pref, options[:limit] || -1)
      elsif @db.respond_to? :range
        @db.range("[min,max]", nil)
      else
        raise NotImplementedError, "Database does not support keys()"
      end
    end
Returns an array of all the primary keys in the db.

 With no options given, this method will return all the keys (strings)
 in a Ruby array.

   :prefix --> returns only the keys who match a given string prefix

   :limit --> returns a limited number of keys