Browse Source

Merge pull request #70 from KrzysiekJ/hstore-type

Add hstore type information
David N. Welton 9 years ago
parent
commit
2b65c05256
2 changed files with 2 additions and 1 deletions
  1. 1 0
      README.md
  2. 1 1
      src/epgsql.erl

+ 1 - 0
README.md

@@ -382,6 +382,7 @@ PG type       | Representation
   record      | `{int2, time, text, ...}` (decode only)
   record      | `{int2, time, text, ...}` (decode only)
   point       |  `{10.2, 100.12}`
   point       |  `{10.2, 100.12}`
   int4range   | `[1,5)`
   int4range   | `[1,5)`
+  hstore      | `{list({binary(), binary() | null})}`
 
 
   `timestamp` and `timestamptz` parameters can take `erlang:now()` format: `{MegaSeconds, Seconds, MicroSeconds}`
   `timestamp` and `timestamptz` parameters can take `erlang:now()` format: `{MegaSeconds, Seconds, MicroSeconds}`
 
 

+ 1 - 1
src/epgsql.erl

@@ -51,6 +51,7 @@
         | calendar:time()                       %actualy, `Seconds' may be float()
         | calendar:time()                       %actualy, `Seconds' may be float()
         | calendar:datetime()
         | calendar:datetime()
         | {calendar:time(), Days::non_neg_integer(), Months::non_neg_integer()}
         | {calendar:time(), Days::non_neg_integer(), Months::non_neg_integer()}
+        | {list({binary(), binary() | null})}   % hstore
         | [bind_param()].                       %array (maybe nested)
         | [bind_param()].                       %array (maybe nested)
 
 
 -type squery_row() :: {binary()}.
 -type squery_row() :: {binary()}.
@@ -241,4 +242,3 @@ sync_on_error(C, Error = {error, _}) ->
 
 
 sync_on_error(_C, R) ->
 sync_on_error(_C, R) ->
     R.
     R.
-