forest_liana 1.6.17 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3af7548b5ab0b459b0ee602c39b2816a86bbfc7a
4
- data.tar.gz: 99a284d5170879dbba02bdead5eadfae178ee127
3
+ metadata.gz: a9c4175130715d2b94ce035c8c1444c11a8fc16d
4
+ data.tar.gz: 42c1c042c4ba295b62315922d09e7e7bd8aa17c0
5
5
  SHA512:
6
- metadata.gz: 4f82f6c9bfce7ef74c3d693b04b5864deae6d0e147d9a7cec37978f3cc141ce21e66b413da5208d408c53a2dcaec4e04cd1f0baf95bca84c7d4dd4f7be545a14
7
- data.tar.gz: 590fd61a4eee69af5d80410932469db157769d888df45af0b3c741b91b3c3e06c029461ae7d913c1ba774afa4441c7d67de845ee1a7c0b1beb4064d472541465
6
+ metadata.gz: 88aaba58eab164c9d661f5e6c5c9631b79a2b33655aa546d3b1a3a674fb86bfa1f86b741ef67641832e47408dd76de611d2ad2aac721716d839f9971b2923c48
7
+ data.tar.gz: 573f9b64e52bf2497524c2c7de6a306d9ba4a050b3213103c333fad8703600d7013bbb4eff500d273ab704083ee2c67917f8cba2982ecafbd6fc2e658f582882
@@ -33,16 +33,16 @@ module ForestLiana
33
33
  @jwt_decoded_token
34
34
  end
35
35
 
36
- def serialize_model(model, options = {})
36
+ def serialize_model(record, options = {})
37
37
  options[:is_collection] = false
38
- json = JSONAPI::Serializer.serialize(model, options)
38
+ json = JSONAPI::Serializer.serialize(record, options)
39
39
 
40
40
  force_utf8_encoding(json)
41
41
  end
42
42
 
43
- def serialize_models(models, options = {})
43
+ def serialize_models(records, options = {})
44
44
  options[:is_collection] = true
45
- json = JSONAPI::Serializer.serialize(models, options)
45
+ json = JSONAPI::Serializer.serialize(records, options)
46
46
 
47
47
  if options[:count]
48
48
  json[:meta] = {} unless json[:meta]
@@ -58,17 +58,23 @@ module ForestLiana
58
58
  end
59
59
 
60
60
  def authenticate_user_from_jwt
61
- if request.headers['Authorization']
62
- begin
63
- token = request.headers['Authorization'].split.second
64
- @jwt_decoded_token = JWT.decode(token, ForestLiana.auth_secret, true, {
65
- algorithm: 'HS256',
66
- leeway: 30
67
- }).try(:first)
68
- rescue JWT::ExpiredSignature, JWT::VerificationError
69
- render json: { error: 'expired_token' }, status: 401, serializer: nil
61
+ begin
62
+ if request.headers['Authorization'] || cookies['liana_auth:session']
63
+ if request.headers['Authorization']
64
+ token = request.headers['Authorization'].split.second
65
+ else
66
+ token = eval(cookies["liana_auth:session"])[:token]
67
+ end
68
+
69
+ @jwt_decoded_token = JWT.decode(token, ForestLiana.auth_secret, true,
70
+ { algorithm: 'HS256', leeway: 30 }).try(:first)
71
+ else
72
+ head :unauthorized
70
73
  end
71
- else
74
+ rescue JWT::ExpiredSignature, JWT::VerificationError
75
+ render json: { error: 'expired_token' }, status: :unauthorized,
76
+ serializer: nil
77
+ rescue
72
78
  head :unauthorized
73
79
  end
74
80
  end
@@ -108,5 +114,56 @@ module ForestLiana
108
114
  end
109
115
  end
110
116
 
117
+ def render_csv getter, table_name
118
+ set_headers_file
119
+ set_headers_streaming
120
+
121
+ response.status = 200
122
+ csv_header = params[:header].split(',')
123
+ field_names_requested = params[:fields][table_name]
124
+ .split(',').map { |name| name.to_s }
125
+
126
+ self.response_body = Enumerator.new do |content|
127
+ content << CSV::Row.new(field_names_requested, csv_header, true).to_s
128
+ getter.query_for_batch.find_in_batches() do |records|
129
+ records.each do |record|
130
+ json = serialize_model(record, {
131
+ include: getter.includes.map(&:to_s)
132
+ })
133
+ record_attributes = json['data']['attributes']
134
+ record_relationships = json['data']['relationships']
135
+ included = json['included']
136
+
137
+ values = field_names_requested.map do |field_name|
138
+ if record_attributes[field_name]
139
+ record_attributes[field_name]
140
+ elsif record_relationships[field_name]
141
+ relationship_id = record_relationships[field_name]['data']['id']
142
+ relationship_type = record_relationships[field_name]['data']['type']
143
+ relationship_object = included.select do |record|
144
+ record['id'] == relationship_id && record['type'] == relationship_type
145
+ end
146
+ relationship_object.first['attributes'][params[:fields][field_name]]
147
+ end
148
+ end
149
+ content << CSV::Row.new(field_names_requested, values).to_s
150
+ end
151
+ end
152
+ end
153
+ end
154
+
155
+ def set_headers_file
156
+ csv_filename = "#{params[:filename]}.csv"
157
+ headers["Content-Type"] = "text/csv; charset=utf-8"
158
+ headers["Content-disposition"] = %{attachment; filename="#{csv_filename}"}
159
+ headers['Last-Modified'] = Time.now.ctime.to_s
160
+ end
161
+
162
+ def set_headers_streaming
163
+ # NOTICE: From nginx doc: Setting this to "no" will allow unbuffered
164
+ # responses suitable for Comet and HTTP streaming applications
165
+ headers['X-Accel-Buffering'] = 'no'
166
+ headers["Cache-Control"] = "no-cache"
167
+ end
111
168
  end
112
169
  end
@@ -12,10 +12,10 @@ module ForestLiana
12
12
  getter = HasManyGetter.new(@resource, @association, params)
13
13
  getter.perform
14
14
 
15
- render serializer: nil, json: serialize_models(getter.records,
16
- include: getter.includes,
17
- count: getter.count,
18
- params: params)
15
+ respond_to do |format|
16
+ format.json { render_jsonapi(getter) }
17
+ format.csv { render_csv(getter, @association.table_name) }
18
+ end
19
19
  end
20
20
 
21
21
  def update
@@ -70,5 +70,10 @@ module ForestLiana
70
70
  def resource_params
71
71
  ResourceDeserializer.new(@resource, params[:resource], true).perform
72
72
  end
73
+
74
+ def render_jsonapi getter
75
+ render serializer: nil, json: serialize_models(getter.records,
76
+ include: getter.includes, count: getter.count, params: params)
77
+ end
73
78
  end
74
79
  end
@@ -17,10 +17,10 @@ module ForestLiana
17
17
  getter = ForestLiana::ResourcesGetter.new(@resource, params)
18
18
  getter.perform
19
19
 
20
- render serializer: nil, json: serialize_models(getter.records,
21
- include: includes(getter),
22
- count: getter.count,
23
- params: params)
20
+ respond_to do |format|
21
+ format.json { render_jsonapi(getter) }
22
+ format.csv { render_csv(getter, @resource.table_name) }
23
+ end
24
24
  end
25
25
 
26
26
  def show
@@ -93,5 +93,10 @@ module ForestLiana
93
93
  def record_not_found
94
94
  head :not_found
95
95
  end
96
+
97
+ def render_jsonapi getter
98
+ render serializer: nil, json: serialize_models(getter.records,
99
+ include: includes(getter), count: getter.count, params: params)
100
+ end
96
101
  end
97
102
  end
@@ -39,6 +39,10 @@ module ForestLiana
39
39
  .map { |association| association.name.to_s }
40
40
  end
41
41
 
42
+ def query_for_batch
43
+ @records
44
+ end
45
+
42
46
  def records
43
47
  @records.limit(limit).offset(offset)
44
48
  end
@@ -31,6 +31,10 @@ module ForestLiana
31
31
  @records_sorted = sort_query
32
32
  end
33
33
 
34
+ def query_for_batch
35
+ @records
36
+ end
37
+
34
38
  def records
35
39
  @records_sorted.offset(offset).limit(limit).to_a
36
40
  end
@@ -79,16 +79,18 @@ module ForestLiana
79
79
  end
80
80
  end
81
81
 
82
- SchemaUtils.one_associations(@resource).map(&:name).each do |association|
83
- if @includes.include? association.to_sym
84
- resource = @resource.reflect_on_association(association.to_sym)
85
- resource.klass.columns.each do |column|
86
- if !(column.respond_to?(:array) && column.array) &&
87
- (column.type == :string || column.type == :text)
88
- column_name = format_column_name(resource.table_name,
89
- column.name)
90
- conditions << "LOWER(#{column_name}) LIKE " +
91
- "'%#{@params[:search].downcase}%'"
82
+ if (@params['searchExtended'].to_i == 1)
83
+ SchemaUtils.one_associations(@resource).map(&:name).each do |association|
84
+ if @includes.include? association.to_sym
85
+ resource = @resource.reflect_on_association(association.to_sym)
86
+ resource.klass.columns.each do |column|
87
+ if !(column.respond_to?(:array) && column.array) &&
88
+ (column.type == :string || column.type == :text)
89
+ column_name = format_column_name(resource.table_name,
90
+ column.name)
91
+ conditions << "LOWER(#{column_name}) LIKE " +
92
+ "'%#{@params[:search].downcase}%'"
93
+ end
92
94
  end
93
95
  end
94
96
  end
@@ -39,8 +39,8 @@ module ForestLiana::Collection
39
39
  :'is-virtual' => true
40
40
  })
41
41
 
42
- if serializer_name && ForestLiana::UserSpace.const_defined?(
43
- serializer_name)
42
+ if serializer_name &&
43
+ ForestLiana::UserSpace.const_defined?(serializer_name)
44
44
  ForestLiana::UserSpace.const_get(serializer_name).class_eval do
45
45
  attribute(name, &block)
46
46
  end
@@ -54,8 +54,8 @@ module ForestLiana::Collection
54
54
  type: ['String']
55
55
  })
56
56
 
57
- if serializer_name && ForestLiana::UserSpace.const_defined?(
58
- serializer_name)
57
+ if serializer_name &&
58
+ ForestLiana::UserSpace.const_defined?(serializer_name)
59
59
  ForestLiana::UserSpace.const_get(serializer_name).class_eval do
60
60
  has_many(name, name: name)
61
61
  end
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "1.6.17"
2
+ VERSION = "1.7.0"
3
3
  end
Binary file
@@ -70134,3 +70134,1266 @@ ForestLiana::ResourcesGetterTest: test_Sort_on_an_ambiguous_field_name_with_a_fi
70134
70134
  SQL (0.3ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.name = 'Arnaud Besnier') ORDER BY trees.name DESC LIMIT 10 OFFSET 0
70135
70135
   (0.3ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.name = 'Arnaud Besnier')
70136
70136
   (0.1ms) rollback transaction
