squint 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/squint.rb +3 -11
- data/lib/squint/version.rb +1 -1
- data/test/dummy/log/test.log +826 -0
- data/test/squint_test.rb +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 861884fea5cb7280a63e0759876ae2aae7a00750
|
4
|
+
data.tar.gz: 6e2a4f8b024b165ef215e3a135063fdb235002f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8403702ac72aaef517fb97ef8042f9bb28170cddf4edbe6e11c655993f29301206d2bd7b70bf2c943fb5f6ef7f782141d044acd1f61ad539995575b7d4c238b
|
7
|
+
data.tar.gz: 7f355faa0113834c322e9c13093ff556914bfff0438e809144eedfb0efe729b72cc6174f72fa348281c03ea65739ba5921720ca414029cbccc32bd502afb1fb3
|
data/lib/squint.rb
CHANGED
@@ -14,11 +14,7 @@ module Squint
|
|
14
14
|
def build_where(*args)
|
15
15
|
save_args = []
|
16
16
|
reln = args.inject([]) do |memo, arg|
|
17
|
-
if
|
18
|
-
save_args << arg
|
19
|
-
memo += super(save_args)
|
20
|
-
save_args = []
|
21
|
-
elsif arg.is_a?(Hash)
|
17
|
+
if arg.is_a?(Hash)
|
22
18
|
arg.keys.each do |key|
|
23
19
|
if arg[key].is_a?(Hash) && HASH_DATA_COLUMNS[key]
|
24
20
|
memo << hash_field_reln(key => arg[key])
|
@@ -27,15 +23,11 @@ module Squint
|
|
27
23
|
end
|
28
24
|
end
|
29
25
|
elsif arg.present?
|
30
|
-
|
31
|
-
save_args << arg
|
32
|
-
else
|
33
|
-
memo += super(arg)
|
34
|
-
end
|
26
|
+
save_args << arg
|
35
27
|
end
|
36
28
|
memo
|
37
29
|
end
|
38
|
-
reln += super(save_args) unless save_args.empty?
|
30
|
+
reln += super(*save_args) unless save_args.empty?
|
39
31
|
reln
|
40
32
|
end
|
41
33
|
|
data/lib/squint/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -29426,3 +29426,829 @@ SquintTest: test_storext_jsonb_attributes_is_composeable_in_one_where
|
|
29426
29426
|
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))
|
29427
29427
|
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) AND "posts"."id" = $1[0m [["id", 113629430]]
|
29428
29428
|
[1m[35m (0.1ms)[0m ROLLBACK
|
29429
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
29430
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL
|
29431
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
29432
|
+
[1m[35mFixture Delete (0.4ms)[0m DELETE FROM "posts"
|
29433
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "created_at", "updated_at", "id") VALUES ('Post One Title', 'Post One Body', '{"referer":"http://example.com/one"}', '"referer"=>"http://example.com/one"', '2017-06-30 21:33:11', '2017-06-30 21:33:11', 980190962)[0m
|
29434
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "created_at", "updated_at", "id") VALUES ('Post Two Title', 'Post Two Body', '{"referer":"http://example.com/two"}', '"referer"=>"http://example.com/two"', '2017-06-30 21:33:11', '2017-06-30 21:33:11', 298486374)
|
29435
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "created_at", "updated_at", "id") VALUES ('Post Three Title', 'Post Three Body', '2017-06-30 21:33:11', '2017-06-30 21:33:11', 113629430)[0m
|
29436
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext title', 'With Storext title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"35124"}', '"hstore_zip_code"=>"35124"', '2017-06-30 21:33:11', '2017-06-30 21:33:11', 1031054186)
|
29437
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext friends title', 'With Storext friends title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36081","jsonb_friend_count":10}', '"hstore_zip_code"=>"36081", "hstore_friend_count"=>"10"', '2017-06-30 21:33:11', '2017-06-30 21:33:11', 433859201)[0m
|
29438
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is awesome title', 'With Storext is awesome title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_awesome":false}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_awesome"=>"false"', '2017-06-30 21:33:11', '2017-06-30 21:33:11', 996585442)
|
29439
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is aweesome not default title', 'With Storext is awesome not default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_awesome":true}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_awesome"=>"true"', '2017-06-30 21:33:11', '2017-06-30 21:33:11', 423633666)[0m
|
29440
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is present default title', 'With Storext is present default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_present":"nil"}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_present"=>"nil"', '2017-06-30 21:33:11', '2017-06-30 21:33:11', 813641888)
|
29441
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is present not default title', 'With Storext is present not default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_present":"Heck Yeah"}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_present"=>"Heck Yeah"', '2017-06-30 21:33:11', '2017-06-30 21:33:11', 199613990)[0m
|
29442
|
+
[1m[35m (0.1ms)[0m COMMIT
|
29443
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL[0m
|
29444
|
+
[1m[35m (0.2ms)[0m BEGIN
|
29445
|
+
---------------------------------------------------------------------------------------------------
|
29446
|
+
SquintTest: test_Doesn't_find_records_for_request_info_missing_element_that_doesn't_exist_populated
|
29447
|
+
---------------------------------------------------------------------------------------------------
|
29448
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'not_there' = 'any value will do'[0m
|
29449
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29450
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29451
|
+
-----------------------------------------------------------------
|
29452
|
+
SquintTest: test_detects_default_integer_storext_jsonb_attributes
|
29453
|
+
-----------------------------------------------------------------
|
29454
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts"
|
29455
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '0' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_friend_count') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_friend_count') = FALSE))[0m
|
29456
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
29457
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
29458
|
+
------------------------------------------
|
29459
|
+
SquintTest: test_handles_string_parameters
|
29460
|
+
------------------------------------------
|
29461
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '11' AND (posts.title = 'With Storext is aweesome not default title')
|
29462
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
29463
|
+
[1m[35m (0.2ms)[0m BEGIN
|
29464
|
+
----------------------------------------------------------------------
|
29465
|
+
SquintTest: test_storext_hstore_attributes_is_composeable_in_one_where
|
29466
|
+
----------------------------------------------------------------------
|
29467
|
+
[1m[36mPost Load (0.4ms)[0m [1mSELECT "posts".* FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) ORDER BY "posts"."id" ASC LIMIT 1[0m
|
29468
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))
|
29469
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) AND "posts"."id" = $1[0m [["id", 113629430]]
|
29470
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29471
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29472
|
+
-------------------------------------------------------------------------------------------------
|
29473
|
+
SquintTest: test_Doesn't_find_records_for_properties_missing_element_that_doesn't_exist_populated
|
29474
|
+
-------------------------------------------------------------------------------------------------
|
29475
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'not_there' = 'any value will do'
|
29476
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
29477
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29478
|
+
---------------------------------------------------------
|
29479
|
+
SquintTest: test_detects_present_storext_jsonb_attributes
|
29480
|
+
---------------------------------------------------------
|
29481
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '35124'[0m
|
29482
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29483
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
29484
|
+
---------------------------------------------
|
29485
|
+
SquintTest: test_generates_SQL_for_properties
|
29486
|
+
---------------------------------------------
|
29487
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29488
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29489
|
+
---------------------------------------------------------------------------
|
29490
|
+
SquintTest: test_storext_jsonb_attributes_is_composeable_in_multiple_wheres
|
29491
|
+
---------------------------------------------------------------------------
|
29492
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) ORDER BY "posts"."id" ASC LIMIT 1
|
29493
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))[0m
|
29494
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) AND "posts"."id" = $1 [["id", 113629430]]
|
29495
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
29496
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29497
|
+
---------------------------------------------------------
|
29498
|
+
SquintTest: test_detects_default_storext_jsonb_attributes
|
29499
|
+
---------------------------------------------------------
|
29500
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29501
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))
|
29502
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29503
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29504
|
+
----------------------------------------------------------------------------------
|
29505
|
+
SquintTest: test_finds_records_for_request_info_populated_with_array_including_nil
|
29506
|
+
----------------------------------------------------------------------------------
|
29507
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."request_info"->>'referer' = 'http://example.com/one' OR "posts"."request_info"->>'referer' IS NULL)[0m
|
29508
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29509
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29510
|
+
---------------------------------------------------------------------
|
29511
|
+
SquintTest: test_detects_default_Falseclass_storext_hstore_attributes
|
29512
|
+
---------------------------------------------------------------------
|
29513
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
|
29514
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_is_awesome' = 'false' OR ((exist("posts"."storext_hstore_attributes", 'hstore_is_awesome') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_is_awesome') IS NULL))[0m
|
29515
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29516
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29517
|
+
--------------------------------------------------------
|
29518
|
+
SquintTest: test_finds_records_for_request_info_with_nil
|
29519
|
+
--------------------------------------------------------
|
29520
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' IS NULL
|
29521
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29522
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29523
|
+
------------------------------------------------------------------
|
29524
|
+
SquintTest: test_detects_default_integer_storext_hstore_attributes
|
29525
|
+
------------------------------------------------------------------
|
29526
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29527
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_friend_count' = '0' OR ((exist("posts"."storext_hstore_attributes", 'hstore_friend_count') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_friend_count') IS NULL))
|
29528
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29529
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29530
|
+
--------------------------------------------------------------------
|
29531
|
+
SquintTest: test_detects_default_Falseclass_storext_jsonb_attributes
|
29532
|
+
--------------------------------------------------------------------
|
29533
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29534
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_is_awesome' = 'false' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_is_awesome') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_is_awesome') = FALSE))
|
29535
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29536
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29537
|
+
-----------------------------------------------------------------
|
29538
|
+
SquintTest: test_detects_present_integer_storext_jsonb_attributes
|
29539
|
+
-----------------------------------------------------------------
|
29540
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '10'[0m
|
29541
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29542
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29543
|
+
------------------------------------------------------------------
|
29544
|
+
SquintTest: test_detects_present_integer_storext_hstore_attributes
|
29545
|
+
------------------------------------------------------------------
|
29546
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."storext_hstore_attributes"->'hstore_friend_count' = '10'
|
29547
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29548
|
+
[1m[35m (0.0ms)[0m BEGIN
|
29549
|
+
-----------------------------------------------------------------------------------------
|
29550
|
+
SquintTest: test_finds_records_for_properties_missing_element_that_doesn't_exist_with_nil
|
29551
|
+
-----------------------------------------------------------------------------------------
|
29552
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29553
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'not_there' IS NULL
|
29554
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29555
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29556
|
+
-------------------------------------------------------
|
29557
|
+
SquintTest: test_finds_records_for_properties_populated
|
29558
|
+
-------------------------------------------------------
|
29559
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' = 'http://example.com/one'[0m
|
29560
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29561
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29562
|
+
---------------------------------------------------------------------
|
29563
|
+
SquintTest: test_storext_jsonb_attributes_is_composeable_in_one_where
|
29564
|
+
---------------------------------------------------------------------
|
29565
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) ORDER BY "posts"."id" ASC LIMIT 1
|
29566
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))[0m
|
29567
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) AND "posts"."id" = $1 [["id", 113629430]]
|
29568
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29569
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29570
|
+
-------------------------------------------------------------------------------------------
|
29571
|
+
SquintTest: test_finds_records_for_request_info_missing_element_that_doesn't_exist_with_nil
|
29572
|
+
-------------------------------------------------------------------------------------------
|
29573
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29574
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'not_there' IS NULL
|
29575
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29576
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29577
|
+
----------------------------------------------------------
|
29578
|
+
SquintTest: test_detects_default_storext_hstore_attributes
|
29579
|
+
----------------------------------------------------------
|
29580
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29581
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))
|
29582
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29583
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29584
|
+
--------------------------------------------------------------------------------
|
29585
|
+
SquintTest: test_finds_records_for_properties_populated_with_array_including_nil
|
29586
|
+
--------------------------------------------------------------------------------
|
29587
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."properties"->'referer' = 'http://example.com/one' OR "posts"."properties"->'referer' IS NULL)[0m
|
29588
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29589
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29590
|
+
------------------------------------------------------------------
|
29591
|
+
SquintTest: test_finds_records_for_properties_populated_with_array
|
29592
|
+
------------------------------------------------------------------
|
29593
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' IN ('http://example.com/one', 'http://example.com/two')
|
29594
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29595
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29596
|
+
-----------------------------------------------
|
29597
|
+
SquintTest: test_generates_SQL_for_request_info
|
29598
|
+
-----------------------------------------------
|
29599
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29600
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29601
|
+
----------------------------------------------------------
|
29602
|
+
SquintTest: test_detects_present_storext_hstore_attributes
|
29603
|
+
----------------------------------------------------------
|
29604
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."storext_hstore_attributes"->'hstore_zip_code' = '35124'[0m
|
29605
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29606
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29607
|
+
---------------------------------------------------------
|
29608
|
+
SquintTest: test_finds_records_for_request_info_populated
|
29609
|
+
---------------------------------------------------------
|
29610
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' = 'http://example.com/one'
|
29611
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29612
|
+
[1m[35m (0.0ms)[0m BEGIN
|
29613
|
+
----------------------------------------------------------------------------
|
29614
|
+
SquintTest: test_storext_hstore_attributes_is_composeable_in_multiple_wheres
|
29615
|
+
----------------------------------------------------------------------------
|
29616
|
+
[1m[36mPost Load (0.2ms)[0m [1mSELECT "posts".* FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) ORDER BY "posts"."id" ASC LIMIT 1[0m
|
29617
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))
|
29618
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) AND "posts"."id" = $1[0m [["id", 113629430]]
|
29619
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29620
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29621
|
+
--------------------------------------------------------------------
|
29622
|
+
SquintTest: test_finds_records_for_request_info_populated_with_array
|
29623
|
+
--------------------------------------------------------------------
|
29624
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' IN ('http://example.com/one', 'http://example.com/two')
|
29625
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29626
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29627
|
+
------------------------------------------------------
|
29628
|
+
SquintTest: test_finds_records_for_properties_with_nil
|
29629
|
+
------------------------------------------------------
|
29630
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' IS NULL[0m
|
29631
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29632
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
29633
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL
|
29634
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
29635
|
+
[1m[35mFixture Delete (0.4ms)[0m DELETE FROM "posts"
|
29636
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "created_at", "updated_at", "id") VALUES ('Post One Title', 'Post One Body', '{"referer":"http://example.com/one"}', '"referer"=>"http://example.com/one"', '2017-06-30 21:37:36', '2017-06-30 21:37:36', 980190962)[0m
|
29637
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "created_at", "updated_at", "id") VALUES ('Post Two Title', 'Post Two Body', '{"referer":"http://example.com/two"}', '"referer"=>"http://example.com/two"', '2017-06-30 21:37:36', '2017-06-30 21:37:36', 298486374)
|
29638
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "created_at", "updated_at", "id") VALUES ('Post Three Title', 'Post Three Body', '2017-06-30 21:37:36', '2017-06-30 21:37:36', 113629430)[0m
|
29639
|
+
[1m[35mFixture Insert (0.3ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext title', 'With Storext title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"35124"}', '"hstore_zip_code"=>"35124"', '2017-06-30 21:37:36', '2017-06-30 21:37:36', 1031054186)
|
29640
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext friends title', 'With Storext friends title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36081","jsonb_friend_count":10}', '"hstore_zip_code"=>"36081", "hstore_friend_count"=>"10"', '2017-06-30 21:37:36', '2017-06-30 21:37:36', 433859201)[0m
|
29641
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is awesome title', 'With Storext is awesome title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_awesome":false}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_awesome"=>"false"', '2017-06-30 21:37:36', '2017-06-30 21:37:36', 996585442)
|
29642
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is aweesome not default title', 'With Storext is awesome not default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_awesome":true}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_awesome"=>"true"', '2017-06-30 21:37:36', '2017-06-30 21:37:36', 423633666)[0m
|
29643
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is present default title', 'With Storext is present default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_present":"nil"}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_present"=>"nil"', '2017-06-30 21:37:36', '2017-06-30 21:37:36', 813641888)
|
29644
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is present not default title', 'With Storext is present not default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_present":"Heck Yeah"}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_present"=>"Heck Yeah"', '2017-06-30 21:37:36', '2017-06-30 21:37:36', 199613990)[0m
|
29645
|
+
[1m[35m (0.1ms)[0m COMMIT
|
29646
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL[0m
|
29647
|
+
[1m[35m (0.2ms)[0m BEGIN
|
29648
|
+
-----------------------------------------------------------------
|
29649
|
+
SquintTest: test_detects_present_integer_storext_jsonb_attributes
|
29650
|
+
-----------------------------------------------------------------
|
29651
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '10'[0m
|
29652
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
29653
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
29654
|
+
-------------------------------------------------------------------------------------------------
|
29655
|
+
SquintTest: test_Doesn't_find_records_for_properties_missing_element_that_doesn't_exist_populated
|
29656
|
+
-------------------------------------------------------------------------------------------------
|
29657
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'not_there' = 'any value will do'
|
29658
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29659
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29660
|
+
------------------------------------------------------------------
|
29661
|
+
SquintTest: test_finds_records_for_properties_populated_with_array
|
29662
|
+
------------------------------------------------------------------
|
29663
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' IN ('http://example.com/one', 'http://example.com/two')[0m
|
29664
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29665
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29666
|
+
-------------------------------------------------------------------------------------------
|
29667
|
+
SquintTest: test_finds_records_for_request_info_missing_element_that_doesn't_exist_with_nil
|
29668
|
+
-------------------------------------------------------------------------------------------
|
29669
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts"
|
29670
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'not_there' IS NULL[0m
|
29671
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29672
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29673
|
+
---------------------------------------------------------------------------
|
29674
|
+
SquintTest: test_storext_jsonb_attributes_is_composeable_in_multiple_wheres
|
29675
|
+
---------------------------------------------------------------------------
|
29676
|
+
[1m[35mPost Load (0.5ms)[0m SELECT "posts".* FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) ORDER BY "posts"."id" ASC LIMIT 1
|
29677
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))[0m
|
29678
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) AND "posts"."id" = $1 [["id", 113629430]]
|
29679
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29680
|
+
[1m[35m (0.2ms)[0m BEGIN
|
29681
|
+
---------------------------------------------------------------------
|
29682
|
+
SquintTest: test_storext_jsonb_attributes_is_composeable_in_one_where
|
29683
|
+
---------------------------------------------------------------------
|
29684
|
+
[1m[36mPost Load (0.4ms)[0m [1mSELECT "posts".* FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) ORDER BY "posts"."id" ASC LIMIT 1[0m
|
29685
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))
|
29686
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) AND "posts"."id" = $1[0m [["id", 113629430]]
|
29687
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29688
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29689
|
+
----------------------------------------------------------
|
29690
|
+
SquintTest: test_detects_default_storext_hstore_attributes
|
29691
|
+
----------------------------------------------------------
|
29692
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts"
|
29693
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))[0m
|
29694
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
29695
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
29696
|
+
---------------------------------------------------------
|
29697
|
+
SquintTest: test_detects_present_storext_jsonb_attributes
|
29698
|
+
---------------------------------------------------------
|
29699
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '35124'
|
29700
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29701
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29702
|
+
---------------------------------------------
|
29703
|
+
SquintTest: test_generates_SQL_for_properties
|
29704
|
+
---------------------------------------------
|
29705
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29706
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29707
|
+
-----------------------------------------------------------------------------------------
|
29708
|
+
SquintTest: test_finds_records_for_properties_missing_element_that_doesn't_exist_with_nil
|
29709
|
+
-----------------------------------------------------------------------------------------
|
29710
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29711
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'not_there' IS NULL
|
29712
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29713
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29714
|
+
-----------------------------------------------
|
29715
|
+
SquintTest: test_generates_SQL_for_request_info
|
29716
|
+
-----------------------------------------------
|
29717
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29718
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29719
|
+
----------------------------------------------------------
|
29720
|
+
SquintTest: test_detects_present_storext_hstore_attributes
|
29721
|
+
----------------------------------------------------------
|
29722
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."storext_hstore_attributes"->'hstore_zip_code' = '35124'[0m
|
29723
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29724
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29725
|
+
-------------------------------------------------------
|
29726
|
+
SquintTest: test_finds_records_for_properties_populated
|
29727
|
+
-------------------------------------------------------
|
29728
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' = 'http://example.com/one'
|
29729
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29730
|
+
[1m[35m (0.0ms)[0m BEGIN
|
29731
|
+
--------------------------------------------------------
|
29732
|
+
SquintTest: test_finds_records_for_request_info_with_nil
|
29733
|
+
--------------------------------------------------------
|
29734
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' IS NULL[0m
|
29735
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29736
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29737
|
+
--------------------------------------------------------------------
|
29738
|
+
SquintTest: test_detects_default_Falseclass_storext_jsonb_attributes
|
29739
|
+
--------------------------------------------------------------------
|
29740
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts"
|
29741
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_is_awesome' = 'false' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_is_awesome') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_is_awesome') = FALSE))[0m
|
29742
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29743
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29744
|
+
---------------------------------------------------------
|
29745
|
+
SquintTest: test_finds_records_for_request_info_populated
|
29746
|
+
---------------------------------------------------------
|
29747
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' = 'http://example.com/one'
|
29748
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29749
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29750
|
+
------------------------------------------
|
29751
|
+
SquintTest: test_handles_string_parameters
|
29752
|
+
------------------------------------------
|
29753
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '11' AND (posts.title = 'With Storext is aweesome not default title')[0m
|
29754
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29755
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29756
|
+
----------------------------------------------------------------------
|
29757
|
+
SquintTest: test_storext_hstore_attributes_is_composeable_in_one_where
|
29758
|
+
----------------------------------------------------------------------
|
29759
|
+
[1m[35mPost Load (0.3ms)[0m SELECT "posts".* FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) ORDER BY "posts"."id" ASC LIMIT 1
|
29760
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))[0m
|
29761
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) AND "posts"."id" = $1 [["id", 113629430]]
|
29762
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29763
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29764
|
+
------------------------------------------------------------------
|
29765
|
+
SquintTest: test_detects_default_integer_storext_hstore_attributes
|
29766
|
+
------------------------------------------------------------------
|
29767
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29768
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_friend_count' = '0' OR ((exist("posts"."storext_hstore_attributes", 'hstore_friend_count') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_friend_count') IS NULL))
|
29769
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29770
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29771
|
+
------------------------------------------------------
|
29772
|
+
SquintTest: test_finds_records_for_properties_with_nil
|
29773
|
+
------------------------------------------------------
|
29774
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' IS NULL[0m
|
29775
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29776
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
29777
|
+
---------------------------------------------------------------------
|
29778
|
+
SquintTest: test_detects_default_Falseclass_storext_hstore_attributes
|
29779
|
+
---------------------------------------------------------------------
|
29780
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
|
29781
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_is_awesome' = 'false' OR ((exist("posts"."storext_hstore_attributes", 'hstore_is_awesome') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_is_awesome') IS NULL))[0m
|
29782
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29783
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29784
|
+
---------------------------------------------------------------------------------------------------
|
29785
|
+
SquintTest: test_Doesn't_find_records_for_request_info_missing_element_that_doesn't_exist_populated
|
29786
|
+
---------------------------------------------------------------------------------------------------
|
29787
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'not_there' = 'any value will do'
|
29788
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29789
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29790
|
+
--------------------------------------------------------------------------------
|
29791
|
+
SquintTest: test_finds_records_for_properties_populated_with_array_including_nil
|
29792
|
+
--------------------------------------------------------------------------------
|
29793
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."properties"->'referer' = 'http://example.com/one' OR "posts"."properties"->'referer' IS NULL)[0m
|
29794
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29795
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29796
|
+
------------------------------------------------------------------
|
29797
|
+
SquintTest: test_detects_present_integer_storext_hstore_attributes
|
29798
|
+
------------------------------------------------------------------
|
29799
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."storext_hstore_attributes"->'hstore_friend_count' = '10'
|
29800
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29801
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29802
|
+
-----------------------------------------------------------------
|
29803
|
+
SquintTest: test_detects_default_integer_storext_jsonb_attributes
|
29804
|
+
-----------------------------------------------------------------
|
29805
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29806
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '0' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_friend_count') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_friend_count') = FALSE))
|
29807
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29808
|
+
[1m[35m (0.0ms)[0m BEGIN
|
29809
|
+
---------------------------------------------------------
|
29810
|
+
SquintTest: test_detects_default_storext_jsonb_attributes
|
29811
|
+
---------------------------------------------------------
|
29812
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29813
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))
|
29814
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29815
|
+
[1m[35m (0.0ms)[0m BEGIN
|
29816
|
+
----------------------------------------------------------------------------------
|
29817
|
+
SquintTest: test_finds_records_for_request_info_populated_with_array_including_nil
|
29818
|
+
----------------------------------------------------------------------------------
|
29819
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."request_info"->>'referer' = 'http://example.com/one' OR "posts"."request_info"->>'referer' IS NULL)[0m
|
29820
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29821
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
29822
|
+
----------------------------------------------------------------------------
|
29823
|
+
SquintTest: test_storext_hstore_attributes_is_composeable_in_multiple_wheres
|
29824
|
+
----------------------------------------------------------------------------
|
29825
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) ORDER BY "posts"."id" ASC LIMIT 1
|
29826
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))[0m
|
29827
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) AND "posts"."id" = $1 [["id", 113629430]]
|
29828
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29829
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29830
|
+
--------------------------------------------------------------------
|
29831
|
+
SquintTest: test_finds_records_for_request_info_populated_with_array
|
29832
|
+
--------------------------------------------------------------------
|
29833
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' IN ('http://example.com/one', 'http://example.com/two')[0m
|
29834
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29835
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
29836
|
+
[1m[35m (0.4ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL
|
29837
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
29838
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "posts"
|
29839
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "created_at", "updated_at", "id") VALUES ('Post One Title', 'Post One Body', '{"referer":"http://example.com/one"}', '"referer"=>"http://example.com/one"', '2017-06-30 21:45:52', '2017-06-30 21:45:52', 980190962)[0m
|
29840
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "created_at", "updated_at", "id") VALUES ('Post Two Title', 'Post Two Body', '{"referer":"http://example.com/two"}', '"referer"=>"http://example.com/two"', '2017-06-30 21:45:52', '2017-06-30 21:45:52', 298486374)
|
29841
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "created_at", "updated_at", "id") VALUES ('Post Three Title', 'Post Three Body', '2017-06-30 21:45:52', '2017-06-30 21:45:52', 113629430)[0m
|
29842
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext title', 'With Storext title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"35124"}', '"hstore_zip_code"=>"35124"', '2017-06-30 21:45:52', '2017-06-30 21:45:52', 1031054186)
|
29843
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext friends title', 'With Storext friends title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36081","jsonb_friend_count":10}', '"hstore_zip_code"=>"36081", "hstore_friend_count"=>"10"', '2017-06-30 21:45:52', '2017-06-30 21:45:52', 433859201)[0m
|
29844
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is awesome title', 'With Storext is awesome title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_awesome":false}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_awesome"=>"false"', '2017-06-30 21:45:52', '2017-06-30 21:45:52', 996585442)
|
29845
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is aweesome not default title', 'With Storext is awesome not default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_awesome":true}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_awesome"=>"true"', '2017-06-30 21:45:52', '2017-06-30 21:45:52', 423633666)[0m
|
29846
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is present default title', 'With Storext is present default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_present":"nil"}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_present"=>"nil"', '2017-06-30 21:45:52', '2017-06-30 21:45:52', 813641888)
|
29847
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is present not default title', 'With Storext is present not default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_present":"Heck Yeah"}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_present"=>"Heck Yeah"', '2017-06-30 21:45:52', '2017-06-30 21:45:52', 199613990)[0m
|
29848
|
+
[1m[35m (0.1ms)[0m COMMIT
|
29849
|
+
[1m[36m (0.1ms)[0m [1mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL[0m
|
29850
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29851
|
+
---------------------------------------------------------------------
|
29852
|
+
SquintTest: test_storext_jsonb_attributes_is_composeable_in_one_where
|
29853
|
+
---------------------------------------------------------------------
|
29854
|
+
[1m[36mPost Load (0.5ms)[0m [1mSELECT "posts".* FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) ORDER BY "posts"."id" ASC LIMIT 1[0m
|
29855
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))
|
29856
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) AND "posts"."id" = $1[0m [["id", 113629430]]
|
29857
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29858
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
29859
|
+
------------------------------------------------------------------
|
29860
|
+
SquintTest: test_detects_default_integer_storext_hstore_attributes
|
29861
|
+
------------------------------------------------------------------
|
29862
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
|
29863
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_friend_count' = '0' OR ((exist("posts"."storext_hstore_attributes", 'hstore_friend_count') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_friend_count') IS NULL))[0m
|
29864
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29865
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29866
|
+
----------------------------------------------------------
|
29867
|
+
SquintTest: test_detects_present_storext_hstore_attributes
|
29868
|
+
----------------------------------------------------------
|
29869
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."storext_hstore_attributes"->'hstore_zip_code' = '35124'
|
29870
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
29871
|
+
[1m[35m (0.0ms)[0m BEGIN
|
29872
|
+
-----------------------------------------------------------------------------------------
|
29873
|
+
SquintTest: test_finds_records_for_properties_missing_element_that_doesn't_exist_with_nil
|
29874
|
+
-----------------------------------------------------------------------------------------
|
29875
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29876
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'not_there' IS NULL
|
29877
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29878
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29879
|
+
--------------------------------------------------------
|
29880
|
+
SquintTest: test_finds_records_for_request_info_with_nil
|
29881
|
+
--------------------------------------------------------
|
29882
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' IS NULL[0m
|
29883
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29884
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29885
|
+
---------------------------------------------------------------------------
|
29886
|
+
SquintTest: test_storext_jsonb_attributes_is_composeable_in_multiple_wheres
|
29887
|
+
---------------------------------------------------------------------------
|
29888
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) ORDER BY "posts"."id" ASC LIMIT 1
|
29889
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))[0m
|
29890
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) AND "posts"."id" = $1 [["id", 113629430]]
|
29891
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29892
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29893
|
+
----------------------------------------------------------------------------------
|
29894
|
+
SquintTest: test_finds_records_for_request_info_populated_with_array_including_nil
|
29895
|
+
----------------------------------------------------------------------------------
|
29896
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."request_info"->>'referer' = 'http://example.com/one' OR "posts"."request_info"->>'referer' IS NULL)[0m
|
29897
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29898
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29899
|
+
---------------------------------------------------------
|
29900
|
+
SquintTest: test_finds_records_for_request_info_populated
|
29901
|
+
---------------------------------------------------------
|
29902
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' = 'http://example.com/one'
|
29903
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29904
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29905
|
+
---------------------------------------------
|
29906
|
+
SquintTest: test_generates_SQL_for_properties
|
29907
|
+
---------------------------------------------
|
29908
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29909
|
+
[1m[35m (0.0ms)[0m BEGIN
|
29910
|
+
---------------------------------------------------------
|
29911
|
+
SquintTest: test_detects_default_storext_jsonb_attributes
|
29912
|
+
---------------------------------------------------------
|
29913
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29914
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))
|
29915
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29916
|
+
[1m[35m (0.0ms)[0m BEGIN
|
29917
|
+
-----------------------------------------------------
|
29918
|
+
SquintTest: test_handles_multiple_non-hash_parameters
|
29919
|
+
-----------------------------------------------------
|
29920
|
+
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = $1 LIMIT 1[0m [["id", 423633666]]
|
29921
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '11' AND (posts.id between 423633666 and 423633667)
|
29922
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29923
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29924
|
+
-------------------------------------------------------------------------------------------
|
29925
|
+
SquintTest: test_finds_records_for_request_info_missing_element_that_doesn't_exist_with_nil
|
29926
|
+
-------------------------------------------------------------------------------------------
|
29927
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
29928
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'not_there' IS NULL
|
29929
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29930
|
+
[1m[35m (0.0ms)[0m BEGIN
|
29931
|
+
-----------------------------------------------
|
29932
|
+
SquintTest: test_generates_SQL_for_request_info
|
29933
|
+
-----------------------------------------------
|
29934
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
29935
|
+
[1m[35m (0.0ms)[0m BEGIN
|
29936
|
+
------------------------------------------
|
29937
|
+
SquintTest: test_handles_string_parameters
|
29938
|
+
------------------------------------------
|
29939
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '11' AND (posts.title = 'With Storext is aweesome not default title')[0m
|
29940
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29941
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29942
|
+
----------------------------------------------------------
|
29943
|
+
SquintTest: test_detects_default_storext_hstore_attributes
|
29944
|
+
----------------------------------------------------------
|
29945
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
|
29946
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))[0m
|
29947
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29948
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
29949
|
+
------------------------------------------------------------------
|
29950
|
+
SquintTest: test_detects_present_integer_storext_hstore_attributes
|
29951
|
+
------------------------------------------------------------------
|
29952
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."storext_hstore_attributes"->'hstore_friend_count' = '10'
|
29953
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29954
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29955
|
+
------------------------------------------------------------------
|
29956
|
+
SquintTest: test_finds_records_for_properties_populated_with_array
|
29957
|
+
------------------------------------------------------------------
|
29958
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' IN ('http://example.com/one', 'http://example.com/two')[0m
|
29959
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29960
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
29961
|
+
-------------------------------------------------------------------------------------------------
|
29962
|
+
SquintTest: test_Doesn't_find_records_for_properties_missing_element_that_doesn't_exist_populated
|
29963
|
+
-------------------------------------------------------------------------------------------------
|
29964
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'not_there' = 'any value will do'
|
29965
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29966
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29967
|
+
---------------------------------------------------------------------------------------------------
|
29968
|
+
SquintTest: test_Doesn't_find_records_for_request_info_missing_element_that_doesn't_exist_populated
|
29969
|
+
---------------------------------------------------------------------------------------------------
|
29970
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'not_there' = 'any value will do'[0m
|
29971
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
29972
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
29973
|
+
---------------------------------------------------------------------
|
29974
|
+
SquintTest: test_detects_default_Falseclass_storext_hstore_attributes
|
29975
|
+
---------------------------------------------------------------------
|
29976
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
|
29977
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_is_awesome' = 'false' OR ((exist("posts"."storext_hstore_attributes", 'hstore_is_awesome') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_is_awesome') IS NULL))[0m
|
29978
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29979
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
29980
|
+
-----------------------------------------------------------------
|
29981
|
+
SquintTest: test_detects_default_integer_storext_jsonb_attributes
|
29982
|
+
-----------------------------------------------------------------
|
29983
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts"
|
29984
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '0' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_friend_count') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_friend_count') = FALSE))[0m
|
29985
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
29986
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
29987
|
+
----------------------------------------------------------------------
|
29988
|
+
SquintTest: test_storext_hstore_attributes_is_composeable_in_one_where
|
29989
|
+
----------------------------------------------------------------------
|
29990
|
+
[1m[35mPost Load (0.3ms)[0m SELECT "posts".* FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) ORDER BY "posts"."id" ASC LIMIT 1
|
29991
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))[0m
|
29992
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) AND "posts"."id" = $1 [["id", 113629430]]
|
29993
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
29994
|
+
[1m[35m (0.1ms)[0m BEGIN
|
29995
|
+
-----------------------------------------------------------------
|
29996
|
+
SquintTest: test_detects_present_integer_storext_jsonb_attributes
|
29997
|
+
-----------------------------------------------------------------
|
29998
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '10'[0m
|
29999
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30000
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
30001
|
+
---------------------------------------------------------
|
30002
|
+
SquintTest: test_detects_present_storext_jsonb_attributes
|
30003
|
+
---------------------------------------------------------
|
30004
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '35124'
|
30005
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30006
|
+
[1m[35m (0.0ms)[0m BEGIN
|
30007
|
+
--------------------------------------------------------------------------------
|
30008
|
+
SquintTest: test_finds_records_for_properties_populated_with_array_including_nil
|
30009
|
+
--------------------------------------------------------------------------------
|
30010
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."properties"->'referer' = 'http://example.com/one' OR "posts"."properties"->'referer' IS NULL)[0m
|
30011
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30012
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
30013
|
+
----------------------------------------------------------------------------
|
30014
|
+
SquintTest: test_storext_hstore_attributes_is_composeable_in_multiple_wheres
|
30015
|
+
----------------------------------------------------------------------------
|
30016
|
+
[1m[35mPost Load (0.3ms)[0m SELECT "posts".* FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) ORDER BY "posts"."id" ASC LIMIT 1
|
30017
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))[0m
|
30018
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) AND "posts"."id" = $1 [["id", 113629430]]
|
30019
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30020
|
+
[1m[35m (0.0ms)[0m BEGIN
|
30021
|
+
-------------------------------------------------------
|
30022
|
+
SquintTest: test_finds_records_for_properties_populated
|
30023
|
+
-------------------------------------------------------
|
30024
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' = 'http://example.com/one'[0m
|
30025
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30026
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
30027
|
+
------------------------------------------------------
|
30028
|
+
SquintTest: test_finds_records_for_properties_with_nil
|
30029
|
+
------------------------------------------------------
|
30030
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' IS NULL
|
30031
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30032
|
+
[1m[35m (0.1ms)[0m BEGIN
|
30033
|
+
--------------------------------------------------------------------
|
30034
|
+
SquintTest: test_finds_records_for_request_info_populated_with_array
|
30035
|
+
--------------------------------------------------------------------
|
30036
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' IN ('http://example.com/one', 'http://example.com/two')[0m
|
30037
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30038
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
30039
|
+
--------------------------------------------------------------------
|
30040
|
+
SquintTest: test_detects_default_Falseclass_storext_jsonb_attributes
|
30041
|
+
--------------------------------------------------------------------
|
30042
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
|
30043
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_is_awesome' = 'false' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_is_awesome') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_is_awesome') = FALSE))[0m
|
30044
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30045
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
30046
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "posts" DISABLE TRIGGER ALL
|
30047
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
30048
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "posts"
|
30049
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "created_at", "updated_at", "id") VALUES ('Post One Title', 'Post One Body', '{"referer":"http://example.com/one"}', '"referer"=>"http://example.com/one"', '2017-06-30 21:48:47', '2017-06-30 21:48:47', 980190962)[0m
|
30050
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "created_at", "updated_at", "id") VALUES ('Post Two Title', 'Post Two Body', '{"referer":"http://example.com/two"}', '"referer"=>"http://example.com/two"', '2017-06-30 21:48:47', '2017-06-30 21:48:47', 298486374)
|
30051
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "created_at", "updated_at", "id") VALUES ('Post Three Title', 'Post Three Body', '2017-06-30 21:48:47', '2017-06-30 21:48:47', 113629430)[0m
|
30052
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext title', 'With Storext title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"35124"}', '"hstore_zip_code"=>"35124"', '2017-06-30 21:48:47', '2017-06-30 21:48:47', 1031054186)
|
30053
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext friends title', 'With Storext friends title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36081","jsonb_friend_count":10}', '"hstore_zip_code"=>"36081", "hstore_friend_count"=>"10"', '2017-06-30 21:48:47', '2017-06-30 21:48:47', 433859201)[0m
|
30054
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is awesome title', 'With Storext is awesome title', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_awesome":false}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_awesome"=>"false"', '2017-06-30 21:48:47', '2017-06-30 21:48:47', 996585442)
|
30055
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is aweesome not default title', 'With Storext is awesome not default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_awesome":true}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_awesome"=>"true"', '2017-06-30 21:48:47', '2017-06-30 21:48:47', 423633666)[0m
|
30056
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is present default title', 'With Storext is present default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_present":"nil"}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_present"=>"nil"', '2017-06-30 21:48:47', '2017-06-30 21:48:47', 813641888)
|
30057
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "posts" ("title", "body", "request_info", "properties", "storext_jsonb_attributes", "storext_hstore_attributes", "created_at", "updated_at", "id") VALUES ('With Storext is present not default title', 'With Storext is present not default body', '{"referer":"http://example.com/random"}', '"referer"=>"http://example.com/random"', '{"jsonb_zip_code":"36085","jsonb_friend_count":11,"jsonb_is_present":"Heck Yeah"}', '"hstore_zip_code"=>"36085", "hstore_friend_count"=>"11", "hstore_is_present"=>"Heck Yeah"', '2017-06-30 21:48:47', '2017-06-30 21:48:47', 199613990)[0m
|
30058
|
+
[1m[35m (0.2ms)[0m COMMIT
|
30059
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "posts" ENABLE TRIGGER ALL[0m
|
30060
|
+
[1m[35m (0.1ms)[0m BEGIN
|
30061
|
+
--------------------------------------------------------------------
|
30062
|
+
SquintTest: test_detects_default_Falseclass_storext_jsonb_attributes
|
30063
|
+
--------------------------------------------------------------------
|
30064
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
30065
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_is_awesome' = 'false' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_is_awesome') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_is_awesome') = FALSE))
|
30066
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30067
|
+
[1m[35m (0.2ms)[0m BEGIN
|
30068
|
+
---------------------------------------------------------
|
30069
|
+
SquintTest: test_finds_records_for_request_info_populated
|
30070
|
+
---------------------------------------------------------
|
30071
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' = 'http://example.com/one'[0m
|
30072
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30073
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
30074
|
+
---------------------------------------------------------------------
|
30075
|
+
SquintTest: test_detects_default_Falseclass_storext_hstore_attributes
|
30076
|
+
---------------------------------------------------------------------
|
30077
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
|
30078
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_is_awesome' = 'false' OR ((exist("posts"."storext_hstore_attributes", 'hstore_is_awesome') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_is_awesome') IS NULL))[0m
|
30079
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
30080
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
30081
|
+
-----------------------------------------------------------------
|
30082
|
+
SquintTest: test_detects_default_integer_storext_jsonb_attributes
|
30083
|
+
-----------------------------------------------------------------
|
30084
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
|
30085
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '0' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_friend_count') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_friend_count') = FALSE))[0m
|
30086
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30087
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
30088
|
+
----------------------------------------------------------
|
30089
|
+
SquintTest: test_detects_present_storext_hstore_attributes
|
30090
|
+
----------------------------------------------------------
|
30091
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."storext_hstore_attributes"->'hstore_zip_code' = '35124'
|
30092
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30093
|
+
[1m[35m (0.1ms)[0m BEGIN
|
30094
|
+
-----------------------------------------------------------------------------------------
|
30095
|
+
SquintTest: test_finds_records_for_properties_missing_element_that_doesn't_exist_with_nil
|
30096
|
+
-----------------------------------------------------------------------------------------
|
30097
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
30098
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'not_there' IS NULL
|
30099
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30100
|
+
[1m[35m (0.0ms)[0m BEGIN
|
30101
|
+
---------------------------------------------------------------------------------------------------
|
30102
|
+
SquintTest: test_Doesn't_find_records_for_request_info_missing_element_that_doesn't_exist_populated
|
30103
|
+
---------------------------------------------------------------------------------------------------
|
30104
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'not_there' = 'any value will do'[0m
|
30105
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30106
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
30107
|
+
---------------------------------------------------------
|
30108
|
+
SquintTest: test_detects_present_storext_jsonb_attributes
|
30109
|
+
---------------------------------------------------------
|
30110
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '35124'
|
30111
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30112
|
+
[1m[35m (0.0ms)[0m BEGIN
|
30113
|
+
-------------------------------------------------------------------------------------------
|
30114
|
+
SquintTest: test_finds_records_for_request_info_missing_element_that_doesn't_exist_with_nil
|
30115
|
+
-------------------------------------------------------------------------------------------
|
30116
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts"[0m
|
30117
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'not_there' IS NULL
|
30118
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30119
|
+
[1m[35m (0.0ms)[0m BEGIN
|
30120
|
+
-----------------------------------------------
|
30121
|
+
SquintTest: test_generates_SQL_for_request_info
|
30122
|
+
-----------------------------------------------
|
30123
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
30124
|
+
[1m[35m (0.0ms)[0m BEGIN
|
30125
|
+
---------------------------------------------------------------------------
|
30126
|
+
SquintTest: test_storext_jsonb_attributes_is_composeable_in_multiple_wheres
|
30127
|
+
---------------------------------------------------------------------------
|
30128
|
+
[1m[36mPost Load (0.4ms)[0m [1mSELECT "posts".* FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) ORDER BY "posts"."id" ASC LIMIT 1[0m
|
30129
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))
|
30130
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) AND "posts"."id" = $1[0m [["id", 113629430]]
|
30131
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30132
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
30133
|
+
---------------------------------------------
|
30134
|
+
SquintTest: test_generates_SQL_for_properties
|
30135
|
+
---------------------------------------------
|
30136
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30137
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
30138
|
+
----------------------------------------------------------
|
30139
|
+
SquintTest: test_detects_default_storext_hstore_attributes
|
30140
|
+
----------------------------------------------------------
|
30141
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts"
|
30142
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))[0m
|
30143
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
30144
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
30145
|
+
-----------------------------------------------------
|
30146
|
+
SquintTest: test_handles_multiple_non-hash_parameters
|
30147
|
+
-----------------------------------------------------
|
30148
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = $1 LIMIT 1 [["id", 423633666]]
|
30149
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '11' AND (posts.id between 423633666 and 423633667)[0m
|
30150
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30151
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
30152
|
+
-----------------------------------------------------------------
|
30153
|
+
SquintTest: test_detects_present_integer_storext_jsonb_attributes
|
30154
|
+
-----------------------------------------------------------------
|
30155
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '10'
|
30156
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30157
|
+
[1m[35m (0.1ms)[0m BEGIN
|
30158
|
+
----------------------------------------------------------------------
|
30159
|
+
SquintTest: test_storext_hstore_attributes_is_composeable_in_one_where
|
30160
|
+
----------------------------------------------------------------------
|
30161
|
+
[1m[36mPost Load (0.2ms)[0m [1mSELECT "posts".* FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) ORDER BY "posts"."id" ASC LIMIT 1[0m
|
30162
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))
|
30163
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) AND "posts"."id" = $1[0m [["id", 113629430]]
|
30164
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30165
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
30166
|
+
---------------------------------------------------------------------
|
30167
|
+
SquintTest: test_storext_jsonb_attributes_is_composeable_in_one_where
|
30168
|
+
---------------------------------------------------------------------
|
30169
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) ORDER BY "posts"."id" ASC LIMIT 1
|
30170
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))[0m
|
30171
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE)) AND "posts"."id" = $1 [["id", 113629430]]
|
30172
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30173
|
+
[1m[35m (0.1ms)[0m BEGIN
|
30174
|
+
------------------------------------------
|
30175
|
+
SquintTest: test_handles_string_parameters
|
30176
|
+
------------------------------------------
|
30177
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."storext_jsonb_attributes"->>'jsonb_friend_count' = '11' AND (posts.title = 'With Storext is aweesome not default title')[0m
|
30178
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30179
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
30180
|
+
--------------------------------------------------------------------------------
|
30181
|
+
SquintTest: test_finds_records_for_properties_populated_with_array_including_nil
|
30182
|
+
--------------------------------------------------------------------------------
|
30183
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."properties"->'referer' = 'http://example.com/one' OR "posts"."properties"->'referer' IS NULL)
|
30184
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30185
|
+
[1m[35m (0.0ms)[0m BEGIN
|
30186
|
+
----------------------------------------------------------------------------------
|
30187
|
+
SquintTest: test_finds_records_for_request_info_populated_with_array_including_nil
|
30188
|
+
----------------------------------------------------------------------------------
|
30189
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."request_info"->>'referer' = 'http://example.com/one' OR "posts"."request_info"->>'referer' IS NULL)[0m
|
30190
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30191
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
30192
|
+
--------------------------------------------------------------------
|
30193
|
+
SquintTest: test_finds_records_for_request_info_populated_with_array
|
30194
|
+
--------------------------------------------------------------------
|
30195
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' IN ('http://example.com/one', 'http://example.com/two')
|
30196
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30197
|
+
[1m[35m (0.0ms)[0m BEGIN
|
30198
|
+
------------------------------------------------------
|
30199
|
+
SquintTest: test_finds_records_for_properties_with_nil
|
30200
|
+
------------------------------------------------------
|
30201
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' IS NULL[0m
|
30202
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30203
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
30204
|
+
----------------------------------------------------------------------------
|
30205
|
+
SquintTest: test_storext_hstore_attributes_is_composeable_in_multiple_wheres
|
30206
|
+
----------------------------------------------------------------------------
|
30207
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) ORDER BY "posts"."id" ASC LIMIT 1
|
30208
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL))[0m
|
30209
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_zip_code' = '90210' OR ((exist("posts"."storext_hstore_attributes", 'hstore_zip_code') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_zip_code') IS NULL)) AND "posts"."id" = $1 [["id", 113629430]]
|
30210
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30211
|
+
[1m[35m (0.1ms)[0m BEGIN
|
30212
|
+
------------------------------------------------------------------
|
30213
|
+
SquintTest: test_detects_present_integer_storext_hstore_attributes
|
30214
|
+
------------------------------------------------------------------
|
30215
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."storext_hstore_attributes"->'hstore_friend_count' = '10'[0m
|
30216
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30217
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
30218
|
+
-------------------------------------------------------
|
30219
|
+
SquintTest: test_finds_records_for_properties_populated
|
30220
|
+
-------------------------------------------------------
|
30221
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' = 'http://example.com/one'
|
30222
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30223
|
+
[1m[35m (0.0ms)[0m BEGIN
|
30224
|
+
--------------------------------------------------------
|
30225
|
+
SquintTest: test_finds_records_for_request_info_with_nil
|
30226
|
+
--------------------------------------------------------
|
30227
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."request_info"->>'referer' IS NULL[0m
|
30228
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30229
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
30230
|
+
------------------------------------------------------------------
|
30231
|
+
SquintTest: test_finds_records_for_properties_populated_with_array
|
30232
|
+
------------------------------------------------------------------
|
30233
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'referer' IN ('http://example.com/one', 'http://example.com/two')
|
30234
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
30235
|
+
[1m[35m (0.1ms)[0m BEGIN
|
30236
|
+
-------------------------------------------------------------------------------------------------
|
30237
|
+
SquintTest: test_Doesn't_find_records_for_properties_missing_element_that_doesn't_exist_populated
|
30238
|
+
-------------------------------------------------------------------------------------------------
|
30239
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE "posts"."properties"->'not_there' = 'any value will do'[0m
|
30240
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30241
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
30242
|
+
------------------------------------------------------------------
|
30243
|
+
SquintTest: test_detects_default_integer_storext_hstore_attributes
|
30244
|
+
------------------------------------------------------------------
|
30245
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
|
30246
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_hstore_attributes"->'hstore_friend_count' = '0' OR ((exist("posts"."storext_hstore_attributes", 'hstore_friend_count') = FALSE) OR exist("posts"."storext_hstore_attributes", 'hstore_friend_count') IS NULL))[0m
|
30247
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
30248
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
30249
|
+
---------------------------------------------------------
|
30250
|
+
SquintTest: test_detects_default_storext_jsonb_attributes
|
30251
|
+
---------------------------------------------------------
|
30252
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
|
30253
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "posts" WHERE ("posts"."storext_jsonb_attributes"->>'jsonb_zip_code' = '90210' OR (("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') IS NULL OR ("posts"."storext_jsonb_attributes" ? 'jsonb_zip_code') = FALSE))[0m
|
30254
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
data/test/squint_test.rb
CHANGED
@@ -107,4 +107,13 @@ class SquintTest < ActiveSupport::TestCase
|
|
107
107
|
assert_equal 1, reln.count
|
108
108
|
end
|
109
109
|
end
|
110
|
+
test "handles multiple non-hash parameters" do
|
111
|
+
reln = Post.where(storext_jsonb_attributes: { "jsonb_friend_count": 11 }).
|
112
|
+
where("posts.id between ? and ?",
|
113
|
+
posts(:with_storext_is_awesome_not_default).id,
|
114
|
+
posts(:with_storext_is_awesome_not_default).id + 1)
|
115
|
+
assert_nothing_raised do
|
116
|
+
assert_equal 1, reln.count
|
117
|
+
end
|
118
|
+
end
|
110
119
|
end
|