herd.hrl 700 B

12345678910111213141516
  1. -type(timestamp() :: integer()).
  2. -type(timestamp_micro() :: float()).
  3. %% jiffy json format
  4. -type(json_key() :: atom() | binary()).
  5. -type(json_value() :: atom() | integer() | float() | binary() | json_obj() | [json_value()]).
  6. -type(json_obj() :: {[{json_key(), json_value()}]}).
  7. %% db types (PostgreSQL with epgsql driver)
  8. -type(db_name() :: binary()).
  9. -type(db_type() :: atom()).
  10. -type(db_value() :: term()).
  11. -type(db_row() :: tuple()).
  12. -type(db_column() :: {column, db_name(), db_type(), term(), term(), term()}).
  13. -type(db_select() :: {ok, [db_column()], [db_row()]}).
  14. -type(db_datetime() :: {calendar:date(), {0..23, 0..59, float()}}). % PostgreSQL datetime format: 2014-12-20 17:38:56.475565+03