boss_db
boss_db copied to clipboard
add boss_db:paginate for mnesia
here, the patch for boss_db:paginate for mnesia from original idea of David Welton
i changed a bit the signature of paginate, i saw some javascript framework using the total number of item and row per page to render their own pagination view, then don t need to call twice boss_db:count/2.
Thanks Chan. My schedule is a little rough right now to be merging things, but I will be merging this soonish, certainly for 0.9.0.
you code produces errors
Compiling src/db_adapters/boss_db_adapter_mnesia.erl failed:
src/db_adapters/boss_db_adapter_mnesia.erl:47: syntax error before: 'when'
src/db_adapters/boss_db_adapter_mnesia.erl:3: function find/2 undefined
src/db_adapters/boss_db_adapter_mnesia.erl:7: function paginate/4 undefined
src/db_adapters/boss_db_adapter_mnesia.erl:252: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.
src/db_adapters/boss_db_adapter_mnesia.erl:309: Warning: function limit/4 is unused
src/db_adapters/boss_db_adapter_mnesia.erl:322: Warning: function seek/3 is unused
src/db_adapters/boss_db_adapter_mnesia.erl:337: Warning: function read/3 is unused
ERROR: compile failed while processing /home/travis/build/danikp/boss_db: rebar_abort
make: *** [compile] Error 1