Browse Source

add daterange, tsrange, tstzrange documentation

eryx67 6 years ago
parent
commit
6535cc5c8c
1 changed files with 6 additions and 1 deletions
  1. 6 1
      README.md

+ 6 - 1
README.md

@@ -425,7 +425,9 @@ PG type       | Representation
   cidr        | `{ip_address(), Mask :: 0..32}`
   macaddr(8)  | tuple of 6 or 8 `byte()`
   geometry    | `ewkb:geometry()`
-
+  tsrange     | `{{Hour, Minute, Second.Microsecond}, {Hour, Minute, Second.Microsecond}}`
+  tstzrange   | `{{Hour, Minute, Second.Microsecond}, {Hour, Minute, Second.Microsecond}}`
+  daterange   | `{{Year, Month, Day}, {Year, Month, Day}}`
 
   `timestamp` and `timestamptz` parameters can take `erlang:now()` format: `{MegaSeconds, Seconds, MicroSeconds}`
 
@@ -433,6 +435,9 @@ PG type       | Representation
   bracket and parentheses respectively. Additionally, infinities are represented by the atoms `minus_infinity`
   and `plus_infinity`
 
+  `tsrange`, `tstzrange`, `daterange` are range types for `timestamp`, `timestamptz` and `date`
+  respectively. They can return `empty` atom as the result from a database if bounds are equal
+
 ## Errors
 
 Errors originating from the PostgreSQL backend are returned as `{error, #error{}}`,