70137
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
70138
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
70139
+  (0.1ms)  SELECT sql
70140
+ FROM sqlite_master
70141
+ WHERE name='index_belongs_to_class_name_fields_on_foo_id' AND type='index'
70142
+ UNION ALL
70143
+ SELECT sql
70144
+ FROM sqlite_temp_master
70145
+ WHERE name='index_belongs_to_class_name_fields_on_foo_id' AND type='index'
70146
+ 
70147
+  (0.1ms) SELECT sql
70148
+ FROM sqlite_master
70149
+ WHERE name='index_belongs_to_fields_on_has_many_field_id' AND type='index'
70150
+ UNION ALL
70151
+ SELECT sql
70152
+ FROM sqlite_temp_master
70153
+ WHERE name='index_belongs_to_fields_on_has_many_field_id' AND type='index'
70154
+
70155
+  (0.1ms)  SELECT sql
70156
+ FROM sqlite_master
70157
+ WHERE name='index_belongs_to_fields_on_has_many_class_name_field_id' AND type='index'
70158
+ UNION ALL
70159
+ SELECT sql
70160
+ FROM sqlite_temp_master
70161
+ WHERE name='index_belongs_to_fields_on_has_many_class_name_field_id' AND type='index'
70162
+ 
70163
+  (0.1ms) SELECT sql
70164
+ FROM sqlite_master
70165
+ WHERE name='index_belongs_to_fields_on_has_one_field_id' AND type='index'
70166
+ UNION ALL
70167
+ SELECT sql
70168
+ FROM sqlite_temp_master
70169
+ WHERE name='index_belongs_to_fields_on_has_one_field_id' AND type='index'
70170
+
70171
+  (0.1ms)  SELECT sql
70172
+ FROM sqlite_master
70173
+ WHERE name='index_has_many_fields_on_has_many_through_field_id' AND type='index'
70174
+ UNION ALL
70175
+ SELECT sql
70176
+ FROM sqlite_temp_master
70177
+ WHERE name='index_has_many_fields_on_has_many_through_field_id' AND type='index'
70178
+ 
70179
+  (0.1ms) SELECT sql
70180
+ FROM sqlite_master
70181
+ WHERE name='index_polymorphic_fields_on_has_one_field_id' AND type='index'
70182
+ UNION ALL
70183
+ SELECT sql
70184
+ FROM sqlite_temp_master
70185
+ WHERE name='index_polymorphic_fields_on_has_one_field_id' AND type='index'
70186
+
70187
+  (0.1ms)  SELECT sql
70188
+ FROM sqlite_master
70189
+ WHERE name='index_trees_on_owner_id' AND type='index'
70190
+ UNION ALL
70191
+ SELECT sql
70192
+ FROM sqlite_temp_master
70193
+ WHERE name='index_trees_on_owner_id' AND type='index'
70194
+ 
70195
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
70196
+  (0.1ms) begin transaction
70197
+ Fixture Delete (1.3ms) DELETE FROM "belongs_to_fields"
70198
+ Fixture Insert (0.4ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (1, 1, 1)
70199
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (2, 2, 1)
70200
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (3, 3, 1)
70201
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (4, 4, 2)
70202
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (5, 5, 2)
70203
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (6, 6, 2)
70204
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (7, 7, 3)
70205
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (8, 8, 3)
70206
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (9, 9, 3)
70207
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (10, 10, 4)
70208
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (11, 11, 4)
70209
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (12, 12, 4)
70210
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (13, 13, 5)
70211
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (14, 14, 5)
70212
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (15, 15, 5)
70213
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (16, 16, 6)
70214
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (17, 17, 6)
70215
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (18, 18, 6)
70216
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (19, 19, 7)
70217
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (20, 20, 7)
70218
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (21, 21, 7)
70219
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (22, 22, 7)
70220
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (23, 23, 8)
70221
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (24, 24, 8)
70222
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (25, 25, 9)
70223
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (26, 26, 9)
70224
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (27, 27, 9)
70225
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (28, 28, 10)
70226
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (29, 29, 10)
70227
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (30, 30, 10)
70228
+ Fixture Delete (0.6ms) DELETE FROM "has_many_fields"
70229
+ Fixture Insert (0.3ms) INSERT INTO "has_many_fields" ("id") VALUES (1)
70230
+ Fixture Insert (0.1ms) INSERT INTO "has_many_fields" ("id") VALUES (2)
70231
+ Fixture Insert (0.1ms) INSERT INTO "has_many_fields" ("id") VALUES (3)
70232
+ Fixture Insert (0.1ms) INSERT INTO "has_many_fields" ("id") VALUES (4)
70233
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (5, 3)
70234
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (6, 2)
70235
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (7)
70236
+ Fixture Insert (0.1ms) INSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (8, 2)
70237
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (9)
70238
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (10)
70239
+ Fixture Delete (0.2ms) DELETE FROM "has_many_through_fields"
70240
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (1)
70241
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (2)
70242
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (3)
70243
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (4)
70244
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (5)
70245
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (6)
70246
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (7)
70247
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (8)
70248
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (9)
70249
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (10)
70250
+ Fixture Delete (0.3ms) DELETE FROM "has_one_fields"
70251
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (1)
70252
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (2)
70253
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (3)
70254
+ Fixture Insert (0.3ms) INSERT INTO "has_one_fields" ("id") VALUES (4)
70255
+ Fixture Insert (0.3ms) INSERT INTO "has_one_fields" ("id") VALUES (5)
70256
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (6)
70257
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (7)
70258
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (8)
70259
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (9)
70260
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (10)
70261
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (11)
70262
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (12)
70263
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (13)
70264
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (14)
70265
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (15)
70266
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (16)
70267
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (17)
70268
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (18)
70269
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (19)
70270
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (20)
70271
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (21)
70272
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (22)
70273
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (23)
70274
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (24)
70275
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (25)
70276
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (26)
70277
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (27)
70278
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (28)
70279
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (29)
70280
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (30)
70281
+ Fixture Delete (0.4ms) DELETE FROM "owners"
70282
+ Fixture Insert (0.1ms) INSERT INTO "owners" ("id", "name", "created_at", "updated_at") VALUES (1, 'Sandro Munda', '2016-05-30 09:00:00.000000', '2017-06-27 20:00:00.000000')
70283
+ Fixture Insert (0.1ms) INSERT INTO "owners" ("id", "name", "created_at", "updated_at") VALUES (2, 'Arnaud Besnier', '2017-05-02 09:00:00.000000', '2017-06-28 08:00:00.000000')
70284
+ Fixture Insert (0.1ms) INSERT INTO "owners" ("id", "name", "created_at", "updated_at") VALUES (3, 'John Doe', '2015-05-02 09:00:00.000000', '2016-06-28 08:00:00.000000')
70285
+ Fixture Delete (0.1ms) DELETE FROM "serialize_fields"
70286
+ Fixture Insert (0.1ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (1, 'value 1')
70287
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (2, 'value 2')
70288
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (3, 'value 3')
70289
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (4, 'value 4')
70290
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (5, 'value 5')
70291
+ Fixture Delete (0.5ms) DELETE FROM "string_fields"
70292
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (1, 'Test 1')
70293
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (2, 'Test 2')
70294
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (3, 'Test 3')
70295
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (4, 'Test 4')
70296
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (5, 'Test 5')
70297
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (6, 'Test 6')
70298
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (7, 'Test 7')
70299
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (8, 'Test 8')
70300
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (9, 'Test 9')
70301
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (10, 'Test 10')
70302
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (11, 'Test 11')
70303
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (12, 'Test 12')
70304
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (13, 'Test 13')
70305
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (14, 'Test 14')
70306
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (15, 'Test 15')
70307
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (16, 'Test 16')
70308
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (17, 'Test 17')
70309
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (18, 'Test 18')
70310
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (19, 'Test 19')
70311
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (20, 'Test 20')
70312
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (21, 'Test 21')
70313
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (22, 'Test 22')
70314
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (23, 'Test 23')
70315
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (24, 'Test 24')
70316
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (25, 'Test 25')
70317
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (26, 'Test 26')
70318
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (27, 'Test 27')
70319
+ Fixture Insert (0.5ms) INSERT INTO "string_fields" ("id", "field") VALUES (28, 'Test 28')
70320
+ Fixture Insert (0.2ms) INSERT INTO "string_fields" ("id", "field") VALUES (29, 'Test 29')
70321
+ Fixture Insert (0.2ms) INSERT INTO "string_fields" ("id", "field") VALUES (30, 'Test 30')
70322
+ Fixture Delete (1.7ms) DELETE FROM "trees"
70323
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (1, 'Oak', 1, '2010-02-11 11:00:00.000000', '2010-02-11 11:00:00.000000')
70324
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (2, 'Mapple', 2, '2010-02-15 21:00:00.000000', '2010-02-15 21:00:00.000000')
70325
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (3, 'Mapple', 2, '2012-04-11 12:00:00.000000', '2012-04-11 12:00:00.000000')
70326
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (4, 'Oak', 2, '2015-06-18 09:00:00.000000', '2015-06-18 09:00:00.000000')
70327
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (5, 'Oak', 3, '2014-06-18 09:00:00.000000', '2014-06-18 09:00:00.000000')
70328
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (6, 'Oak', 3, '2017-08-09 21:35:09.000000', '2017-08-09 21:35:09.000000')
70329
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (7, 'Sequoia', 1, '2017-08-09 21:35:09.000000', '2017-08-09 21:35:09.000000')
70330
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (8, 'Fir', 1, '2017-08-09 21:35:09.000000', '2017-08-09 21:35:09.000000')
70331
+  (7.3ms) commit transaction
70332
+  (0.1ms) begin transaction
70333
+ ------------------------------------------------------------------------------------------------------
70334
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_missing_value
70335
+ ------------------------------------------------------------------------------------------------------
70336
+ SerializeField Load (0.2ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
70337
+  (0.1ms) SAVEPOINT active_record_1
70338
+  (0.1ms) RELEASE SAVEPOINT active_record_1
70339
+  (0.1ms) rollback transaction
70340
+  (0.1ms) begin transaction
70341
+ ---------------------------------------------------------------------------------------------------------
70342
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_bad_format_value
70343
+ ---------------------------------------------------------------------------------------------------------
70344
+ SerializeField Load (0.1ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
70345
+  (0.1ms) rollback transaction
70346
+  (0.1ms) begin transaction
70347
+ ---------------------------------------------------------------------------------------------------
70348
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_null_value
70349
+ ---------------------------------------------------------------------------------------------------
70350
+ SerializeField Load (0.1ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
70351
+  (0.0ms) SAVEPOINT active_record_1
70352
+ SQL (0.4ms) UPDATE "serialize_fields" SET "field" = ? WHERE "serialize_fields"."id" = ? [["field", nil], ["id", 1]]
70353
+  (0.1ms) RELEASE SAVEPOINT active_record_1
70354
+  (1.4ms) rollback transaction
70355
+  (0.1ms) begin transaction
70356
+ ------------------------------------------------------------------------------------------------------------
70357
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_well_formated_value
70358
+ ------------------------------------------------------------------------------------------------------------
70359
+ SerializeField Load (0.1ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
70360
+  (0.0ms) SAVEPOINT active_record_1
70361
+ SQL (0.4ms) UPDATE "serialize_fields" SET "field" = ? WHERE "serialize_fields"."id" = ? [["field", "---\n- test\n- test\n"], ["id", 1]]
70362
+  (0.1ms) RELEASE SAVEPOINT active_record_1
70363
+  (0.4ms) rollback transaction
70364
+  (0.1ms) begin transaction
70365
+ -----------------------------------------------------------------------------------------
70366
+ ForestLiana::PieStatGetterTest: test_Pie_stat_getter_with_an_aggregate_on_a_boolean_field
70367
+ -----------------------------------------------------------------------------------------
70368
+  (0.4ms) SELECT COUNT(*) AS count_all, boolean_fields.field AS boolean_fields_field FROM "boolean_fields" GROUP BY boolean_fields.field ORDER BY count_all DESC
70369
+  (0.3ms) rollback transaction
70370
+  (0.1ms) begin transaction
70371
+ ---------------------------------------------------------------------------------------
70372
+ ForestLiana::PieStatGetterTest: test_Pie_stat_getter_with_an_aggregate_on_a_foreign_key
70373
+ ---------------------------------------------------------------------------------------
70374
+  (0.6ms) SELECT COUNT(DISTINCT "belongs_to_fields"."id") AS count_id, belongs_to_fields.has_one_field_id AS belongs_to_fields_has_one_field_id FROM "belongs_to_fields" LEFT OUTER JOIN "has_one_fields" ON "has_one_fields"."id" = "belongs_to_fields"."has_one_field_id" LEFT OUTER JOIN "has_many_fields" ON "has_many_fields"."id" = "belongs_to_fields"."has_many_field_id" LEFT OUTER JOIN "has_many_class_name_fields" ON "has_many_class_name_fields"."id" = "belongs_to_fields"."has_many_class_name_field_id" GROUP BY belongs_to_fields.has_one_field_id ORDER BY count_id DESC
70375
+  (0.1ms) rollback transaction
70376
+  (0.1ms) begin transaction
70377
+ -----------------------------------------------------------------
70378
+ ForestLiana::ResourcesGetterTest: test_StringField_page_2_size_10
70379
+ -----------------------------------------------------------------
70380
+ SQL (0.3ms) SELECT "string_fields"."id" AS t0_r0, "string_fields"."field" AS t0_r1 FROM "string_fields" ORDER BY string_fields.id DESC LIMIT 10 OFFSET 10
70381
+  (0.1ms) SELECT COUNT(*) FROM "string_fields"
70382
+  (0.1ms) rollback transaction
70383
+  (0.1ms) begin transaction
70384
+ -------------------------------------------------------------------------------------------
70385
+ ForestLiana::ResourcesGetterTest: test_Filter_on_an_updated_at_field_of_the_main_collection
70386
+ -------------------------------------------------------------------------------------------
70387
+ SQL (0.2ms) SELECT "owners"."id" AS t0_r0, "owners"."name" AS t0_r1, "owners"."created_at" AS t0_r2, "owners"."updated_at" AS t0_r3 FROM "owners" WHERE ("owners"."updated_at" BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC') ORDER BY owners.created_at DESC LIMIT 10 OFFSET 0
70388
+  (0.1ms) SELECT COUNT(*) FROM "owners" WHERE ("owners"."updated_at" BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC')
70389
+  (0.1ms) rollback transaction
70390
+  (0.1ms) begin transaction
70391
+ ----------------------------------------------------------------
70392
+ ForestLiana::ResourcesGetterTest: test_StringField_sort_by_field
70393
+ ----------------------------------------------------------------
70394
+ SQL (0.3ms) SELECT "string_fields"."id" AS t0_r0, "string_fields"."field" AS t0_r1 FROM "string_fields" ORDER BY string_fields.field DESC LIMIT 10 OFFSET 0
70395
+  (0.1ms) SELECT COUNT(*) FROM "string_fields"
70396
+  (0.1ms) rollback transaction
70397
+  (0.1ms) begin transaction
70398
+ ---------------------------------------------------------------------------
70399
+ ForestLiana::ResourcesGetterTest: test_HasMany_Getter_with_search_parameter
70400
+ ---------------------------------------------------------------------------
70401
+ Owner Load (0.2ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 1]]
70402
+ SQL (8.7ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? AND (LOWER("trees"."name") LIKE '%fir%' OR LOWER("owners"."name") LIKE '%fir%') [["owner_id", 1]]
70403
+  (0.3ms) SELECT COUNT(DISTINCT count_column) FROM (SELECT "trees"."id" AS count_column FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? AND (LOWER("trees"."name") LIKE '%fir%' OR LOWER("owners"."name") LIKE '%fir%') LIMIT 15 OFFSET 0) subquery_for_count [["owner_id", 1]]
70404
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? AND (LOWER("trees"."name") LIKE '%fir%' OR LOWER("owners"."name") LIKE '%fir%') ORDER BY "trees"."id" ASC LIMIT 1 OFFSET 0 [["owner_id", 1]]
70405
+  (0.2ms) rollback transaction
70406
+  (0.1ms) begin transaction
70407
+ -----------------------------------------------------------------------
70408
+ ForestLiana::ResourcesGetterTest: test_Sort_by_a_belongs_to_association
70409
+ -----------------------------------------------------------------------
70410
+ SQL (0.3ms) SELECT "belongs_to_fields"."id" AS t0_r0, "belongs_to_fields"."has_one_field_id" AS t0_r1, "belongs_to_fields"."has_many_class_name_field_id" AS t0_r2, "belongs_to_fields"."has_many_field_id" AS t0_r3, "has_one_fields"."id" AS t1_r0, "has_many_fields"."id" AS t2_r0, "has_many_fields"."has_many_through_field_id" AS t2_r1, "has_many_class_name_fields"."id" AS t3_r0 FROM "belongs_to_fields" LEFT OUTER JOIN "has_one_fields" ON "has_one_fields"."id" = "belongs_to_fields"."has_one_field_id" LEFT OUTER JOIN "has_many_fields" ON "has_many_fields"."id" = "belongs_to_fields"."has_many_field_id" LEFT OUTER JOIN "has_many_class_name_fields" ON "has_many_class_name_fields"."id" = "belongs_to_fields"."has_many_class_name_field_id" ORDER BY "has_one_fields"."id" ASC LIMIT 10 OFFSET 0
70411
+  (0.2ms) SELECT COUNT(*) FROM "belongs_to_fields"
70412
+  (0.2ms) rollback transaction
70413
+  (0.1ms) begin transaction
70414
+ ------------------------------------------------------------------------------------------------------
70415
+ ForestLiana::ResourcesGetterTest: test_Filter_equal_on_an_updated_at_field_of_an_associated_collection
70416
+ ------------------------------------------------------------------------------------------------------
70417
+ SQL (0.3ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at = 'Sat Jul 02 2016 11:52:00 GMT-0400 (EDT)') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
70418
+  (0.2ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at = 'Sat Jul 02 2016 11:52:00 GMT-0400 (EDT)')
70419
+  (0.1ms) rollback transaction
70420
+  (0.1ms) begin transaction
70421
+ -----------------------------------------------------------------
70422
+ ForestLiana::ResourcesGetterTest: test_StringField_page_1_size_15
70423
+ -----------------------------------------------------------------
70424
+ SQL (0.2ms) SELECT "string_fields"."id" AS t0_r0, "string_fields"."field" AS t0_r1 FROM "string_fields" ORDER BY string_fields.id DESC LIMIT 15 OFFSET 0
70425
+  (0.4ms) SELECT COUNT(*) FROM "string_fields"
70426
+  (0.1ms) rollback transaction
70427
+  (0.1ms) begin transaction
70428
+ ----------------------------------------------------------------
70429
+ ForestLiana::ResourcesGetterTest: test_Filter_on_ambiguous_field
70430
+ ----------------------------------------------------------------
70431
+ SQL (0.3ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE ("trees"."created_at" > '2015-06-18 08:00:00') AND (owners.name = 'Arnaud Besnier') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
70432
+  (0.3ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE ("trees"."created_at" > '2015-06-18 08:00:00') AND (owners.name = 'Arnaud Besnier')
70433
+  (0.1ms) rollback transaction
70434
+  (0.1ms) begin transaction
70435
+ --------------------------------------------------------------------
70436
+ ForestLiana::ResourcesGetterTest: test_HasMany_Getter_page_1_size_15
70437
+ --------------------------------------------------------------------
70438
+ Owner Load (0.2ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 1]]
70439
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? [["owner_id", 1]]
70440
+  (0.2ms) SELECT COUNT(DISTINCT count_column) FROM (SELECT "trees"."id" AS count_column FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? LIMIT 15 OFFSET 0) subquery_for_count [["owner_id", 1]]
70441
+ SQL (0.1ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? ORDER BY "trees"."id" ASC LIMIT 1 OFFSET 0 [["owner_id", 1]]
70442
+  (0.1ms) rollback transaction
70443
+  (0.0ms) begin transaction
70444
+ ------------------------------------------------------------------------------------
70445
+ ForestLiana::ResourcesGetterTest: test_Sort_on_an_ambiguous_field_name_with_a_filter
70446
+ ------------------------------------------------------------------------------------
70447
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.name = 'Arnaud Besnier') ORDER BY trees.name DESC LIMIT 10 OFFSET 0
70448
+  (0.2ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.name = 'Arnaud Besnier')
70449
+  (0.1ms) rollback transaction
70450
+  (0.1ms) begin transaction
70451
+ ------------------------------------------------------------------------------------------------
70452
+ ForestLiana::ResourcesGetterTest: test_Filter_on_an_updated_at_field_of_an_associated_collection
70453
+ ------------------------------------------------------------------------------------------------
70454
+ SQL (1.3ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
70455
+  (0.2ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC')
70456
+  (0.1ms) rollback transaction
70457
+  (0.1ms) begin transaction
70458
+ -----------------------------------------------------------
70459
+ ForestLiana::ResourcesGetterTest: test_Filter_before_x_days
70460
+ -----------------------------------------------------------
70461
+ SQL (0.3ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4 FROM "trees" WHERE ("trees"."created_at" < '2017-08-09 21:34:10 UTC') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
70462
+  (0.3ms) SELECT COUNT(*) FROM "trees" WHERE ("trees"."created_at" < '2017-08-09 21:34:10 UTC')
70463
+ Owner Load (0.1ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 2]]
70464
+  (0.1ms) rollback transaction
70465
+  (0.1ms) begin transaction
70466
+ --------------------------------------------------------------------
70467
+ ForestLiana::ResourcesGetterTest: test_Sort_by_a_has_one_association
70468
+ --------------------------------------------------------------------
70469
+ SQL (0.7ms) SELECT "has_one_fields"."id" AS t0_r0, "belongs_to_fields"."id" AS t1_r0, "belongs_to_fields"."has_one_field_id" AS t1_r1, "belongs_to_fields"."has_many_class_name_field_id" AS t1_r2, "belongs_to_fields"."has_many_field_id" AS t1_r3, "belongs_to_class_name_fields"."id" AS t2_r0, "belongs_to_class_name_fields"."foo_id" AS t2_r1 FROM "has_one_fields" LEFT OUTER JOIN "belongs_to_fields" ON "belongs_to_fields"."has_one_field_id" = "has_one_fields"."id" LEFT OUTER JOIN "belongs_to_class_name_fields" ON "belongs_to_class_name_fields"."foo_id" = "has_one_fields"."id" ORDER BY "belongs_to_fields"."id" DESC LIMIT 10 OFFSET 0
70470
+  (0.2ms) SELECT COUNT(*) FROM "has_one_fields"
70471
+  (0.1ms) rollback transaction
70472
+  (0.1ms) begin transaction
70473
+ -------------------------------------------------------------------------
70474
+ ForestLiana::ResourcesGetterTest: test_HasMany_Getter_with_sort_parameter
70475
+ -------------------------------------------------------------------------
70476
+ Owner Load (0.2ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 1]]
70477
+ SQL (0.3ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? ORDER BY trees.id DESC [["owner_id", 1]]
70478
+  (0.2ms) SELECT COUNT(DISTINCT count_column) FROM (SELECT "trees"."id" AS count_column FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? LIMIT 15 OFFSET 0) subquery_for_count [["owner_id", 1]]
70479
+ SQL (0.3ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? ORDER BY trees.id DESC LIMIT 1 OFFSET 0 [["owner_id", 1]]
70480
+  (0.2ms) rollback transaction
70481
+  (0.1ms) begin transaction
70482
+ ---------------------------------------------------------------------------
70483
+ ForestLiana::SchemaAdapterTest: test_Boolean_should_have_the_type_`Boolean`
70484
+ ---------------------------------------------------------------------------
70485
+  (0.1ms) rollback transaction
70486
+  (0.1ms) begin transaction
70487
+ -----------------------------------------------------------
70488
+ ForestLiana::SchemaAdapterTest: test_belongsTo_relationship
70489
+ -----------------------------------------------------------
70490
+  (0.1ms) rollback transaction
70491
+  (0.1ms) begin transaction
70492
+ -------------------------------------------------------------------------
70493
+ ForestLiana::SchemaAdapterTest: test_String_should_have_the_type_`String`
70494
+ -------------------------------------------------------------------------
70495
+  (0.0ms) rollback transaction
70496
+  (0.0ms) begin transaction
70497
+ ------------------------------------------------------------------------
70498
+ ForestLiana::SchemaAdapterTest: test_Float_should_have_the_type_`Number`
70499
+ ------------------------------------------------------------------------
70500
+  (0.1ms) rollback transaction
70501
+  (0.1ms) begin transaction
70502
+ -------------------------------------------------------------------------
70503
+ ForestLiana::SchemaAdapterTest: test_DateTime_should_have_the_type_`Date`
70504
+ -------------------------------------------------------------------------
70505
+  (0.7ms) rollback transaction
70506
+  (0.1ms) begin transaction
70507
+ ---------------------------------------------------------
70508
+ ForestLiana::SchemaAdapterTest: test_hasMany_relationship
70509
+ ---------------------------------------------------------
70510
+  (0.1ms) rollback transaction
70511
+  (0.1ms) begin transaction
70512
+ --------------------------------------------------------
70513
+ ForestLiana::SchemaAdapterTest: test_hasOne_relationship
70514
+ --------------------------------------------------------
70515
+  (0.0ms) rollback transaction
70516
+  (0.1ms) begin transaction
70517
+ ----------------------------------------------------------------------------------
70518
+ ForestLiana::SchemaAdapterTest: test_hasMany_relationhip_with_specified_class_name
70519
+ ----------------------------------------------------------------------------------
70520
+  (0.1ms) rollback transaction
70521
+  (0.1ms) begin transaction
70522
+ ------------------------------------------------------------------------------------
70523
+ ForestLiana::SchemaAdapterTest: test_belongsTo_relationhip_with_specified_class_name
70524
+ ------------------------------------------------------------------------------------
70525
+  (0.1ms) rollback transaction
70526
+  (0.1ms) begin transaction
70527
+ --------------------------------------------------------------------------
70528
+ ForestLiana::SchemaAdapterTest: test_Decimal_should_have_the_type_`Number`
70529
+ --------------------------------------------------------------------------
70530
+  (0.1ms) rollback transaction
70531
+  (0.1ms) begin transaction
70532
+ ---------------------------------------------------------------------
70533
+ ForestLiana::SchemaAdapterTest: test_Date_should_have_the_type_`Date`
70534
+ ---------------------------------------------------------------------
70535
+  (0.0ms) rollback transaction
70536
+  (0.1ms) begin transaction
70537
+ --------------------------------------------------------------------------
70538
+ ForestLiana::SchemaAdapterTest: test_Integer_should_have_the_type_`Number`
70539
+ --------------------------------------------------------------------------
70540
+  (0.1ms) rollback transaction
70541
+  (0.1ms) begin transaction
70542
+ --------------------------------------------------------------------------------------------
70543
+ ForestLiana::ValueStatGetterTest: test_Value_stat_getter_with_a_filter_on_a_belongs_to_field
70544
+ --------------------------------------------------------------------------------------------
70545
+  (0.4ms) SELECT DISTINCT COUNT(DISTINCT "belongs_to_fields"."id") FROM "belongs_to_fields" LEFT OUTER JOIN "has_one_fields" ON "has_one_fields"."id" = "belongs_to_fields"."has_one_field_id" LEFT OUTER JOIN "has_many_fields" ON "has_many_fields"."id" = "belongs_to_fields"."has_many_field_id" LEFT OUTER JOIN "has_many_class_name_fields" ON "has_many_class_name_fields"."id" = "belongs_to_fields"."has_many_class_name_field_id" WHERE ("has_one_fields"."id" = '3')
70546
+  (0.1ms) rollback transaction
70547
+  (0.1ms) begin transaction
70548
+ -----------------------------------------------------------------------------
70549
+ ForestLiana::ValueStatGetterTest: test_Value_stat_getter_with_a_simple_filter
70550
+ -----------------------------------------------------------------------------
70551
+  (0.1ms) SELECT DISTINCT COUNT(DISTINCT "boolean_fields"."id") FROM "boolean_fields" WHERE ("boolean_fields"."field" = 1)
70552
+  (0.0ms) rollback transaction
70553
+  (0.1ms) begin transaction
70554
+ ---------------------------
70555
+ ForestLianaTest: test_truth
70556
+ ---------------------------
70557
+  (0.0ms) rollback transaction
70558
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
70559
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
70560
+  (1.1ms)  SELECT sql
70561
+ FROM sqlite_master
70562
+ WHERE name='index_belongs_to_class_name_fields_on_foo_id' AND type='index'
70563
+ UNION ALL
70564
+ SELECT sql
70565
+ FROM sqlite_temp_master
70566
+ WHERE name='index_belongs_to_class_name_fields_on_foo_id' AND type='index'
70567
+ 
70568
+  (0.3ms) SELECT sql
70569
+ FROM sqlite_master
70570
+ WHERE name='index_belongs_to_fields_on_has_many_field_id' AND type='index'
70571
+ UNION ALL
70572
+ SELECT sql
70573
+ FROM sqlite_temp_master
70574
+ WHERE name='index_belongs_to_fields_on_has_many_field_id' AND type='index'
70575
+
70576
+  (0.2ms)  SELECT sql
70577
+ FROM sqlite_master
70578
+ WHERE name='index_belongs_to_fields_on_has_many_class_name_field_id' AND type='index'
70579
+ UNION ALL
70580
+ SELECT sql
70581
+ FROM sqlite_temp_master
70582
+ WHERE name='index_belongs_to_fields_on_has_many_class_name_field_id' AND type='index'
70583
+ 
70584
+  (0.2ms) SELECT sql
70585
+ FROM sqlite_master
70586
+ WHERE name='index_belongs_to_fields_on_has_one_field_id' AND type='index'
70587
+ UNION ALL
70588
+ SELECT sql
70589
+ FROM sqlite_temp_master
70590
+ WHERE name='index_belongs_to_fields_on_has_one_field_id' AND type='index'
70591
+
70592
+  (0.2ms)  SELECT sql
70593
+ FROM sqlite_master
70594
+ WHERE name='index_has_many_fields_on_has_many_through_field_id' AND type='index'
70595
+ UNION ALL
70596
+ SELECT sql
70597
+ FROM sqlite_temp_master
70598
+ WHERE name='index_has_many_fields_on_has_many_through_field_id' AND type='index'
70599
+ 
70600
+  (0.2ms) SELECT sql
70601
+ FROM sqlite_master
70602
+ WHERE name='index_polymorphic_fields_on_has_one_field_id' AND type='index'
70603
+ UNION ALL
70604
+ SELECT sql
70605
+ FROM sqlite_temp_master
70606
+ WHERE name='index_polymorphic_fields_on_has_one_field_id' AND type='index'
70607
+
70608
+  (0.9ms)  SELECT sql
70609
+ FROM sqlite_master
70610
+ WHERE name='index_trees_on_owner_id' AND type='index'
70611
+ UNION ALL
70612
+ SELECT sql
70613
+ FROM sqlite_temp_master
70614
+ WHERE name='index_trees_on_owner_id' AND type='index'
70615
+ 
70616
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
70617
+  (0.2ms) begin transaction
70618
+ Fixture Delete (1.4ms) DELETE FROM "belongs_to_fields"
70619
+ Fixture Insert (0.4ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (1, 1, 1)
70620
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (2, 2, 1)
70621
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (3, 3, 1)
70622
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (4, 4, 2)
70623
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (5, 5, 2)
70624
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (6, 6, 2)
70625
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (7, 7, 3)
70626
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (8, 8, 3)
70627
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (9, 9, 3)
70628
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (10, 10, 4)
70629
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (11, 11, 4)
70630
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (12, 12, 4)
70631
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (13, 13, 5)
70632
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (14, 14, 5)
70633
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (15, 15, 5)
70634
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (16, 16, 6)
70635
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (17, 17, 6)
70636
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (18, 18, 6)
70637
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (19, 19, 7)
70638
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (20, 20, 7)
70639
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (21, 21, 7)
70640
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (22, 22, 7)
70641
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (23, 23, 8)
70642
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (24, 24, 8)
70643
+ Fixture Insert (0.2ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (25, 25, 9)
70644
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (26, 26, 9)
70645
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (27, 27, 9)
70646
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (28, 28, 10)
70647
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (29, 29, 10)
70648
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (30, 30, 10)
70649
+ Fixture Delete (0.6ms) DELETE FROM "has_many_fields"
70650
+ Fixture Insert (0.1ms) INSERT INTO "has_many_fields" ("id") VALUES (1)
70651
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (2)
70652
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (3)
70653
+ Fixture Insert (0.1ms) INSERT INTO "has_many_fields" ("id") VALUES (4)
70654
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (5, 3)
70655
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (6, 2)
70656
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (7)
70657
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (8, 2)
70658
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (9)
70659
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (10)
70660
+ Fixture Delete (0.4ms) DELETE FROM "has_many_through_fields"
70661
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (1)
70662
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (2)
70663
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (3)
70664
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (4)
70665
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (5)
70666
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (6)
70667
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (7)
70668
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (8)
70669
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (9)
70670
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (10)
70671
+ Fixture Delete (0.4ms) DELETE FROM "has_one_fields"
70672
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (1)
70673
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (2)
70674
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (3)
70675
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (4)
70676
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (5)
70677
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (6)
70678
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (7)
70679
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (8)
70680
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (9)
70681
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (10)
70682
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (11)
70683
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (12)
70684
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (13)
70685
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (14)
70686
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (15)
70687
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (16)
70688
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (17)
70689
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (18)
70690
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (19)
70691
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (20)
70692
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (21)
70693
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (22)
70694
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (23)
70695
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (24)
70696
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (25)
70697
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (26)
70698
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (27)
70699
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (28)
70700
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (29)
70701
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (30)
70702
+ Fixture Delete (0.4ms) DELETE FROM "owners"
70703
+ Fixture Insert (0.1ms) INSERT INTO "owners" ("id", "name", "created_at", "updated_at") VALUES (1, 'Sandro Munda', '2016-05-30 09:00:00.000000', '2017-06-27 20:00:00.000000')
70704
+ Fixture Insert (0.1ms) INSERT INTO "owners" ("id", "name", "created_at", "updated_at") VALUES (2, 'Arnaud Besnier', '2017-05-02 09:00:00.000000', '2017-06-28 08:00:00.000000')
70705
+ Fixture Insert (0.0ms) INSERT INTO "owners" ("id", "name", "created_at", "updated_at") VALUES (3, 'John Doe', '2015-05-02 09:00:00.000000', '2016-06-28 08:00:00.000000')
70706
+ Fixture Delete (0.1ms) DELETE FROM "serialize_fields"
70707
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (1, 'value 1')
70708
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (2, 'value 2')
70709
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (3, 'value 3')
70710
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (4, 'value 4')
70711
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (5, 'value 5')
70712
+ Fixture Delete (0.4ms) DELETE FROM "string_fields"
70713
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (1, 'Test 1')
70714
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (2, 'Test 2')
70715
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (3, 'Test 3')
70716
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (4, 'Test 4')
70717
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (5, 'Test 5')
70718
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (6, 'Test 6')
70719
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (7, 'Test 7')
70720
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (8, 'Test 8')
70721
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (9, 'Test 9')
70722
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (10, 'Test 10')
70723
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (11, 'Test 11')
70724
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (12, 'Test 12')
70725
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (13, 'Test 13')
70726
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (14, 'Test 14')
70727
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (15, 'Test 15')
70728
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (16, 'Test 16')
70729
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (17, 'Test 17')
70730
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (18, 'Test 18')
70731
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (19, 'Test 19')
70732
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (20, 'Test 20')
70733
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (21, 'Test 21')
70734
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (22, 'Test 22')
70735
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (23, 'Test 23')
70736
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (24, 'Test 24')
70737
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (25, 'Test 25')
70738
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (26, 'Test 26')
70739
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (27, 'Test 27')
70740
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (28, 'Test 28')
70741
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (29, 'Test 29')
70742
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (30, 'Test 30')
70743
+ Fixture Delete (0.7ms) DELETE FROM "trees"
70744
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (1, 'Oak', 1, '2010-02-11 11:00:00.000000', '2010-02-11 11:00:00.000000')
70745
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (2, 'Mapple', 2, '2010-02-15 21:00:00.000000', '2010-02-15 21:00:00.000000')
70746
+ Fixture Insert (0.0ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (3, 'Mapple', 2, '2012-04-11 12:00:00.000000', '2012-04-11 12:00:00.000000')
70747
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (4, 'Oak', 2, '2015-06-18 09:00:00.000000', '2015-06-18 09:00:00.000000')
70748
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (5, 'Oak', 3, '2014-06-18 09:00:00.000000', '2014-06-18 09:00:00.000000')
70749
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (6, 'Oak', 3, '2017-08-18 19:20:43.000000', '2017-08-18 19:20:43.000000')
70750
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (7, 'Sequoia', 1, '2017-08-18 19:20:43.000000', '2017-08-18 19:20:43.000000')
70751
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (8, 'Fir', 1, '2017-08-18 19:20:43.000000', '2017-08-18 19:20:43.000000')
70752
+  (1.0ms) commit transaction
70753
+  (0.1ms) begin transaction
70754
+ --------------------------------------------------------------------------------------------
70755
+ ForestLiana::ValueStatGetterTest: test_Value_stat_getter_with_a_filter_on_a_belongs_to_field
70756
+ --------------------------------------------------------------------------------------------
70757
+  (0.2ms) SELECT DISTINCT COUNT(DISTINCT "belongs_to_fields"."id") FROM "belongs_to_fields" LEFT OUTER JOIN "has_one_fields" ON "has_one_fields"."id" = "belongs_to_fields"."has_one_field_id" LEFT OUTER JOIN "has_many_fields" ON "has_many_fields"."id" = "belongs_to_fields"."has_many_field_id" LEFT OUTER JOIN "has_many_class_name_fields" ON "has_many_class_name_fields"."id" = "belongs_to_fields"."has_many_class_name_field_id" WHERE ("has_one_fields"."id" = '3')
70758
+  (0.1ms) rollback transaction
70759
+  (0.1ms) begin transaction
70760
+ -----------------------------------------------------------------------------
70761
+ ForestLiana::ValueStatGetterTest: test_Value_stat_getter_with_a_simple_filter
70762
+ -----------------------------------------------------------------------------
70763
+  (0.5ms) SELECT DISTINCT COUNT(DISTINCT "boolean_fields"."id") FROM "boolean_fields" WHERE ("boolean_fields"."field" = 1)
70764
+  (0.1ms) rollback transaction
70765
+  (0.7ms) begin transaction
70766
+ ----------------------------------------------------------------------------------
70767
+ ForestLiana::SchemaAdapterTest: test_hasMany_relationhip_with_specified_class_name
70768
+ ----------------------------------------------------------------------------------
70769
+  (0.1ms) rollback transaction
70770
+  (0.0ms) begin transaction
70771
+ -------------------------------------------------------------------------
70772
+ ForestLiana::SchemaAdapterTest: test_String_should_have_the_type_`String`
70773
+ -------------------------------------------------------------------------
70774
+  (0.1ms) rollback transaction
70775
+  (0.1ms) begin transaction
70776
+ -------------------------------------------------------------------------
70777
+ ForestLiana::SchemaAdapterTest: test_DateTime_should_have_the_type_`Date`
70778
+ -------------------------------------------------------------------------
70779
+  (0.1ms) rollback transaction
70780
+  (0.1ms) begin transaction
70781
+ ---------------------------------------------------------
70782
+ ForestLiana::SchemaAdapterTest: test_hasMany_relationship
70783
+ ---------------------------------------------------------
70784
+  (0.0ms) rollback transaction
70785
+  (0.1ms) begin transaction
70786
+ ---------------------------------------------------------------------
70787
+ ForestLiana::SchemaAdapterTest: test_Date_should_have_the_type_`Date`
70788
+ ---------------------------------------------------------------------
70789
+  (0.0ms) rollback transaction
70790
+  (0.0ms) begin transaction
70791
+ ---------------------------------------------------------------------------
70792
+ ForestLiana::SchemaAdapterTest: test_Boolean_should_have_the_type_`Boolean`
70793
+ ---------------------------------------------------------------------------
70794
+  (0.0ms) rollback transaction
70795
+  (0.1ms) begin transaction
70796
+ --------------------------------------------------------------------------
70797
+ ForestLiana::SchemaAdapterTest: test_Decimal_should_have_the_type_`Number`
70798
+ --------------------------------------------------------------------------
70799
+  (0.1ms) rollback transaction
70800
+  (0.1ms) begin transaction
70801
+ ------------------------------------------------------------------------
70802
+ ForestLiana::SchemaAdapterTest: test_Float_should_have_the_type_`Number`
70803
+ ------------------------------------------------------------------------
70804
+  (0.1ms) rollback transaction
70805
+  (0.1ms) begin transaction
70806
+ --------------------------------------------------------
70807
+ ForestLiana::SchemaAdapterTest: test_hasOne_relationship
70808
+ --------------------------------------------------------
70809
+  (0.1ms) rollback transaction
70810
+  (0.1ms) begin transaction
70811
+ --------------------------------------------------------------------------
70812
+ ForestLiana::SchemaAdapterTest: test_Integer_should_have_the_type_`Number`
70813
+ --------------------------------------------------------------------------
70814
+  (0.1ms) rollback transaction
70815
+  (0.1ms) begin transaction
70816
+ -----------------------------------------------------------
70817
+ ForestLiana::SchemaAdapterTest: test_belongsTo_relationship
70818
+ -----------------------------------------------------------
70819
+  (0.1ms) rollback transaction
70820
+  (0.1ms) begin transaction
70821
+ ------------------------------------------------------------------------------------
70822
+ ForestLiana::SchemaAdapterTest: test_belongsTo_relationhip_with_specified_class_name
70823
+ ------------------------------------------------------------------------------------
70824
+  (0.1ms) rollback transaction
70825
+  (0.0ms) begin transaction
70826
+ --------------------------------------------------------------------
70827
+ ForestLiana::ResourcesGetterTest: test_Sort_by_a_has_one_association
70828
+ --------------------------------------------------------------------
70829
+ SQL (0.6ms) SELECT "has_one_fields"."id" AS t0_r0, "belongs_to_fields"."id" AS t1_r0, "belongs_to_fields"."has_one_field_id" AS t1_r1, "belongs_to_fields"."has_many_class_name_field_id" AS t1_r2, "belongs_to_fields"."has_many_field_id" AS t1_r3, "belongs_to_class_name_fields"."id" AS t2_r0, "belongs_to_class_name_fields"."foo_id" AS t2_r1 FROM "has_one_fields" LEFT OUTER JOIN "belongs_to_fields" ON "belongs_to_fields"."has_one_field_id" = "has_one_fields"."id" LEFT OUTER JOIN "belongs_to_class_name_fields" ON "belongs_to_class_name_fields"."foo_id" = "has_one_fields"."id" ORDER BY "belongs_to_fields"."id" DESC LIMIT 10 OFFSET 0
70830
+  (0.1ms) SELECT COUNT(*) FROM "has_one_fields"
70831
+  (0.1ms) rollback transaction
70832
+  (0.1ms) begin transaction
70833
+ -----------------------------------------------------------------------
70834
+ ForestLiana::ResourcesGetterTest: test_Sort_by_a_belongs_to_association
70835
+ -----------------------------------------------------------------------
70836
+ SQL (0.2ms) SELECT "belongs_to_fields"."id" AS t0_r0, "belongs_to_fields"."has_one_field_id" AS t0_r1, "belongs_to_fields"."has_many_class_name_field_id" AS t0_r2, "belongs_to_fields"."has_many_field_id" AS t0_r3, "has_one_fields"."id" AS t1_r0, "has_many_fields"."id" AS t2_r0, "has_many_fields"."has_many_through_field_id" AS t2_r1, "has_many_class_name_fields"."id" AS t3_r0 FROM "belongs_to_fields" LEFT OUTER JOIN "has_one_fields" ON "has_one_fields"."id" = "belongs_to_fields"."has_one_field_id" LEFT OUTER JOIN "has_many_fields" ON "has_many_fields"."id" = "belongs_to_fields"."has_many_field_id" LEFT OUTER JOIN "has_many_class_name_fields" ON "has_many_class_name_fields"."id" = "belongs_to_fields"."has_many_class_name_field_id" ORDER BY "has_one_fields"."id" ASC LIMIT 10 OFFSET 0
70837
+  (0.1ms) SELECT COUNT(*) FROM "belongs_to_fields"
70838
+  (0.1ms) rollback transaction
70839
+  (0.1ms) begin transaction
70840
+ ------------------------------------------------------------------------------------------------------
70841
+ ForestLiana::ResourcesGetterTest: test_Filter_equal_on_an_updated_at_field_of_an_associated_collection
70842
+ ------------------------------------------------------------------------------------------------------
70843
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at = 'Sat Jul 02 2016 11:52:00 GMT-0400 (EDT)') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
70844
+  (0.1ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at = 'Sat Jul 02 2016 11:52:00 GMT-0400 (EDT)')
70845
+  (0.1ms) rollback transaction
70846
+  (0.1ms) begin transaction
70847
+ -----------------------------------------------------------------
70848
+ ForestLiana::ResourcesGetterTest: test_StringField_page_1_size_15
70849
+ -----------------------------------------------------------------
70850
+ SQL (0.1ms) SELECT "string_fields"."id" AS t0_r0, "string_fields"."field" AS t0_r1 FROM "string_fields" ORDER BY string_fields.id DESC LIMIT 15 OFFSET 0
70851
+  (0.1ms) SELECT COUNT(*) FROM "string_fields"
70852
+  (0.1ms) rollback transaction
70853
+  (0.1ms) begin transaction
70854
+ ------------------------------------------------------------------------------------------------
70855
+ ForestLiana::ResourcesGetterTest: test_Filter_on_an_updated_at_field_of_an_associated_collection
70856
+ ------------------------------------------------------------------------------------------------
70857
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
70858
+  (0.2ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC')
70859
+  (0.1ms) rollback transaction
70860
+  (0.1ms) begin transaction
70861
+ -------------------------------------------------------------------------------------------
70862
+ ForestLiana::ResourcesGetterTest: test_Filter_on_an_updated_at_field_of_the_main_collection
70863
+ -------------------------------------------------------------------------------------------
70864
+ SQL (0.2ms) SELECT "owners"."id" AS t0_r0, "owners"."name" AS t0_r1, "owners"."created_at" AS t0_r2, "owners"."updated_at" AS t0_r3 FROM "owners" WHERE ("owners"."updated_at" BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC') ORDER BY owners.created_at DESC LIMIT 10 OFFSET 0
70865
+  (0.1ms) SELECT COUNT(*) FROM "owners" WHERE ("owners"."updated_at" BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC')
70866
+  (0.1ms) rollback transaction
70867
+  (0.1ms) begin transaction
70868
+ --------------------------------------------------------------------
70869
+ ForestLiana::ResourcesGetterTest: test_HasMany_Getter_page_1_size_15
70870
+ --------------------------------------------------------------------
70871
+ Owner Load (0.2ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 1]]
70872
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? [["owner_id", 1]]
70873
+  (0.2ms) SELECT COUNT(DISTINCT count_column) FROM (SELECT "trees"."id" AS count_column FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? LIMIT 15 OFFSET 0) subquery_for_count [["owner_id", 1]]
70874
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? ORDER BY "trees"."id" ASC LIMIT 1 OFFSET 0 [["owner_id", 1]]
70875
+  (0.1ms) rollback transaction
70876
+  (0.1ms) begin transaction
70877
+ -----------------------------------------------------------------
70878
+ ForestLiana::ResourcesGetterTest: test_StringField_page_2_size_10
70879
+ -----------------------------------------------------------------
70880
+ SQL (0.2ms) SELECT "string_fields"."id" AS t0_r0, "string_fields"."field" AS t0_r1 FROM "string_fields" ORDER BY string_fields.id DESC LIMIT 10 OFFSET 10
70881
+  (0.1ms) SELECT COUNT(*) FROM "string_fields"
70882
+  (0.1ms) rollback transaction
70883
+  (0.1ms) begin transaction
70884
+ ------------------------------------------------------------------------------------
70885
+ ForestLiana::ResourcesGetterTest: test_Sort_on_an_ambiguous_field_name_with_a_filter
70886
+ ------------------------------------------------------------------------------------
70887
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.name = 'Arnaud Besnier') ORDER BY trees.name DESC LIMIT 10 OFFSET 0
70888
+  (0.1ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.name = 'Arnaud Besnier')
70889
+  (0.1ms) rollback transaction
70890
+  (0.1ms) begin transaction
70891
+ ----------------------------------------------------------------
70892
+ ForestLiana::ResourcesGetterTest: test_StringField_sort_by_field
70893
+ ----------------------------------------------------------------
70894
+ SQL (0.2ms) SELECT "string_fields"."id" AS t0_r0, "string_fields"."field" AS t0_r1 FROM "string_fields" ORDER BY string_fields.field DESC LIMIT 10 OFFSET 0
70895
+  (0.1ms) SELECT COUNT(*) FROM "string_fields"
70896
+  (0.0ms) rollback transaction
70897
+  (0.0ms) begin transaction
70898
+ -------------------------------------------------------------------------
70899
+ ForestLiana::ResourcesGetterTest: test_HasMany_Getter_with_sort_parameter
70900
+ -------------------------------------------------------------------------
70901
+ Owner Load (0.1ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 1]]
70902
+ SQL (0.1ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? ORDER BY trees.id DESC [["owner_id", 1]]
70903
+  (0.1ms) SELECT COUNT(DISTINCT count_column) FROM (SELECT "trees"."id" AS count_column FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? LIMIT 15 OFFSET 0) subquery_for_count [["owner_id", 1]]
70904
+ SQL (0.1ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? ORDER BY trees.id DESC LIMIT 1 OFFSET 0 [["owner_id", 1]]
70905
+  (0.1ms) rollback transaction
70906
+  (0.1ms) begin transaction
70907
+ ----------------------------------------------------------------
70908
+ ForestLiana::ResourcesGetterTest: test_Filter_on_ambiguous_field
70909
+ ----------------------------------------------------------------
70910
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE ("trees"."created_at" > '2015-06-18 08:00:00') AND (owners.name = 'Arnaud Besnier') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
70911
+  (0.1ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE ("trees"."created_at" > '2015-06-18 08:00:00') AND (owners.name = 'Arnaud Besnier')
70912
+  (0.0ms) rollback transaction
70913
+  (0.1ms) begin transaction
70914
+ -----------------------------------------------------------
70915
+ ForestLiana::ResourcesGetterTest: test_Filter_before_x_days
70916
+ -----------------------------------------------------------
70917
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4 FROM "trees" WHERE ("trees"."created_at" < '2017-08-18 19:19:44 UTC') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
70918
+  (0.1ms) SELECT COUNT(*) FROM "trees" WHERE ("trees"."created_at" < '2017-08-18 19:19:44 UTC')
70919
+ Owner Load (0.1ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 2]]
70920
+  (0.1ms) rollback transaction
70921
+  (0.1ms) begin transaction
70922
+ ---------------------------------------------------------------------------
70923
+ ForestLiana::ResourcesGetterTest: test_HasMany_Getter_with_search_parameter
70924
+ ---------------------------------------------------------------------------
70925
+ Owner Load (0.1ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 1]]
70926
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? AND (LOWER("trees"."name") LIKE '%fir%' OR LOWER("owners"."name") LIKE '%fir%') [["owner_id", 1]]
70927
+  (0.3ms) SELECT COUNT(DISTINCT count_column) FROM (SELECT "trees"."id" AS count_column FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? AND (LOWER("trees"."name") LIKE '%fir%' OR LOWER("owners"."name") LIKE '%fir%') LIMIT 15 OFFSET 0) subquery_for_count [["owner_id", 1]]
70928
+ SQL (0.1ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? AND (LOWER("trees"."name") LIKE '%fir%' OR LOWER("owners"."name") LIKE '%fir%') ORDER BY "trees"."id" ASC LIMIT 1 OFFSET 0 [["owner_id", 1]]
70929
+  (0.1ms) rollback transaction
70930
+  (0.0ms) begin transaction
70931
+ -----------------------------------------------------------------------------------------
70932
+ ForestLiana::PieStatGetterTest: test_Pie_stat_getter_with_an_aggregate_on_a_boolean_field
70933
+ -----------------------------------------------------------------------------------------
70934
+  (0.2ms) SELECT COUNT(*) AS count_all, boolean_fields.field AS boolean_fields_field FROM "boolean_fields" GROUP BY boolean_fields.field ORDER BY count_all DESC
70935
+  (0.1ms) rollback transaction
70936
+  (0.1ms) begin transaction
70937
+ ---------------------------------------------------------------------------------------
70938
+ ForestLiana::PieStatGetterTest: test_Pie_stat_getter_with_an_aggregate_on_a_foreign_key
70939
+ ---------------------------------------------------------------------------------------
70940
+  (0.6ms) SELECT COUNT(DISTINCT "belongs_to_fields"."id") AS count_id, belongs_to_fields.has_one_field_id AS belongs_to_fields_has_one_field_id FROM "belongs_to_fields" LEFT OUTER JOIN "has_one_fields" ON "has_one_fields"."id" = "belongs_to_fields"."has_one_field_id" LEFT OUTER JOIN "has_many_fields" ON "has_many_fields"."id" = "belongs_to_fields"."has_many_field_id" LEFT OUTER JOIN "has_many_class_name_fields" ON "has_many_class_name_fields"."id" = "belongs_to_fields"."has_many_class_name_field_id" GROUP BY belongs_to_fields.has_one_field_id ORDER BY count_id DESC
70941
+  (0.1ms) rollback transaction
70942
+  (0.0ms) begin transaction
70943
+ ---------------------------
70944
+ ForestLianaTest: test_truth
70945
+ ---------------------------
70946
+  (0.0ms) rollback transaction
70947
+  (0.1ms) begin transaction
70948
+ ------------------------------------------------------------------------------------------------------------
70949
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_well_formated_value
70950
+ ------------------------------------------------------------------------------------------------------------
70951
+ SerializeField Load (0.2ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
70952
+  (0.1ms) SAVEPOINT active_record_1
70953
+ SQL (0.4ms) UPDATE "serialize_fields" SET "field" = ? WHERE "serialize_fields"."id" = ? [["field", "---\n- test\n- test\n"], ["id", 1]]
70954
+  (0.1ms) RELEASE SAVEPOINT active_record_1
70955
+  (0.4ms) rollback transaction
70956
+  (0.1ms) begin transaction
70957
+ ---------------------------------------------------------------------------------------------------
70958
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_null_value
70959
+ ---------------------------------------------------------------------------------------------------
70960
+ SerializeField Load (0.1ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
70961
+  (0.0ms) SAVEPOINT active_record_1
70962
+ SQL (0.2ms) UPDATE "serialize_fields" SET "field" = ? WHERE "serialize_fields"."id" = ? [["field", nil], ["id", 1]]
70963
+  (0.0ms) RELEASE SAVEPOINT active_record_1
70964
+  (0.4ms) rollback transaction
70965
+  (0.1ms) begin transaction
70966
+ ---------------------------------------------------------------------------------------------------------
70967
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_bad_format_value
70968
+ ---------------------------------------------------------------------------------------------------------
70969
+ SerializeField Load (0.1ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
70970
+  (0.1ms) rollback transaction
70971
+  (0.1ms) begin transaction
70972
+ ------------------------------------------------------------------------------------------------------
70973
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_missing_value
70974
+ ------------------------------------------------------------------------------------------------------
70975
+ SerializeField Load (0.2ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
70976
+  (0.0ms) SAVEPOINT active_record_1
70977
+  (0.0ms) RELEASE SAVEPOINT active_record_1
70978
+  (0.0ms) rollback transaction
70979
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
70980
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
70981
+  (0.1ms)  SELECT sql
70982
+ FROM sqlite_master
70983
+ WHERE name='index_belongs_to_class_name_fields_on_foo_id' AND type='index'
70984
+ UNION ALL
70985
+ SELECT sql
70986
+ FROM sqlite_temp_master
70987
+ WHERE name='index_belongs_to_class_name_fields_on_foo_id' AND type='index'
70988
+ 
70989
+  (0.1ms) SELECT sql
70990
+ FROM sqlite_master
70991
+ WHERE name='index_belongs_to_fields_on_has_many_field_id' AND type='index'
70992
+ UNION ALL
70993
+ SELECT sql
70994
+ FROM sqlite_temp_master
70995
+ WHERE name='index_belongs_to_fields_on_has_many_field_id' AND type='index'
70996
+
70997
+  (0.2ms)  SELECT sql
70998
+ FROM sqlite_master
70999
+ WHERE name='index_belongs_to_fields_on_has_many_class_name_field_id' AND type='index'
71000
+ UNION ALL
71001
+ SELECT sql
71002
+ FROM sqlite_temp_master
71003
+ WHERE name='index_belongs_to_fields_on_has_many_class_name_field_id' AND type='index'
71004
+ 
71005
+  (0.1ms) SELECT sql
71006
+ FROM sqlite_master
71007
+ WHERE name='index_belongs_to_fields_on_has_one_field_id' AND type='index'
71008
+ UNION ALL
71009
+ SELECT sql
71010
+ FROM sqlite_temp_master
71011
+ WHERE name='index_belongs_to_fields_on_has_one_field_id' AND type='index'
71012
+
71013
+  (0.5ms)  SELECT sql
71014
+ FROM sqlite_master
71015
+ WHERE name='index_has_many_fields_on_has_many_through_field_id' AND type='index'
71016
+ UNION ALL
71017
+ SELECT sql
71018
+ FROM sqlite_temp_master
71019
+ WHERE name='index_has_many_fields_on_has_many_through_field_id' AND type='index'
71020
+ 
71021
+  (0.2ms) SELECT sql
71022
+ FROM sqlite_master
71023
+ WHERE name='index_polymorphic_fields_on_has_one_field_id' AND type='index'
71024
+ UNION ALL
71025
+ SELECT sql
71026
+ FROM sqlite_temp_master
71027
+ WHERE name='index_polymorphic_fields_on_has_one_field_id' AND type='index'
71028
+
71029
+  (0.1ms)  SELECT sql
71030
+ FROM sqlite_master
71031
+ WHERE name='index_trees_on_owner_id' AND type='index'
71032
+ UNION ALL
71033
+ SELECT sql
71034
+ FROM sqlite_temp_master
71035
+ WHERE name='index_trees_on_owner_id' AND type='index'
71036
+ 
71037
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
71038
+  (0.1ms) begin transaction
71039
+ Fixture Delete (1.2ms) DELETE FROM "belongs_to_fields"
71040
+ Fixture Insert (1.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (1, 1, 1)
71041
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (2, 2, 1)
71042
+ Fixture Insert (0.2ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (3, 3, 1)
71043
+ Fixture Insert (0.4ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (4, 4, 2)
71044
+ Fixture Insert (0.2ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (5, 5, 2)
71045
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (6, 6, 2)
71046
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (7, 7, 3)
71047
+ Fixture Insert (0.2ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (8, 8, 3)
71048
+ Fixture Insert (0.2ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (9, 9, 3)
71049
+ Fixture Insert (0.2ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (10, 10, 4)
71050
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (11, 11, 4)
71051
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (12, 12, 4)
71052
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (13, 13, 5)
71053
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (14, 14, 5)
71054
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (15, 15, 5)
71055
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (16, 16, 6)
71056
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (17, 17, 6)
71057
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (18, 18, 6)
71058
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (19, 19, 7)
71059
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (20, 20, 7)
71060
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (21, 21, 7)
71061
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (22, 22, 7)
71062
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (23, 23, 8)
71063
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (24, 24, 8)
71064
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (25, 25, 9)
71065
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (26, 26, 9)
71066
+ Fixture Insert (0.1ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (27, 27, 9)
71067
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (28, 28, 10)
71068
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (29, 29, 10)
71069
+ Fixture Insert (0.0ms) INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (30, 30, 10)
71070
+ Fixture Delete (0.5ms) DELETE FROM "has_many_fields"
71071
+ Fixture Insert (0.1ms) INSERT INTO "has_many_fields" ("id") VALUES (1)
71072
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (2)
71073
+ Fixture Insert (0.1ms) INSERT INTO "has_many_fields" ("id") VALUES (3)
71074
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (4)
71075
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (5, 3)
71076
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (6, 2)
71077
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (7)
71078
+ Fixture Insert (0.1ms) INSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (8, 2)
71079
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (9)
71080
+ Fixture Insert (0.0ms) INSERT INTO "has_many_fields" ("id") VALUES (10)
71081
+ Fixture Delete (0.4ms) DELETE FROM "has_many_through_fields"
71082
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (1)
71083
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (2)
71084
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (3)
71085
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (4)
71086
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (5)
71087
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (6)
71088
+ Fixture Insert (0.0ms) INSERT INTO "has_many_through_fields" ("id") VALUES (7)
71089
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (8)
71090
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (9)
71091
+ Fixture Insert (0.1ms) INSERT INTO "has_many_through_fields" ("id") VALUES (10)
71092
+ Fixture Delete (0.4ms) DELETE FROM "has_one_fields"
71093
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (1)
71094
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (2)
71095
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (3)
71096
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (4)
71097
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (5)
71098
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (6)
71099
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (7)
71100
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (8)
71101
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (9)
71102
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (10)
71103
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (11)
71104
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (12)
71105
+ Fixture Insert (0.2ms) INSERT INTO "has_one_fields" ("id") VALUES (13)
71106
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (14)
71107
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (15)
71108
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (16)
71109
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (17)
71110
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (18)
71111
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (19)
71112
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (20)
71113
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (21)
71114
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (22)
71115
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (23)
71116
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (24)
71117
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (25)
71118
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (26)
71119
+ Fixture Insert (0.0ms) INSERT INTO "has_one_fields" ("id") VALUES (27)
71120
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (28)
71121
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (29)
71122
+ Fixture Insert (0.1ms) INSERT INTO "has_one_fields" ("id") VALUES (30)
71123
+ Fixture Delete (0.3ms) DELETE FROM "owners"
71124
+ Fixture Insert (0.1ms) INSERT INTO "owners" ("id", "name", "created_at", "updated_at") VALUES (1, 'Sandro Munda', '2016-05-30 09:00:00.000000', '2017-06-27 20:00:00.000000')
71125
+ Fixture Insert (0.0ms) INSERT INTO "owners" ("id", "name", "created_at", "updated_at") VALUES (2, 'Arnaud Besnier', '2017-05-02 09:00:00.000000', '2017-06-28 08:00:00.000000')
71126
+ Fixture Insert (0.1ms) INSERT INTO "owners" ("id", "name", "created_at", "updated_at") VALUES (3, 'John Doe', '2015-05-02 09:00:00.000000', '2016-06-28 08:00:00.000000')
71127
+ Fixture Delete (0.1ms) DELETE FROM "serialize_fields"
71128
+ Fixture Insert (0.1ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (1, 'value 1')
71129
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (2, 'value 2')
71130
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (3, 'value 3')
71131
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (4, 'value 4')
71132
+ Fixture Insert (0.0ms) INSERT INTO "serialize_fields" ("id", "field") VALUES (5, 'value 5')
71133
+ Fixture Delete (0.3ms) DELETE FROM "string_fields"
71134
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (1, 'Test 1')
71135
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (2, 'Test 2')
71136
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (3, 'Test 3')
71137
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (4, 'Test 4')
71138
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (5, 'Test 5')
71139
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (6, 'Test 6')
71140
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (7, 'Test 7')
71141
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (8, 'Test 8')
71142
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (9, 'Test 9')
71143
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (10, 'Test 10')
71144
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (11, 'Test 11')
71145
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (12, 'Test 12')
71146
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (13, 'Test 13')
71147
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (14, 'Test 14')
71148
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (15, 'Test 15')
71149
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (16, 'Test 16')
71150
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (17, 'Test 17')
71151
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (18, 'Test 18')
71152
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (19, 'Test 19')
71153
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (20, 'Test 20')
71154
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (21, 'Test 21')
71155
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (22, 'Test 22')
71156
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (23, 'Test 23')
71157
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (24, 'Test 24')
71158
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (25, 'Test 25')
71159
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (26, 'Test 26')
71160
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (27, 'Test 27')
71161
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (28, 'Test 28')
71162
+ Fixture Insert (0.0ms) INSERT INTO "string_fields" ("id", "field") VALUES (29, 'Test 29')
71163
+ Fixture Insert (0.1ms) INSERT INTO "string_fields" ("id", "field") VALUES (30, 'Test 30')
71164
+ Fixture Delete (0.5ms) DELETE FROM "trees"
71165
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (1, 'Oak', 1, '2010-02-11 11:00:00.000000', '2010-02-11 11:00:00.000000')
71166
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (2, 'Mapple', 2, '2010-02-15 21:00:00.000000', '2010-02-15 21:00:00.000000')
71167
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (3, 'Mapple', 2, '2012-04-11 12:00:00.000000', '2012-04-11 12:00:00.000000')
71168
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (4, 'Oak', 2, '2015-06-18 09:00:00.000000', '2015-06-18 09:00:00.000000')
71169
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (5, 'Oak', 3, '2014-06-18 09:00:00.000000', '2014-06-18 09:00:00.000000')
71170
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (6, 'Oak', 3, '2017-08-21 17:12:16.000000', '2017-08-21 17:12:16.000000')
71171
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (7, 'Sequoia', 1, '2017-08-21 17:12:16.000000', '2017-08-21 17:12:16.000000')
71172
+ Fixture Insert (0.1ms) INSERT INTO "trees" ("id", "name", "owner_id", "created_at", "updated_at") VALUES (8, 'Fir', 1, '2017-08-21 17:12:16.000000', '2017-08-21 17:12:16.000000')
71173
+  (1.2ms) commit transaction
71174
+  (0.1ms) begin transaction
71175
+ --------------------------------------------------------------------------------------------
71176
+ ForestLiana::ValueStatGetterTest: test_Value_stat_getter_with_a_filter_on_a_belongs_to_field
71177
+ --------------------------------------------------------------------------------------------
71178
+  (0.2ms) SELECT DISTINCT COUNT(DISTINCT "belongs_to_fields"."id") FROM "belongs_to_fields" LEFT OUTER JOIN "has_one_fields" ON "has_one_fields"."id" = "belongs_to_fields"."has_one_field_id" LEFT OUTER JOIN "has_many_fields" ON "has_many_fields"."id" = "belongs_to_fields"."has_many_field_id" LEFT OUTER JOIN "has_many_class_name_fields" ON "has_many_class_name_fields"."id" = "belongs_to_fields"."has_many_class_name_field_id" WHERE ("has_one_fields"."id" = '3')
71179
+  (0.0ms) rollback transaction
71180
+  (0.0ms) begin transaction
71181
+ -----------------------------------------------------------------------------
71182
+ ForestLiana::ValueStatGetterTest: test_Value_stat_getter_with_a_simple_filter
71183
+ -----------------------------------------------------------------------------
71184
+  (0.4ms) SELECT DISTINCT COUNT(DISTINCT "boolean_fields"."id") FROM "boolean_fields" WHERE ("boolean_fields"."field" = 1)
71185
+  (0.1ms) rollback transaction
71186
+  (0.0ms) begin transaction
71187
+ -------------------------------------------------------------------------
71188
+ ForestLiana::ResourcesGetterTest: test_HasMany_Getter_with_sort_parameter
71189
+ -------------------------------------------------------------------------
71190
+ Owner Load (0.3ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 1]]
71191
+ SQL (0.3ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? ORDER BY trees.id DESC [["owner_id", 1]]
71192
+  (0.2ms) SELECT COUNT(DISTINCT count_column) FROM (SELECT "trees"."id" AS count_column FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? LIMIT 15 OFFSET 0) subquery_for_count [["owner_id", 1]]
71193
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? ORDER BY trees.id DESC LIMIT 1 OFFSET 0 [["owner_id", 1]]
71194
+  (0.1ms) rollback transaction
71195
+  (0.1ms) begin transaction
71196
+ ------------------------------------------------------------------------------------------------------
71197
+ ForestLiana::ResourcesGetterTest: test_Filter_equal_on_an_updated_at_field_of_an_associated_collection
71198
+ ------------------------------------------------------------------------------------------------------
71199
+ SQL (0.4ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at = 'Sat Jul 02 2016 11:52:00 GMT-0400 (EDT)') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
71200
+  (0.2ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at = 'Sat Jul 02 2016 11:52:00 GMT-0400 (EDT)')
71201
+  (0.0ms) rollback transaction
71202
+  (0.1ms) begin transaction
71203
+ -----------------------------------------------------------------
71204
+ ForestLiana::ResourcesGetterTest: test_StringField_page_1_size_15
71205
+ -----------------------------------------------------------------
71206
+ SQL (0.2ms) SELECT "string_fields"."id" AS t0_r0, "string_fields"."field" AS t0_r1 FROM "string_fields" ORDER BY string_fields.id DESC LIMIT 15 OFFSET 0
71207
+  (0.1ms) SELECT COUNT(*) FROM "string_fields"
71208
+  (0.1ms) rollback transaction
71209
+  (0.1ms) begin transaction
71210
+ -----------------------------------------------------------------
71211
+ ForestLiana::ResourcesGetterTest: test_StringField_page_2_size_10
71212
+ -----------------------------------------------------------------
71213
+ SQL (0.1ms) SELECT "string_fields"."id" AS t0_r0, "string_fields"."field" AS t0_r1 FROM "string_fields" ORDER BY string_fields.id DESC LIMIT 10 OFFSET 10
71214
+  (0.0ms) SELECT COUNT(*) FROM "string_fields"
71215
+  (0.0ms) rollback transaction
71216
+  (0.1ms) begin transaction
71217
+ -------------------------------------------------------------------------------------------
71218
+ ForestLiana::ResourcesGetterTest: test_Filter_on_an_updated_at_field_of_the_main_collection
71219
+ -------------------------------------------------------------------------------------------
71220
+ SQL (0.2ms) SELECT "owners"."id" AS t0_r0, "owners"."name" AS t0_r1, "owners"."created_at" AS t0_r2, "owners"."updated_at" AS t0_r3 FROM "owners" WHERE ("owners"."updated_at" BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC') ORDER BY owners.created_at DESC LIMIT 10 OFFSET 0
71221
+  (0.1ms) SELECT COUNT(*) FROM "owners" WHERE ("owners"."updated_at" BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC')
71222
+  (0.0ms) rollback transaction
71223
+  (0.1ms) begin transaction
71224
+ -----------------------------------------------------------------------
71225
+ ForestLiana::ResourcesGetterTest: test_Sort_by_a_belongs_to_association
71226
+ -----------------------------------------------------------------------
71227
+ SQL (0.2ms) SELECT "belongs_to_fields"."id" AS t0_r0, "belongs_to_fields"."has_one_field_id" AS t0_r1, "belongs_to_fields"."has_many_class_name_field_id" AS t0_r2, "belongs_to_fields"."has_many_field_id" AS t0_r3, "has_one_fields"."id" AS t1_r0, "has_many_fields"."id" AS t2_r0, "has_many_fields"."has_many_through_field_id" AS t2_r1, "has_many_class_name_fields"."id" AS t3_r0 FROM "belongs_to_fields" LEFT OUTER JOIN "has_one_fields" ON "has_one_fields"."id" = "belongs_to_fields"."has_one_field_id" LEFT OUTER JOIN "has_many_fields" ON "has_many_fields"."id" = "belongs_to_fields"."has_many_field_id" LEFT OUTER JOIN "has_many_class_name_fields" ON "has_many_class_name_fields"."id" = "belongs_to_fields"."has_many_class_name_field_id" ORDER BY "has_one_fields"."id" ASC LIMIT 10 OFFSET 0
71228
+  (0.1ms) SELECT COUNT(*) FROM "belongs_to_fields"
71229
+  (0.1ms) rollback transaction
71230
+  (0.1ms) begin transaction
71231
+ -----------------------------------------------------------
71232
+ ForestLiana::ResourcesGetterTest: test_Filter_before_x_days
71233
+ -----------------------------------------------------------
71234
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4 FROM "trees" WHERE ("trees"."created_at" < '2017-08-21 17:11:16 UTC') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
71235
+  (0.1ms) SELECT COUNT(*) FROM "trees" WHERE ("trees"."created_at" < '2017-08-21 17:11:16 UTC')
71236
+ Owner Load (0.1ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 2]]
71237
+  (0.1ms) rollback transaction
71238
+  (0.1ms) begin transaction
71239
+ --------------------------------------------------------------------
71240
+ ForestLiana::ResourcesGetterTest: test_HasMany_Getter_page_1_size_15
71241
+ --------------------------------------------------------------------
71242
+ Owner Load (0.1ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 1]]
71243
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? [["owner_id", 1]]
71244
+  (0.1ms) SELECT COUNT(DISTINCT count_column) FROM (SELECT "trees"."id" AS count_column FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? LIMIT 15 OFFSET 0) subquery_for_count [["owner_id", 1]]
71245
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? ORDER BY "trees"."id" ASC LIMIT 1 OFFSET 0 [["owner_id", 1]]
71246
+  (0.1ms) rollback transaction
71247
+  (0.1ms) begin transaction
71248
+ --------------------------------------------------------------------
71249
+ ForestLiana::ResourcesGetterTest: test_Sort_by_a_has_one_association
71250
+ --------------------------------------------------------------------
71251
+ SQL (0.8ms) SELECT "has_one_fields"."id" AS t0_r0, "belongs_to_fields"."id" AS t1_r0, "belongs_to_fields"."has_one_field_id" AS t1_r1, "belongs_to_fields"."has_many_class_name_field_id" AS t1_r2, "belongs_to_fields"."has_many_field_id" AS t1_r3, "belongs_to_class_name_fields"."id" AS t2_r0, "belongs_to_class_name_fields"."foo_id" AS t2_r1 FROM "has_one_fields" LEFT OUTER JOIN "belongs_to_fields" ON "belongs_to_fields"."has_one_field_id" = "has_one_fields"."id" LEFT OUTER JOIN "belongs_to_class_name_fields" ON "belongs_to_class_name_fields"."foo_id" = "has_one_fields"."id" ORDER BY "belongs_to_fields"."id" DESC LIMIT 10 OFFSET 0
71252
+  (0.1ms) SELECT COUNT(*) FROM "has_one_fields"
71253
+  (0.1ms) rollback transaction
71254
+  (0.1ms) begin transaction
71255
+ ----------------------------------------------------------------
71256
+ ForestLiana::ResourcesGetterTest: test_StringField_sort_by_field
71257
+ ----------------------------------------------------------------
71258
+ SQL (0.2ms) SELECT "string_fields"."id" AS t0_r0, "string_fields"."field" AS t0_r1 FROM "string_fields" ORDER BY string_fields.field DESC LIMIT 10 OFFSET 0
71259
+  (0.1ms) SELECT COUNT(*) FROM "string_fields"
71260
+  (0.1ms) rollback transaction
71261
+  (0.1ms) begin transaction
71262
+ ------------------------------------------------------------------------------------------------
71263
+ ForestLiana::ResourcesGetterTest: test_Filter_on_an_updated_at_field_of_an_associated_collection
71264
+ ------------------------------------------------------------------------------------------------
71265
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
71266
+  (0.1ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.updated_at BETWEEN '2016-01-01 08:00:00 UTC' AND '2017-01-01 07:59:59 UTC')
71267
+  (0.0ms) rollback transaction
71268
+  (0.1ms) begin transaction
71269
+ ---------------------------------------------------------------------------
71270
+ ForestLiana::ResourcesGetterTest: test_HasMany_Getter_with_search_parameter
71271
+ ---------------------------------------------------------------------------
71272
+ Owner Load (0.1ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = ? LIMIT 1 [["id", 1]]
71273
+ SQL (0.5ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? AND (LOWER("trees"."name") LIKE '%fir%') [["owner_id", 1]]
71274
+  (0.2ms) SELECT COUNT(DISTINCT count_column) FROM (SELECT "trees"."id" AS count_column FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? AND (LOWER("trees"."name") LIKE '%fir%') LIMIT 15 OFFSET 0) subquery_for_count [["owner_id", 1]]
71275
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE "trees"."owner_id" = ? AND (LOWER("trees"."name") LIKE '%fir%') ORDER BY "trees"."id" ASC LIMIT 1 OFFSET 0 [["owner_id", 1]]
71276
+  (0.1ms) rollback transaction
71277
+  (0.1ms) begin transaction
71278
+ ----------------------------------------------------------------
71279
+ ForestLiana::ResourcesGetterTest: test_Filter_on_ambiguous_field
71280
+ ----------------------------------------------------------------
71281
+ SQL (0.4ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE ("trees"."created_at" > '2015-06-18 08:00:00') AND (owners.name = 'Arnaud Besnier') ORDER BY trees.created_at DESC LIMIT 10 OFFSET 0
71282
+  (0.3ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE ("trees"."created_at" > '2015-06-18 08:00:00') AND (owners.name = 'Arnaud Besnier')
71283
+  (0.1ms) rollback transaction
71284
+  (0.1ms) begin transaction
71285
+ ------------------------------------------------------------------------------------
71286
+ ForestLiana::ResourcesGetterTest: test_Sort_on_an_ambiguous_field_name_with_a_filter
71287
+ ------------------------------------------------------------------------------------
71288
+ SQL (0.2ms) SELECT "trees"."id" AS t0_r0, "trees"."name" AS t0_r1, "trees"."owner_id" AS t0_r2, "trees"."created_at" AS t0_r3, "trees"."updated_at" AS t0_r4, "owners"."id" AS t1_r0, "owners"."name" AS t1_r1, "owners"."created_at" AS t1_r2, "owners"."updated_at" AS t1_r3 FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.name = 'Arnaud Besnier') ORDER BY trees.name DESC LIMIT 10 OFFSET 0
71289
+  (0.2ms) SELECT COUNT(DISTINCT "trees"."id") FROM "trees" LEFT OUTER JOIN "owners" ON "owners"."id" = "trees"."owner_id" WHERE (owners.name = 'Arnaud Besnier')
71290
+  (0.0ms) rollback transaction
71291
+  (0.0ms) begin transaction
71292
+ ---------------------------------------------------------------------------
71293
+ ForestLiana::SchemaAdapterTest: test_Boolean_should_have_the_type_`Boolean`
71294
+ ---------------------------------------------------------------------------
71295
+  (0.1ms) rollback transaction
71296
+  (0.1ms) begin transaction
71297
+ --------------------------------------------------------------------------
71298
+ ForestLiana::SchemaAdapterTest: test_Integer_should_have_the_type_`Number`
71299
+ --------------------------------------------------------------------------
71300
+  (0.0ms) rollback transaction
71301
+  (0.1ms) begin transaction
71302
+ ---------------------------------------------------------------------
71303
+ ForestLiana::SchemaAdapterTest: test_Date_should_have_the_type_`Date`
71304
+ ---------------------------------------------------------------------
71305
+  (0.1ms) rollback transaction
71306
+  (0.1ms) begin transaction
71307
+ ------------------------------------------------------------------------------------
71308
+ ForestLiana::SchemaAdapterTest: test_belongsTo_relationhip_with_specified_class_name
71309
+ ------------------------------------------------------------------------------------
71310
+  (0.1ms) rollback transaction
71311
+  (0.1ms) begin transaction
71312
+ -----------------------------------------------------------
71313
+ ForestLiana::SchemaAdapterTest: test_belongsTo_relationship
71314
+ -----------------------------------------------------------
71315
+  (0.1ms) rollback transaction
71316
+  (0.1ms) begin transaction
71317
+ -------------------------------------------------------------------------
71318
+ ForestLiana::SchemaAdapterTest: test_String_should_have_the_type_`String`
71319
+ -------------------------------------------------------------------------
71320
+  (0.1ms) rollback transaction
71321
+  (0.1ms) begin transaction
71322
+ ----------------------------------------------------------------------------------
71323
+ ForestLiana::SchemaAdapterTest: test_hasMany_relationhip_with_specified_class_name
71324
+ ----------------------------------------------------------------------------------
71325
+  (0.1ms) rollback transaction
71326
+  (0.1ms) begin transaction
71327
+ --------------------------------------------------------------------------
71328
+ ForestLiana::SchemaAdapterTest: test_Decimal_should_have_the_type_`Number`
71329
+ --------------------------------------------------------------------------
71330
+  (0.1ms) rollback transaction
71331
+  (0.1ms) begin transaction
71332
+ -------------------------------------------------------------------------
71333
+ ForestLiana::SchemaAdapterTest: test_DateTime_should_have_the_type_`Date`
71334
+ -------------------------------------------------------------------------
71335
+  (0.1ms) rollback transaction
71336
+  (0.1ms) begin transaction
71337
+ ---------------------------------------------------------
71338
+ ForestLiana::SchemaAdapterTest: test_hasMany_relationship
71339
+ ---------------------------------------------------------
71340
+  (0.1ms) rollback transaction
71341
+  (0.1ms) begin transaction
71342
+ ------------------------------------------------------------------------
71343
+ ForestLiana::SchemaAdapterTest: test_Float_should_have_the_type_`Number`
71344
+ ------------------------------------------------------------------------
71345
+  (0.0ms) rollback transaction
71346
+  (0.1ms) begin transaction
71347
+ --------------------------------------------------------
71348
+ ForestLiana::SchemaAdapterTest: test_hasOne_relationship
71349
+ --------------------------------------------------------
71350
+  (0.1ms) rollback transaction
71351
+  (0.1ms) begin transaction
71352
+ ---------------------------
71353
+ ForestLianaTest: test_truth
71354
+ ---------------------------
71355
+  (0.1ms) rollback transaction
71356
+  (0.1ms) begin transaction
71357
+ ------------------------------------------------------------------------------------------------------------
71358
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_well_formated_value
71359
+ ------------------------------------------------------------------------------------------------------------
71360
+ SerializeField Load (0.2ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
71361
+  (0.1ms) SAVEPOINT active_record_1
71362
+ SQL (0.4ms) UPDATE "serialize_fields" SET "field" = ? WHERE "serialize_fields"."id" = ? [["field", "---\n- test\n- test\n"], ["id", 1]]
71363
+  (0.0ms) RELEASE SAVEPOINT active_record_1
71364
+  (0.6ms) rollback transaction
71365
+  (0.1ms) begin transaction
71366
+ ------------------------------------------------------------------------------------------------------
71367
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_missing_value
71368
+ ------------------------------------------------------------------------------------------------------
71369
+ SerializeField Load (0.1ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
71370
+  (0.0ms) SAVEPOINT active_record_1
71371
+  (0.0ms) RELEASE SAVEPOINT active_record_1
71372
+  (0.0ms) rollback transaction
71373
+  (0.1ms) begin transaction
71374
+ ---------------------------------------------------------------------------------------------------------
71375
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_bad_format_value
71376
+ ---------------------------------------------------------------------------------------------------------
71377
+ SerializeField Load (0.1ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
71378
+  (0.1ms) rollback transaction
71379
+  (0.1ms) begin transaction
71380
+ ---------------------------------------------------------------------------------------------------
71381
+ ForestLiana::ResourceUpdaterTest: test_Update_a_record_on_a_"serialize"_attribute_with_a_null_value
71382
+ ---------------------------------------------------------------------------------------------------
71383
+ SerializeField Load (0.1ms) SELECT "serialize_fields".* FROM "serialize_fields" WHERE "serialize_fields"."id" = ? LIMIT 1 [["id", 1]]
71384
+  (0.1ms) SAVEPOINT active_record_1
71385
+ SQL (0.4ms) UPDATE "serialize_fields" SET "field" = ? WHERE "serialize_fields"."id" = ? [["field", nil], ["id", 1]]
71386
+  (0.1ms) RELEASE SAVEPOINT active_record_1
71387
+  (0.8ms) rollback transaction
71388
+  (0.2ms) begin transaction
71389
+ -----------------------------------------------------------------------------------------
71390
+ ForestLiana::PieStatGetterTest: test_Pie_stat_getter_with_an_aggregate_on_a_boolean_field
71391
+ -----------------------------------------------------------------------------------------
71392
+  (0.2ms) SELECT COUNT(*) AS count_all, boolean_fields.field AS boolean_fields_field FROM "boolean_fields" GROUP BY boolean_fields.field ORDER BY count_all DESC
71393
+  (0.1ms) rollback transaction
71394
+  (0.1ms) begin transaction
71395
+ ---------------------------------------------------------------------------------------
71396
+ ForestLiana::PieStatGetterTest: test_Pie_stat_getter_with_an_aggregate_on_a_foreign_key
71397
+ ---------------------------------------------------------------------------------------
71398
+  (1.2ms) SELECT COUNT(DISTINCT "belongs_to_fields"."id") AS count_id, belongs_to_fields.has_one_field_id AS belongs_to_fields_has_one_field_id FROM "belongs_to_fields" LEFT OUTER JOIN "has_one_fields" ON "has_one_fields"."id" = "belongs_to_fields"."has_one_field_id" LEFT OUTER JOIN "has_many_fields" ON "has_many_fields"."id" = "belongs_to_fields"."has_many_field_id" LEFT OUTER JOIN "has_many_class_name_fields" ON "has_many_class_name_fields"."id" = "belongs_to_fields"."has_many_class_name_field_id" GROUP BY belongs_to_fields.has_one_field_id ORDER BY count_id DESC
71399
+  (0.1ms) rollback transaction