dbee-active_record 2.0.2 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +13 -12
- data/.ruby-version +1 -1
- data/.travis.yml +3 -10
- data/CHANGELOG.md +22 -0
- data/dbee-active_record.gemspec +14 -6
- data/exe/.gitkeep +0 -0
- data/lib/dbee/providers/active_record_provider/expression_builder.rb +55 -24
- data/lib/dbee/providers/active_record_provider/maker.rb +37 -0
- data/lib/dbee/providers/active_record_provider/{expression_builder/constraint_maker.rb → makers/constraint.rb} +12 -12
- data/lib/dbee/providers/active_record_provider/{expression_builder/order_maker.rb → makers/order.rb} +9 -9
- data/lib/dbee/providers/active_record_provider/makers/select.rb +81 -0
- data/lib/dbee/providers/active_record_provider/makers/where.rb +91 -0
- data/lib/dbee/providers/active_record_provider/version.rb +1 -1
- data/spec/db_helper.rb +134 -14
- data/spec/dbee/providers/active_record_provider/expression_builder_spec.rb +117 -0
- data/spec/dbee/providers/active_record_provider_spec.rb +101 -3
- data/spec/fixtures/active_record_snapshots/one_table_empty_query.yaml +10 -0
- data/spec/fixtures/active_record_snapshots/one_table_query_with_filters.yaml +24 -16
- data/spec/fixtures/active_record_snapshots/two_table_query_with_aggregation.yaml +71 -0
- data/spec/fixtures/active_record_snapshots/two_table_query_with_pivoting.yaml +88 -0
- data/spec/fixtures/models.yaml +20 -0
- data/spec/spec_helper.rb +4 -0
- metadata +33 -19
- data/lib/dbee/providers/active_record_provider/expression_builder/select_maker.rb +0 -33
- data/lib/dbee/providers/active_record_provider/expression_builder/where_maker.rb +0 -56
@@ -0,0 +1,10 @@
|
|
1
|
+
model_name: Patients
|
2
|
+
query:
|
3
|
+
sqlite_readable: |+
|
4
|
+
SELECT "patients".* FROM "patients" "patients"
|
5
|
+
sqlite_not_readable: |+
|
6
|
+
SELECT "t0".* FROM "patients" "t0"
|
7
|
+
mysql_readable: |+
|
8
|
+
SELECT `patients`.* FROM `patients` `patients`
|
9
|
+
mysql_not_readable: |+
|
10
|
+
SELECT `t0`.* FROM `patients` `t0`
|
@@ -45,6 +45,10 @@ query:
|
|
45
45
|
- 'Netflix'
|
46
46
|
- 'Hulu'
|
47
47
|
key_path: name
|
48
|
+
- type: not_equals
|
49
|
+
value:
|
50
|
+
- 'YouTube Super Video'
|
51
|
+
key_path: name
|
48
52
|
- type: not_contain
|
49
53
|
value:
|
50
54
|
- 'tfli'
|
@@ -59,67 +63,71 @@ sqlite_readable: |+
|
|
59
63
|
SELECT "theaters"."id" AS 'ID #',
|
60
64
|
"theaters"."name" AS 'name'
|
61
65
|
FROM "theaters" "theaters"
|
62
|
-
WHERE
|
66
|
+
WHERE "theaters"."name" IN ('AMC', 'Regal') AND
|
63
67
|
"theaters"."name" LIKE 'A%' AND
|
64
68
|
"theaters"."name" LIKE '%m%' AND
|
65
69
|
"theaters"."active" = 'false' AND
|
66
|
-
(
|
67
|
-
(
|
70
|
+
("theaters"."active" IS NULL OR "theaters"."active" IN ('t', 'f')) AND
|
71
|
+
("theaters"."inspected" IS NULL OR "theaters"."inspected" IN ('f', 't')) AND
|
68
72
|
"theaters"."created_at" <= '2019-03-04' AND
|
69
73
|
"theaters"."created_at" < '2018-03-04' AND
|
70
74
|
"theaters"."created_at" >= '2001-03-04' AND
|
71
75
|
"theaters"."created_at" > '2002-03-04' AND
|
72
|
-
|
76
|
+
"theaters"."name" NOT IN ('Netflix', 'Hulu') AND
|
77
|
+
"theaters"."name" != 'YouTube Super Video' AND
|
73
78
|
("theaters"."name" NOT LIKE '%tfli%' OR "theaters"."name" NOT LIKE '%ul%') AND
|
74
79
|
("theaters"."name" NOT LIKE 'netf%' OR "theaters"."name" NOT LIKE 'hu%')
|
75
80
|
sqlite_not_readable: |+
|
76
81
|
SELECT "t0"."id" AS 'c0',
|
77
82
|
"t0"."name" AS 'c1'
|
78
83
|
FROM "theaters" "t0"
|
79
|
-
WHERE
|
84
|
+
WHERE "t0"."name" IN ('AMC', 'Regal') AND
|
80
85
|
"t0"."name" LIKE 'A%' AND
|
81
86
|
"t0"."name" LIKE '%m%' AND
|
82
87
|
"t0"."active" = 'false' AND
|
83
|
-
(
|
84
|
-
(
|
88
|
+
("t0"."active" IS NULL OR "t0"."active" IN ('t', 'f')) AND
|
89
|
+
("t0"."inspected" IS NULL OR "t0"."inspected" IN ('f', 't')) AND
|
85
90
|
"t0"."created_at" <= '2019-03-04' AND
|
86
91
|
"t0"."created_at" < '2018-03-04' AND
|
87
92
|
"t0"."created_at" >= '2001-03-04' AND
|
88
93
|
"t0"."created_at" > '2002-03-04' AND
|
89
|
-
|
94
|
+
"t0"."name" NOT IN ('Netflix', 'Hulu') AND
|
95
|
+
"t0"."name" != 'YouTube Super Video' AND
|
90
96
|
("t0"."name" NOT LIKE '%tfli%' OR "t0"."name" NOT LIKE '%ul%') AND
|
91
97
|
("t0"."name" NOT LIKE 'netf%' OR "t0"."name" NOT LIKE 'hu%')
|
92
98
|
mysql_readable: |+
|
93
99
|
SELECT `theaters`.`id` AS 'ID #',
|
94
100
|
`theaters`.`name` AS 'name'
|
95
101
|
FROM `theaters` `theaters`
|
96
|
-
WHERE
|
102
|
+
WHERE `theaters`.`name` IN ('AMC', 'Regal') AND
|
97
103
|
`theaters`.`name` LIKE 'A%' AND
|
98
104
|
`theaters`.`name` LIKE '%m%' AND
|
99
105
|
`theaters`.`active` = 'false' AND
|
100
|
-
(
|
101
|
-
(
|
106
|
+
(`theaters`.`active` IS NULL OR `theaters`.`active` IN (TRUE, FALSE)) AND
|
107
|
+
(`theaters`.`inspected` IS NULL OR `theaters`.`inspected` IN (FALSE, TRUE)) AND
|
102
108
|
`theaters`.`created_at` <= '2019-03-04' AND
|
103
109
|
`theaters`.`created_at` < '2018-03-04' AND
|
104
110
|
`theaters`.`created_at` >= '2001-03-04' AND
|
105
111
|
`theaters`.`created_at` > '2002-03-04' AND
|
106
|
-
|
112
|
+
`theaters`.`name` NOT IN ('Netflix', 'Hulu') AND
|
113
|
+
`theaters`.`name` != 'YouTube Super Video' AND
|
107
114
|
(`theaters`.`name` NOT LIKE '%tfli%' OR `theaters`.`name` NOT LIKE '%ul%') AND
|
108
115
|
(`theaters`.`name` NOT LIKE 'netf%' OR `theaters`.`name` NOT LIKE 'hu%')
|
109
116
|
mysql_not_readable: |+
|
110
117
|
SELECT `t0`.`id` AS 'c0',
|
111
118
|
`t0`.`name` AS 'c1'
|
112
119
|
FROM `theaters` `t0`
|
113
|
-
WHERE
|
120
|
+
WHERE `t0`.`name` IN ('AMC', 'Regal') AND
|
114
121
|
`t0`.`name` LIKE 'A%' AND
|
115
122
|
`t0`.`name` LIKE '%m%' AND
|
116
123
|
`t0`.`active` = 'false' AND
|
117
|
-
(
|
118
|
-
(
|
124
|
+
(`t0`.`active` IS NULL OR `t0`.`active` IN (TRUE, FALSE)) AND
|
125
|
+
(`t0`.`inspected` IS NULL OR `t0`.`inspected` IN (FALSE, TRUE)) AND
|
119
126
|
`t0`.`created_at` <= '2019-03-04' AND
|
120
127
|
`t0`.`created_at` < '2018-03-04' AND
|
121
128
|
`t0`.`created_at` >= '2001-03-04' AND
|
122
129
|
`t0`.`created_at` > '2002-03-04' AND
|
123
|
-
|
130
|
+
`t0`.`name` NOT IN ('Netflix', 'Hulu') AND
|
131
|
+
`t0`.`name` != 'YouTube Super Video' AND
|
124
132
|
(`t0`.`name` NOT LIKE '%tfli%' OR `t0`.`name` NOT LIKE '%ul%') AND
|
125
133
|
(`t0`.`name` NOT LIKE 'netf%' OR `t0`.`name` NOT LIKE 'hu%')
|
@@ -0,0 +1,71 @@
|
|
1
|
+
model_name: Patients
|
2
|
+
query:
|
3
|
+
fields:
|
4
|
+
- key_path: id
|
5
|
+
display: 'ID #'
|
6
|
+
- key_path: first
|
7
|
+
display: First Name
|
8
|
+
- key_path: patient_payments.amount
|
9
|
+
display: Ave Payment
|
10
|
+
aggregator: ave
|
11
|
+
- key_path: patient_payments.amount
|
12
|
+
display: Number of Payments
|
13
|
+
aggregator: count
|
14
|
+
- key_path: patient_payments.amount
|
15
|
+
display: Max Payment
|
16
|
+
aggregator: max
|
17
|
+
- key_path: patient_payments.amount
|
18
|
+
display: Min Payment
|
19
|
+
aggregator: min
|
20
|
+
- key_path: patient_payments.amount
|
21
|
+
display: Total Paid
|
22
|
+
aggregator: sum
|
23
|
+
|
24
|
+
sqlite_readable: |+
|
25
|
+
SELECT
|
26
|
+
"patients"."id" AS 'ID #',
|
27
|
+
"patients"."first" AS 'First Name',
|
28
|
+
AVG("patient_payments"."amount") AS 'Ave Payment',
|
29
|
+
COUNT("patient_payments"."amount") AS 'Number of Payments',
|
30
|
+
MAX("patient_payments"."amount") AS 'Max Payment',
|
31
|
+
MIN("patient_payments"."amount") AS 'Min Payment',
|
32
|
+
SUM("patient_payments"."amount") AS 'Total Paid'
|
33
|
+
FROM "patients" "patients"
|
34
|
+
LEFT OUTER JOIN "patient_payments" "patient_payments" ON "patient_payments"."patient_id" = "patients"."id"
|
35
|
+
GROUP BY "patients"."id", "patients"."first"
|
36
|
+
sqlite_not_readable: |+
|
37
|
+
SELECT
|
38
|
+
"t0"."id" AS 'c0',
|
39
|
+
"t0"."first" AS 'c1',
|
40
|
+
AVG("t1"."amount") AS 'c2',
|
41
|
+
COUNT("t1"."amount") AS 'c3',
|
42
|
+
MAX("t1"."amount") AS 'c4',
|
43
|
+
MIN("t1"."amount") AS 'c5',
|
44
|
+
SUM("t1"."amount") AS 'c6'
|
45
|
+
FROM "patients" "t0"
|
46
|
+
LEFT OUTER JOIN "patient_payments" "t1" ON "t1"."patient_id" = "t0"."id"
|
47
|
+
GROUP BY "t0"."id", "t0"."first"
|
48
|
+
mysql_readable: |+
|
49
|
+
SELECT
|
50
|
+
`patients`.`id` AS 'ID #',
|
51
|
+
`patients`.`first` AS 'First Name',
|
52
|
+
AVG(`patient_payments`.`amount`) AS 'Ave Payment',
|
53
|
+
COUNT(`patient_payments`.`amount`) AS 'Number of Payments',
|
54
|
+
MAX(`patient_payments`.`amount`) AS 'Max Payment',
|
55
|
+
MIN(`patient_payments`.`amount`) AS 'Min Payment',
|
56
|
+
SUM(`patient_payments`.`amount`) AS 'Total Paid'
|
57
|
+
FROM `patients` `patients`
|
58
|
+
LEFT OUTER JOIN `patient_payments` `patient_payments` ON `patient_payments`.`patient_id` = `patients`.`id`
|
59
|
+
GROUP BY `patients`.`id`, `patients`.`first`
|
60
|
+
mysql_not_readable: |+
|
61
|
+
SELECT
|
62
|
+
`t0`.`id` AS 'c0',
|
63
|
+
`t0`.`first` AS 'c1',
|
64
|
+
AVG(`t1`.`amount`) AS 'c2',
|
65
|
+
COUNT(`t1`.`amount`) AS 'c3',
|
66
|
+
MAX(`t1`.`amount`) AS 'c4',
|
67
|
+
MIN(`t1`.`amount`) AS 'c5',
|
68
|
+
SUM(`t1`.`amount`) AS 'c6'
|
69
|
+
FROM `patients` `t0`
|
70
|
+
LEFT OUTER JOIN `patient_payments` `t1` ON `t1`.`patient_id` = `t0`.`id`
|
71
|
+
GROUP BY `t0`.`id`, `t0`.`first`
|
@@ -0,0 +1,88 @@
|
|
1
|
+
model_name: Patients
|
2
|
+
query:
|
3
|
+
fields:
|
4
|
+
- key_path: id
|
5
|
+
display: 'ID #'
|
6
|
+
- key_path: first
|
7
|
+
display: First Name
|
8
|
+
- key_path: patient_field_values.value
|
9
|
+
display: Date of Birth
|
10
|
+
aggregator: max
|
11
|
+
filters:
|
12
|
+
- key_path: patient_field_values.fields.section
|
13
|
+
value: demographics
|
14
|
+
- key_path: patient_field_values.fields.key
|
15
|
+
value: dob
|
16
|
+
- key_path: patient_field_values.value
|
17
|
+
display: Demographic Notes
|
18
|
+
aggregator: max
|
19
|
+
filters:
|
20
|
+
- key_path: patient_field_values.fields.section
|
21
|
+
value: demographics
|
22
|
+
- key_path: patient_field_values.fields.key
|
23
|
+
value: notes
|
24
|
+
- key_path: patient_field_values.value
|
25
|
+
display: 'Drivers License #'
|
26
|
+
aggregator: max
|
27
|
+
filters:
|
28
|
+
- key_path: patient_field_values.fields.section
|
29
|
+
value: demographics
|
30
|
+
- key_path: patient_field_values.fields.key
|
31
|
+
value: drivers_license
|
32
|
+
- key_path: patient_field_values.value
|
33
|
+
display: Contact Notes
|
34
|
+
aggregator: max
|
35
|
+
filters:
|
36
|
+
- key_path: patient_field_values.fields.section
|
37
|
+
value: contact
|
38
|
+
- key_path: patient_field_values.fields.key
|
39
|
+
value: notes
|
40
|
+
|
41
|
+
sqlite_readable: |+
|
42
|
+
SELECT
|
43
|
+
"patients"."id" AS 'ID #',
|
44
|
+
"patients"."first" AS 'First Name',
|
45
|
+
MAX(CASE WHEN "patient_field_values_fields"."section" = 'demographics' AND "patient_field_values_fields"."key" = 'dob' THEN "patient_field_values"."value" END) AS 'Date of Birth',
|
46
|
+
MAX(CASE WHEN "patient_field_values_fields"."section" = 'demographics' AND "patient_field_values_fields"."key" = 'notes' THEN "patient_field_values"."value" END) AS 'Demographic Notes',
|
47
|
+
MAX(CASE WHEN "patient_field_values_fields"."section" = 'demographics' AND "patient_field_values_fields"."key" = 'drivers_license' THEN "patient_field_values"."value" END) AS 'Drivers License #',
|
48
|
+
MAX(CASE WHEN "patient_field_values_fields"."section" = 'contact' AND "patient_field_values_fields"."key" = 'notes' THEN "patient_field_values"."value" END) AS 'Contact Notes'
|
49
|
+
FROM "patients" "patients"
|
50
|
+
LEFT OUTER JOIN "patient_field_values" "patient_field_values" ON "patient_field_values"."patient_id" = "patients"."id"
|
51
|
+
LEFT OUTER JOIN "fields" "patient_field_values_fields" ON "patient_field_values_fields"."id" = "patient_field_values"."field_id"
|
52
|
+
GROUP BY "patients"."id", "patients"."first"
|
53
|
+
sqlite_not_readable: |+
|
54
|
+
SELECT
|
55
|
+
"t0"."id" AS 'c0',
|
56
|
+
"t0"."first" AS 'c1',
|
57
|
+
MAX(CASE WHEN "t2"."section" = 'demographics' AND "t2"."key" = 'dob' THEN "t1"."value" END) AS 'c2',
|
58
|
+
MAX(CASE WHEN "t2"."section" = 'demographics' AND "t2"."key" = 'notes' THEN "t1"."value" END) AS 'c3',
|
59
|
+
MAX(CASE WHEN "t2"."section" = 'demographics' AND "t2"."key" = 'drivers_license' THEN "t1"."value" END) AS 'c4',
|
60
|
+
MAX(CASE WHEN "t2"."section" = 'contact' AND "t2"."key" = 'notes' THEN "t1"."value" END) AS 'c5'
|
61
|
+
FROM "patients" "t0"
|
62
|
+
LEFT OUTER JOIN "patient_field_values" "t1" ON "t1"."patient_id" = "t0"."id"
|
63
|
+
LEFT OUTER JOIN "fields" "t2" ON "t2"."id" = "t1"."field_id"
|
64
|
+
GROUP BY "t0"."id", "t0"."first"
|
65
|
+
mysql_readable: |+
|
66
|
+
SELECT
|
67
|
+
`patients`.`id` AS 'ID #',
|
68
|
+
`patients`.`first` AS 'First Name',
|
69
|
+
MAX(CASE WHEN `patient_field_values_fields`.`section` = 'demographics' AND `patient_field_values_fields`.`key` = 'dob' THEN `patient_field_values`.`value` END) AS 'Date of Birth',
|
70
|
+
MAX(CASE WHEN `patient_field_values_fields`.`section` = 'demographics' AND `patient_field_values_fields`.`key` = 'notes' THEN `patient_field_values`.`value` END) AS 'Demographic Notes',
|
71
|
+
MAX(CASE WHEN `patient_field_values_fields`.`section` = 'demographics' AND `patient_field_values_fields`.`key` = 'drivers_license' THEN `patient_field_values`.`value` END) AS 'Drivers License #',
|
72
|
+
MAX(CASE WHEN `patient_field_values_fields`.`section` = 'contact' AND `patient_field_values_fields`.`key` = 'notes' THEN `patient_field_values`.`value` END) AS 'Contact Notes'
|
73
|
+
FROM `patients` `patients`
|
74
|
+
LEFT OUTER JOIN `patient_field_values` `patient_field_values` ON `patient_field_values`.`patient_id` = `patients`.`id`
|
75
|
+
LEFT OUTER JOIN `fields` `patient_field_values_fields` ON `patient_field_values_fields`.`id` = `patient_field_values`.`field_id`
|
76
|
+
GROUP BY `patients`.`id`, `patients`.`first`
|
77
|
+
mysql_not_readable: |+
|
78
|
+
SELECT
|
79
|
+
`t0`.`id` AS 'c0',
|
80
|
+
`t0`.`first` AS 'c1',
|
81
|
+
MAX(CASE WHEN `t2`.`section` = 'demographics' AND `t2`.`key` = 'dob' THEN `t1`.`value` END) AS 'c2',
|
82
|
+
MAX(CASE WHEN `t2`.`section` = 'demographics' AND `t2`.`key` = 'notes' THEN `t1`.`value` END) AS 'c3',
|
83
|
+
MAX(CASE WHEN `t2`.`section` = 'demographics' AND `t2`.`key` = 'drivers_license' THEN `t1`.`value` END) AS 'c4',
|
84
|
+
MAX(CASE WHEN `t2`.`section` = 'contact' AND `t2`.`key` = 'notes' THEN `t1`.`value` END) AS 'c5'
|
85
|
+
FROM `patients` `t0`
|
86
|
+
LEFT OUTER JOIN `patient_field_values` `t1` ON `t1`.`patient_id` = `t0`.`id`
|
87
|
+
LEFT OUTER JOIN `fields` `t2` ON `t2`.`id` = `t1`.`field_id`
|
88
|
+
GROUP BY `t0`.`id`, `t0`.`first`
|
data/spec/fixtures/models.yaml
CHANGED
@@ -103,3 +103,23 @@ Partitioner Example 2:
|
|
103
103
|
value: Dog
|
104
104
|
- name: deleted
|
105
105
|
value: false
|
106
|
+
|
107
|
+
Patients:
|
108
|
+
name: patients
|
109
|
+
models:
|
110
|
+
- name: patient_payments
|
111
|
+
constraints:
|
112
|
+
- type: reference
|
113
|
+
parent: id
|
114
|
+
name: patient_id
|
115
|
+
- name: patient_field_values
|
116
|
+
constraints:
|
117
|
+
- type: reference
|
118
|
+
parent: id
|
119
|
+
name: patient_id
|
120
|
+
models:
|
121
|
+
- name: fields
|
122
|
+
constraints:
|
123
|
+
- type: reference
|
124
|
+
parent: field_id
|
125
|
+
name: id
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dbee-active_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Ruggio
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '2'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 2.
|
42
|
+
version: 2.1.1
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '2'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 2.
|
52
|
+
version: 2.1.1
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: guard-rspec
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,42 +126,42 @@ dependencies:
|
|
126
126
|
requirements:
|
127
127
|
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: 0.
|
129
|
+
version: 0.88.0
|
130
130
|
type: :development
|
131
131
|
prerelease: false
|
132
132
|
version_requirements: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
134
|
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: 0.
|
136
|
+
version: 0.88.0
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: simplecov
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
141
|
- - "~>"
|
142
142
|
- !ruby/object:Gem::Version
|
143
|
-
version: 0.
|
143
|
+
version: 0.18.5
|
144
144
|
type: :development
|
145
145
|
prerelease: false
|
146
146
|
version_requirements: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
148
|
- - "~>"
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version: 0.
|
150
|
+
version: 0.18.5
|
151
151
|
- !ruby/object:Gem::Dependency
|
152
152
|
name: simplecov-console
|
153
153
|
requirement: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
155
|
- - "~>"
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version: 0.
|
157
|
+
version: 0.7.0
|
158
158
|
type: :development
|
159
159
|
prerelease: false
|
160
160
|
version_requirements: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
162
|
- - "~>"
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version: 0.
|
164
|
+
version: 0.7.0
|
165
165
|
- !ruby/object:Gem::Dependency
|
166
166
|
name: sqlite3
|
167
167
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,8 +180,7 @@ description: " By default Dbee ships with no underlying SQL generator. This
|
|
180
180
|
will plug in ActiveRecord into Dbee and Dbee will use it for SQL generation.\n"
|
181
181
|
email:
|
182
182
|
- mruggio@bluemarblepayroll.com
|
183
|
-
executables:
|
184
|
-
- console
|
183
|
+
executables: []
|
185
184
|
extensions: []
|
186
185
|
extra_rdoc_files: []
|
187
186
|
files:
|
@@ -199,20 +198,24 @@ files:
|
|
199
198
|
- Rakefile
|
200
199
|
- bin/console
|
201
200
|
- dbee-active_record.gemspec
|
201
|
+
- exe/.gitkeep
|
202
202
|
- lib/dbee/providers/active_record_provider.rb
|
203
203
|
- lib/dbee/providers/active_record_provider/expression_builder.rb
|
204
|
-
- lib/dbee/providers/active_record_provider/
|
205
|
-
- lib/dbee/providers/active_record_provider/
|
206
|
-
- lib/dbee/providers/active_record_provider/
|
207
|
-
- lib/dbee/providers/active_record_provider/
|
204
|
+
- lib/dbee/providers/active_record_provider/maker.rb
|
205
|
+
- lib/dbee/providers/active_record_provider/makers/constraint.rb
|
206
|
+
- lib/dbee/providers/active_record_provider/makers/order.rb
|
207
|
+
- lib/dbee/providers/active_record_provider/makers/select.rb
|
208
|
+
- lib/dbee/providers/active_record_provider/makers/where.rb
|
208
209
|
- lib/dbee/providers/active_record_provider/obfuscated_alias_maker.rb
|
209
210
|
- lib/dbee/providers/active_record_provider/safe_alias_maker.rb
|
210
211
|
- lib/dbee/providers/active_record_provider/version.rb
|
211
212
|
- spec/config/database.yaml.ci
|
212
213
|
- spec/db_helper.rb
|
214
|
+
- spec/dbee/providers/active_record_provider/expression_builder_spec.rb
|
213
215
|
- spec/dbee/providers/active_record_provider_spec.rb
|
214
216
|
- spec/fixtures/active_record_snapshots/five_table_query.yaml
|
215
217
|
- spec/fixtures/active_record_snapshots/multiple_same_table_query_with_static_constraints.yaml
|
218
|
+
- spec/fixtures/active_record_snapshots/one_table_empty_query.yaml
|
216
219
|
- spec/fixtures/active_record_snapshots/one_table_query.yaml
|
217
220
|
- spec/fixtures/active_record_snapshots/one_table_query_with_ascending_sort.yaml
|
218
221
|
- spec/fixtures/active_record_snapshots/one_table_query_with_descending_sort.yaml
|
@@ -223,12 +226,19 @@ files:
|
|
223
226
|
- spec/fixtures/active_record_snapshots/partitioner_example_2_query.yaml
|
224
227
|
- spec/fixtures/active_record_snapshots/reverse_polymorphic_query.yaml
|
225
228
|
- spec/fixtures/active_record_snapshots/two_table_query.yaml
|
229
|
+
- spec/fixtures/active_record_snapshots/two_table_query_with_aggregation.yaml
|
230
|
+
- spec/fixtures/active_record_snapshots/two_table_query_with_pivoting.yaml
|
226
231
|
- spec/fixtures/models.yaml
|
227
232
|
- spec/spec_helper.rb
|
228
233
|
homepage: https://github.com/bluemarblepayroll/dbee-active_record
|
229
234
|
licenses:
|
230
235
|
- MIT
|
231
|
-
metadata:
|
236
|
+
metadata:
|
237
|
+
bug_tracker_uri: https://github.com/bluemarblepayroll/dbee-active_record/issues
|
238
|
+
changelog_uri: https://github.com/bluemarblepayroll/dbee-active_record/blob/master/CHANGELOG.md
|
239
|
+
documentation_uri: https://www.rubydoc.info/gems/dbee-active_record
|
240
|
+
homepage_uri: https://github.com/bluemarblepayroll/dbee-active_record
|
241
|
+
source_code_uri: https://github.com/bluemarblepayroll/dbee-active_record
|
232
242
|
post_install_message:
|
233
243
|
rdoc_options: []
|
234
244
|
require_paths:
|
@@ -237,7 +247,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
237
247
|
requirements:
|
238
248
|
- - ">="
|
239
249
|
- !ruby/object:Gem::Version
|
240
|
-
version: 2.
|
250
|
+
version: '2.5'
|
241
251
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
252
|
requirements:
|
243
253
|
- - ">="
|
@@ -251,9 +261,11 @@ summary: Plugs in ActiveRecord so Dbee can use Arel for SQL generation.
|
|
251
261
|
test_files:
|
252
262
|
- spec/config/database.yaml.ci
|
253
263
|
- spec/db_helper.rb
|
264
|
+
- spec/dbee/providers/active_record_provider/expression_builder_spec.rb
|
254
265
|
- spec/dbee/providers/active_record_provider_spec.rb
|
255
266
|
- spec/fixtures/active_record_snapshots/five_table_query.yaml
|
256
267
|
- spec/fixtures/active_record_snapshots/multiple_same_table_query_with_static_constraints.yaml
|
268
|
+
- spec/fixtures/active_record_snapshots/one_table_empty_query.yaml
|
257
269
|
- spec/fixtures/active_record_snapshots/one_table_query.yaml
|
258
270
|
- spec/fixtures/active_record_snapshots/one_table_query_with_ascending_sort.yaml
|
259
271
|
- spec/fixtures/active_record_snapshots/one_table_query_with_descending_sort.yaml
|
@@ -264,5 +276,7 @@ test_files:
|
|
264
276
|
- spec/fixtures/active_record_snapshots/partitioner_example_2_query.yaml
|
265
277
|
- spec/fixtures/active_record_snapshots/reverse_polymorphic_query.yaml
|
266
278
|
- spec/fixtures/active_record_snapshots/two_table_query.yaml
|
279
|
+
- spec/fixtures/active_record_snapshots/two_table_query_with_aggregation.yaml
|
280
|
+
- spec/fixtures/active_record_snapshots/two_table_query_with_pivoting.yaml
|
267
281
|
- spec/fixtures/models.yaml
|
268
282
|
- spec/spec_helper.rb
|