pg_json 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/pg_json/sequel/pg_json.rb +8 -0
  2. metadata +2 -2
@@ -72,6 +72,14 @@ end
72
72
  module Sequel
73
73
  module Postgres
74
74
  class Dataset
75
+ def json_array
76
+ self.all.map do |r|
77
+ JSON.parse(r[:to_json]).tap do |h|
78
+ h.recursively_symbolize_keys!
79
+ h.json_typify!
80
+ end
81
+ end
82
+ end
75
83
  def json
76
84
  if self.first
77
85
  JSON.parse(self.first[:to_json]).tap do |h|
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.15
4
+ version: 0.1.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-17 00:00:00.000000000 Z
12
+ date: 2012-04-19 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: bring basic json support to postgresql
15
15
  email: jan.zimmek@web.de