anchor.diff:  %%% Created : 24 Dec 2014 by homeway <homeway.xue@gmail.com>
   %%%-------------------------------------------------------------------
   -module(ss_nosqlite).
  --export([init/1, create/2, create/3, update/3, patch/3, get/2, delete/2, search/3]).
  +-export([init/1, from_model/1, to_model/1, create/2, update/2, patch/2, get/2, delete/2, search/3]).
   -export([all/1]).
   
   %% 表初始化
   init(Table) ->
  -    Filename = io_lib:format("data/~s.dets", [pp:to_binary(Table)]),
  +    Filename = io_lib:format("data/~s.dets", [ss:to_binary(Table)]),
       filelib:ensure_dir(Filename),
       dets:open_file(Table, [{type, set}, {file, Filename}, {repair, true}]).
   close(Table) ->
  
positive.code: %% 创建数据，返回{ok, Id}
  %% Data应为maps类型
  %% 自动插入创建和最后修改时间时间戳, 使用ISO标准格式
  create(Table, Data) when is_map(Data) ->
      {_, S, M} = now(),
      Id = pp:to_binary(io_lib:format("~B-~6..0B", [S, M])),
      ok = create(Table, Id, Data),
      {ok, Id}.
  create(Table, Id, Data1) when is_map(Data1) ->
      init(Table),
      Time = pp_time:now_to_iso(),
      Data = Data1#{<<"_created_at">> => Time, <<"_lastmodified_at">> => Time},
      dets:insert(Table, {Id, Data}),
      close(Table).
  
  %% 查看
  %% 直接返回所查到的maps类型，方便函数级联操作
  
negative.code: %% -*- mode:nitrogen -*-
  %%%-------------------------------------------------------------------
  %%% @author homeway <homeway.xue@gmail.com>
  %%% @copyright (C) 2014, homeway
  