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