浏览代码

expose qry and action types

pull/2/head
istr 12 年前
父节点
当前提交
7b59be96ad
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. +5
    -2
      src/glc.erl

+ 5
- 2
src/glc.erl 查看文件

@ -91,6 +91,11 @@
qtree :: term() qtree :: term()
}). }).
-export_type([qry/0, action/0]).
-type qry() :: {atom(), '*'|false|true|[any(),...]} | {atom(), '<'|'='|'>', _}.
-type action() :: fun((gre:event()) -> any()).
-spec lt(atom(), term()) -> glc_ops:op(). -spec lt(atom(), term()) -> glc_ops:op().
lt(Key, Term) -> lt(Key, Term) ->
glc_ops:lt(Key, Term). glc_ops:lt(Key, Term).
@ -140,8 +145,6 @@ null(Result) ->
%% Updating the output action of a query finalizes it. Attempting %% Updating the output action of a query finalizes it. Attempting
%% to use a finalized query to construct a new query will result %% to use a finalized query to construct a new query will result
%% in a `badarg' error. %% in a `badarg' error.
-type qry() :: {atom(), '*'|false|true|[any(),...]} | {atom(), '<'|'='|'>', _}.
-type action() :: fun((gre:event()) -> any()).
-spec with(Query::qry(), Action::action()) -> {with, Query::qry(), Action::action()}. -spec with(Query::qry(), Action::action()) -> {with, Query::qry(), Action::action()}.
with(Query, Action) -> with(Query, Action) ->
glc_ops:with(Query, Action). glc_ops:with(Query, Action).

正在加载...
取消
保存