pg_json 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/pg_json +4 -2
  2. metadata +1 -1
data/bin/pg_json CHANGED
@@ -84,10 +84,12 @@ simple :date do
84
84
  "'{\"__type__\":\"date\",\"value\":\"'||to_char(data, 'YYYY-MM-DD')::text||'\"}'"
85
85
  end
86
86
  simple :time do
87
- "'\"'||to_char(data, 'HH24:MI:SS')::text||'\"'"
87
+ # "'\"'||to_char(data, 'HH24:MI:SS')::text||'\"'"
88
+ "'{\"__type__\":\"time\",\"value\":\"'||to_char(data, 'HH24:MI:SS')::text||'\"}'"
88
89
  end
89
90
  simple :timestamp do
90
- "extract(epoch from data)::integer::text"
91
+ # "extract(epoch from data)::integer::text"
92
+ "'{\"__type__\":\"timestamp\",\"value\":\"'||extract(epoch from data)::integer::text||'\"}'"
91
93
  end
92
94
 
93
95
  while composite = ARGV.slice!(0)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: