Skip to content
Commits on Sep 20, 2012
  1. @kevinmontuori
Commits on Sep 19, 2012
  1. @kevinmontuori
Commits on Sep 17, 2012
  1. @kevinmontuori
Commits on Aug 9, 2012
  1. @evanmiller
Commits on Jul 22, 2012
  1. @evanmiller

    Revamp the boss_db:find/N API

    evanmiller committed
    This change eliminates boss_db:find/4-6 in favor of specifying search
    options in a proplist as the third argument to boss_db:find/3. Valid
    options are:
      'limit' - max # of records to return
      'offset' - # of records to skip
      'order_by' - attribute to sort on
      'descending' - whether values should go from high to low
    The new API is easier to remember and the options have been modeled
    after their SQL equivalents. Note that since 'descending' takes a
    boolean it can be specified as a bare word, e.g.
      boss_db:find(house, [], [{order_by, price}, descending])
    This change also eliminates the need to specify whether values
    should be treated as numbers or strings when sorting. Instead
    this information is inferred from the model's type hints. But
    only the Tyrant adapter allows specifying the sort logic so most
    users won't need the type hints anyway.
    Finally, a BossRecord's -has options have been modified to be
    consistent with the new boss_db:find options. 'sort_by' has
    been renamed 'order_by', and 'sort_order' has been replaced
    with 'descending'. E.g.
      -has({rooms, many, [{order_by, size}, descending]).
Commits on Feb 4, 2012
  1. BossDB is now its own project

    Evan Miller committed
Something went wrong with that request. Please try again.