minidusen 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +10 -2
- data/.ruby-version +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile.4.2.mysql2.lock +1 -1
- data/Gemfile.4.2.pg.lock +1 -1
- data/Gemfile.5.2.mysql2.lock +1 -1
- data/Gemfile.5.2.pg.lock +1 -1
- data/Gemfile.6.0.mysql2.lock +1 -1
- data/Gemfile.6.0.pg.lock +1 -1
- data/Gemfile.6.1.mysql2.lock +1 -1
- data/Gemfile.6.1.pg.lock +1 -1
- data/Gemfile.7.0.mysql2.lock +1 -1
- data/Gemfile.7.0.pg.lock +1 -1
- data/Gemfile.7.1.mysql2 +15 -0
- data/Gemfile.7.1.mysql2.lock +82 -0
- data/Gemfile.7.1.pg +15 -0
- data/Gemfile.7.1.pg.lock +82 -0
- data/Gemfile.7.2.mysql2 +15 -0
- data/Gemfile.7.2.mysql2.lock +84 -0
- data/Gemfile.7.2.pg +15 -0
- data/Gemfile.7.2.pg.lock +84 -0
- data/README.md +4 -1
- data/lib/minidusen/syntax.rb +14 -3
- data/lib/minidusen/util.rb +2 -2
- data/lib/minidusen/version.rb +1 -1
- data/spec/minidusen/filter_spec.rb +8 -0
- metadata +14 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f32ad9fa29bb04c20b375672101586a333419a6e7ba63dca31de338a6160240
|
4
|
+
data.tar.gz: e6e3262a32e39a889a942eafe2babbdd097acf40b79577f442b5539b920cd1ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95ff0a7700fa447a36e36d45844d6f37ae7a5cab44b7782055eb28d9ae06981c21d0236d6199f727787230b14233f10942315333eb9eba945fb6ea5d1945224c
|
7
|
+
data.tar.gz: 506d7606d35b9c139091433834c9f1116997f836440e953c8c9f8ce26be29b33aff71bb15fc8a78879dbfed48489d8eca19dd44699d708486c82b5105d3e2b7b
|
data/.github/workflows/test.yml
CHANGED
@@ -3,10 +3,10 @@ name: Tests
|
|
3
3
|
'on':
|
4
4
|
push:
|
5
5
|
branches:
|
6
|
-
-
|
6
|
+
- main
|
7
7
|
pull_request:
|
8
8
|
branches:
|
9
|
-
-
|
9
|
+
- main
|
10
10
|
jobs:
|
11
11
|
test_mysql:
|
12
12
|
runs-on: ubuntu-20.04
|
@@ -35,6 +35,10 @@ jobs:
|
|
35
35
|
gemfile: Gemfile.6.1.mysql2
|
36
36
|
- ruby: 3.2.0
|
37
37
|
gemfile: Gemfile.7.0.mysql2
|
38
|
+
- ruby: 3.2.0
|
39
|
+
gemfile: Gemfile.7.1.mysql2
|
40
|
+
- ruby: 3.2.0
|
41
|
+
gemfile: Gemfile.7.2.mysql2
|
38
42
|
env:
|
39
43
|
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
40
44
|
steps:
|
@@ -79,6 +83,10 @@ jobs:
|
|
79
83
|
gemfile: Gemfile.6.1.pg
|
80
84
|
- ruby: 3.2.0
|
81
85
|
gemfile: Gemfile.7.0.pg
|
86
|
+
- ruby: 3.2.0
|
87
|
+
gemfile: Gemfile.7.1.pg
|
88
|
+
- ruby: 3.2.0
|
89
|
+
gemfile: Gemfile.7.2.pg
|
82
90
|
env:
|
83
91
|
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
84
92
|
steps:
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
3.2.0
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,12 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
10
10
|
|
11
11
|
### Compatible changes
|
12
12
|
|
13
|
+
## 0.11.2 2024-10-31
|
14
|
+
|
15
|
+
### Compatible changes
|
16
|
+
|
17
|
+
- Fix: Performance of queries using a negation ("-xxx") is improved by using an anti-join instead of a "NOT IN".
|
18
|
+
|
13
19
|
## 0.11.1 2024-08-22
|
14
20
|
|
15
21
|
### Compatible changes
|
data/Gemfile.4.2.mysql2.lock
CHANGED
data/Gemfile.4.2.pg.lock
CHANGED
data/Gemfile.5.2.mysql2.lock
CHANGED
data/Gemfile.5.2.pg.lock
CHANGED
data/Gemfile.6.0.mysql2.lock
CHANGED
data/Gemfile.6.0.pg.lock
CHANGED
data/Gemfile.6.1.mysql2.lock
CHANGED
data/Gemfile.6.1.pg.lock
CHANGED
data/Gemfile.7.0.mysql2.lock
CHANGED
data/Gemfile.7.0.pg.lock
CHANGED
data/Gemfile.7.1.mysql2
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Runtime dependencies
|
4
|
+
gem 'activerecord', '~>7.1.4'
|
5
|
+
gem 'mysql2', '~>0.5'
|
6
|
+
|
7
|
+
# Development dependencies
|
8
|
+
gem 'rake'
|
9
|
+
gem 'database_cleaner'
|
10
|
+
gem 'rspec', '~>3.5'
|
11
|
+
gem 'byebug'
|
12
|
+
gem 'gemika'
|
13
|
+
|
14
|
+
# Gem under test
|
15
|
+
gem 'minidusen', :path => '.'
|
@@ -0,0 +1,82 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
minidusen (0.11.2)
|
5
|
+
activerecord (>= 3.2)
|
6
|
+
activesupport (>= 3.2)
|
7
|
+
edge_rider (>= 0.2.5)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activemodel (7.1.4)
|
13
|
+
activesupport (= 7.1.4)
|
14
|
+
activerecord (7.1.4)
|
15
|
+
activemodel (= 7.1.4)
|
16
|
+
activesupport (= 7.1.4)
|
17
|
+
timeout (>= 0.4.0)
|
18
|
+
activesupport (7.1.4)
|
19
|
+
base64
|
20
|
+
bigdecimal
|
21
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
22
|
+
connection_pool (>= 2.2.5)
|
23
|
+
drb
|
24
|
+
i18n (>= 1.6, < 2)
|
25
|
+
minitest (>= 5.1)
|
26
|
+
mutex_m
|
27
|
+
tzinfo (~> 2.0)
|
28
|
+
base64 (0.2.0)
|
29
|
+
bigdecimal (3.1.8)
|
30
|
+
byebug (11.1.3)
|
31
|
+
concurrent-ruby (1.3.4)
|
32
|
+
connection_pool (2.4.1)
|
33
|
+
database_cleaner (2.0.2)
|
34
|
+
database_cleaner-active_record (>= 2, < 3)
|
35
|
+
database_cleaner-active_record (2.2.0)
|
36
|
+
activerecord (>= 5.a)
|
37
|
+
database_cleaner-core (~> 2.0.0)
|
38
|
+
database_cleaner-core (2.0.1)
|
39
|
+
diff-lcs (1.5.1)
|
40
|
+
drb (2.2.1)
|
41
|
+
edge_rider (2.3.0)
|
42
|
+
activerecord (>= 3.2)
|
43
|
+
gemika (0.8.3)
|
44
|
+
i18n (1.14.5)
|
45
|
+
concurrent-ruby (~> 1.0)
|
46
|
+
minitest (5.25.1)
|
47
|
+
mutex_m (0.2.0)
|
48
|
+
mysql2 (0.5.6)
|
49
|
+
rake (13.2.1)
|
50
|
+
rspec (3.13.0)
|
51
|
+
rspec-core (~> 3.13.0)
|
52
|
+
rspec-expectations (~> 3.13.0)
|
53
|
+
rspec-mocks (~> 3.13.0)
|
54
|
+
rspec-core (3.13.1)
|
55
|
+
rspec-support (~> 3.13.0)
|
56
|
+
rspec-expectations (3.13.2)
|
57
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
58
|
+
rspec-support (~> 3.13.0)
|
59
|
+
rspec-mocks (3.13.1)
|
60
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
61
|
+
rspec-support (~> 3.13.0)
|
62
|
+
rspec-support (3.13.1)
|
63
|
+
timeout (0.4.1)
|
64
|
+
tzinfo (2.0.6)
|
65
|
+
concurrent-ruby (~> 1.0)
|
66
|
+
|
67
|
+
PLATFORMS
|
68
|
+
ruby
|
69
|
+
x86_64-linux
|
70
|
+
|
71
|
+
DEPENDENCIES
|
72
|
+
activerecord (~> 7.1.4)
|
73
|
+
byebug
|
74
|
+
database_cleaner
|
75
|
+
gemika
|
76
|
+
minidusen!
|
77
|
+
mysql2 (~> 0.5)
|
78
|
+
rake
|
79
|
+
rspec (~> 3.5)
|
80
|
+
|
81
|
+
BUNDLED WITH
|
82
|
+
2.5.6
|
data/Gemfile.7.1.pg
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Runtime dependencies
|
4
|
+
gem 'activerecord', '~>7.1.4'
|
5
|
+
gem 'pg', '~> 1.4.0'
|
6
|
+
|
7
|
+
# Development dependencies
|
8
|
+
gem 'rake'
|
9
|
+
gem 'database_cleaner'
|
10
|
+
gem 'rspec', '~>3.5'
|
11
|
+
gem 'byebug'
|
12
|
+
gem 'gemika'
|
13
|
+
|
14
|
+
# Gem under test
|
15
|
+
gem 'minidusen', :path => '.'
|
data/Gemfile.7.1.pg.lock
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
minidusen (0.11.2)
|
5
|
+
activerecord (>= 3.2)
|
6
|
+
activesupport (>= 3.2)
|
7
|
+
edge_rider (>= 0.2.5)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activemodel (7.1.4)
|
13
|
+
activesupport (= 7.1.4)
|
14
|
+
activerecord (7.1.4)
|
15
|
+
activemodel (= 7.1.4)
|
16
|
+
activesupport (= 7.1.4)
|
17
|
+
timeout (>= 0.4.0)
|
18
|
+
activesupport (7.1.4)
|
19
|
+
base64
|
20
|
+
bigdecimal
|
21
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
22
|
+
connection_pool (>= 2.2.5)
|
23
|
+
drb
|
24
|
+
i18n (>= 1.6, < 2)
|
25
|
+
minitest (>= 5.1)
|
26
|
+
mutex_m
|
27
|
+
tzinfo (~> 2.0)
|
28
|
+
base64 (0.2.0)
|
29
|
+
bigdecimal (3.1.8)
|
30
|
+
byebug (11.1.3)
|
31
|
+
concurrent-ruby (1.3.4)
|
32
|
+
connection_pool (2.4.1)
|
33
|
+
database_cleaner (2.0.2)
|
34
|
+
database_cleaner-active_record (>= 2, < 3)
|
35
|
+
database_cleaner-active_record (2.2.0)
|
36
|
+
activerecord (>= 5.a)
|
37
|
+
database_cleaner-core (~> 2.0.0)
|
38
|
+
database_cleaner-core (2.0.1)
|
39
|
+
diff-lcs (1.5.1)
|
40
|
+
drb (2.2.1)
|
41
|
+
edge_rider (2.3.0)
|
42
|
+
activerecord (>= 3.2)
|
43
|
+
gemika (0.8.3)
|
44
|
+
i18n (1.14.5)
|
45
|
+
concurrent-ruby (~> 1.0)
|
46
|
+
minitest (5.25.1)
|
47
|
+
mutex_m (0.2.0)
|
48
|
+
pg (1.4.6)
|
49
|
+
rake (13.2.1)
|
50
|
+
rspec (3.13.0)
|
51
|
+
rspec-core (~> 3.13.0)
|
52
|
+
rspec-expectations (~> 3.13.0)
|
53
|
+
rspec-mocks (~> 3.13.0)
|
54
|
+
rspec-core (3.13.1)
|
55
|
+
rspec-support (~> 3.13.0)
|
56
|
+
rspec-expectations (3.13.2)
|
57
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
58
|
+
rspec-support (~> 3.13.0)
|
59
|
+
rspec-mocks (3.13.1)
|
60
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
61
|
+
rspec-support (~> 3.13.0)
|
62
|
+
rspec-support (3.13.1)
|
63
|
+
timeout (0.4.1)
|
64
|
+
tzinfo (2.0.6)
|
65
|
+
concurrent-ruby (~> 1.0)
|
66
|
+
|
67
|
+
PLATFORMS
|
68
|
+
ruby
|
69
|
+
x86_64-linux
|
70
|
+
|
71
|
+
DEPENDENCIES
|
72
|
+
activerecord (~> 7.1.4)
|
73
|
+
byebug
|
74
|
+
database_cleaner
|
75
|
+
gemika
|
76
|
+
minidusen!
|
77
|
+
pg (~> 1.4.0)
|
78
|
+
rake
|
79
|
+
rspec (~> 3.5)
|
80
|
+
|
81
|
+
BUNDLED WITH
|
82
|
+
2.5.6
|
data/Gemfile.7.2.mysql2
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Runtime dependencies
|
4
|
+
gem 'activerecord', '~>7.2.1'
|
5
|
+
gem 'mysql2', '~>0.5'
|
6
|
+
|
7
|
+
# Development dependencies
|
8
|
+
gem 'rake'
|
9
|
+
gem 'database_cleaner'
|
10
|
+
gem 'rspec', '~>3.5'
|
11
|
+
gem 'byebug'
|
12
|
+
gem 'gemika'
|
13
|
+
|
14
|
+
# Gem under test
|
15
|
+
gem 'minidusen', :path => '.'
|
@@ -0,0 +1,84 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
minidusen (0.11.2)
|
5
|
+
activerecord (>= 3.2)
|
6
|
+
activesupport (>= 3.2)
|
7
|
+
edge_rider (>= 0.2.5)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activemodel (7.2.1)
|
13
|
+
activesupport (= 7.2.1)
|
14
|
+
activerecord (7.2.1)
|
15
|
+
activemodel (= 7.2.1)
|
16
|
+
activesupport (= 7.2.1)
|
17
|
+
timeout (>= 0.4.0)
|
18
|
+
activesupport (7.2.1)
|
19
|
+
base64
|
20
|
+
bigdecimal
|
21
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
22
|
+
connection_pool (>= 2.2.5)
|
23
|
+
drb
|
24
|
+
i18n (>= 1.6, < 2)
|
25
|
+
logger (>= 1.4.2)
|
26
|
+
minitest (>= 5.1)
|
27
|
+
securerandom (>= 0.3)
|
28
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
29
|
+
base64 (0.2.0)
|
30
|
+
bigdecimal (3.1.8)
|
31
|
+
byebug (11.1.3)
|
32
|
+
concurrent-ruby (1.3.4)
|
33
|
+
connection_pool (2.4.1)
|
34
|
+
database_cleaner (2.0.2)
|
35
|
+
database_cleaner-active_record (>= 2, < 3)
|
36
|
+
database_cleaner-active_record (2.2.0)
|
37
|
+
activerecord (>= 5.a)
|
38
|
+
database_cleaner-core (~> 2.0.0)
|
39
|
+
database_cleaner-core (2.0.1)
|
40
|
+
diff-lcs (1.5.1)
|
41
|
+
drb (2.2.1)
|
42
|
+
edge_rider (2.3.0)
|
43
|
+
activerecord (>= 3.2)
|
44
|
+
gemika (0.8.3)
|
45
|
+
i18n (1.14.5)
|
46
|
+
concurrent-ruby (~> 1.0)
|
47
|
+
logger (1.6.1)
|
48
|
+
minitest (5.25.1)
|
49
|
+
mysql2 (0.5.6)
|
50
|
+
rake (13.2.1)
|
51
|
+
rspec (3.13.0)
|
52
|
+
rspec-core (~> 3.13.0)
|
53
|
+
rspec-expectations (~> 3.13.0)
|
54
|
+
rspec-mocks (~> 3.13.0)
|
55
|
+
rspec-core (3.13.1)
|
56
|
+
rspec-support (~> 3.13.0)
|
57
|
+
rspec-expectations (3.13.2)
|
58
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
59
|
+
rspec-support (~> 3.13.0)
|
60
|
+
rspec-mocks (3.13.1)
|
61
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
+
rspec-support (~> 3.13.0)
|
63
|
+
rspec-support (3.13.1)
|
64
|
+
securerandom (0.3.1)
|
65
|
+
timeout (0.4.1)
|
66
|
+
tzinfo (2.0.6)
|
67
|
+
concurrent-ruby (~> 1.0)
|
68
|
+
|
69
|
+
PLATFORMS
|
70
|
+
ruby
|
71
|
+
x86_64-linux
|
72
|
+
|
73
|
+
DEPENDENCIES
|
74
|
+
activerecord (~> 7.2.1)
|
75
|
+
byebug
|
76
|
+
database_cleaner
|
77
|
+
gemika
|
78
|
+
minidusen!
|
79
|
+
mysql2 (~> 0.5)
|
80
|
+
rake
|
81
|
+
rspec (~> 3.5)
|
82
|
+
|
83
|
+
BUNDLED WITH
|
84
|
+
2.5.6
|
data/Gemfile.7.2.pg
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Runtime dependencies
|
4
|
+
gem 'activerecord', '~>7.2.1'
|
5
|
+
gem 'pg', '~> 1.4.0'
|
6
|
+
|
7
|
+
# Development dependencies
|
8
|
+
gem 'rake'
|
9
|
+
gem 'database_cleaner'
|
10
|
+
gem 'rspec', '~>3.5'
|
11
|
+
gem 'byebug'
|
12
|
+
gem 'gemika'
|
13
|
+
|
14
|
+
# Gem under test
|
15
|
+
gem 'minidusen', :path => '.'
|
data/Gemfile.7.2.pg.lock
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
minidusen (0.11.2)
|
5
|
+
activerecord (>= 3.2)
|
6
|
+
activesupport (>= 3.2)
|
7
|
+
edge_rider (>= 0.2.5)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activemodel (7.2.1)
|
13
|
+
activesupport (= 7.2.1)
|
14
|
+
activerecord (7.2.1)
|
15
|
+
activemodel (= 7.2.1)
|
16
|
+
activesupport (= 7.2.1)
|
17
|
+
timeout (>= 0.4.0)
|
18
|
+
activesupport (7.2.1)
|
19
|
+
base64
|
20
|
+
bigdecimal
|
21
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
22
|
+
connection_pool (>= 2.2.5)
|
23
|
+
drb
|
24
|
+
i18n (>= 1.6, < 2)
|
25
|
+
logger (>= 1.4.2)
|
26
|
+
minitest (>= 5.1)
|
27
|
+
securerandom (>= 0.3)
|
28
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
29
|
+
base64 (0.2.0)
|
30
|
+
bigdecimal (3.1.8)
|
31
|
+
byebug (11.1.3)
|
32
|
+
concurrent-ruby (1.3.4)
|
33
|
+
connection_pool (2.4.1)
|
34
|
+
database_cleaner (2.0.2)
|
35
|
+
database_cleaner-active_record (>= 2, < 3)
|
36
|
+
database_cleaner-active_record (2.2.0)
|
37
|
+
activerecord (>= 5.a)
|
38
|
+
database_cleaner-core (~> 2.0.0)
|
39
|
+
database_cleaner-core (2.0.1)
|
40
|
+
diff-lcs (1.5.1)
|
41
|
+
drb (2.2.1)
|
42
|
+
edge_rider (2.3.0)
|
43
|
+
activerecord (>= 3.2)
|
44
|
+
gemika (0.8.3)
|
45
|
+
i18n (1.14.5)
|
46
|
+
concurrent-ruby (~> 1.0)
|
47
|
+
logger (1.6.1)
|
48
|
+
minitest (5.25.1)
|
49
|
+
pg (1.4.6)
|
50
|
+
rake (13.2.1)
|
51
|
+
rspec (3.13.0)
|
52
|
+
rspec-core (~> 3.13.0)
|
53
|
+
rspec-expectations (~> 3.13.0)
|
54
|
+
rspec-mocks (~> 3.13.0)
|
55
|
+
rspec-core (3.13.1)
|
56
|
+
rspec-support (~> 3.13.0)
|
57
|
+
rspec-expectations (3.13.2)
|
58
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
59
|
+
rspec-support (~> 3.13.0)
|
60
|
+
rspec-mocks (3.13.1)
|
61
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
+
rspec-support (~> 3.13.0)
|
63
|
+
rspec-support (3.13.1)
|
64
|
+
securerandom (0.3.1)
|
65
|
+
timeout (0.4.1)
|
66
|
+
tzinfo (2.0.6)
|
67
|
+
concurrent-ruby (~> 1.0)
|
68
|
+
|
69
|
+
PLATFORMS
|
70
|
+
ruby
|
71
|
+
x86_64-linux
|
72
|
+
|
73
|
+
DEPENDENCIES
|
74
|
+
activerecord (~> 7.2.1)
|
75
|
+
byebug
|
76
|
+
database_cleaner
|
77
|
+
gemika
|
78
|
+
minidusen!
|
79
|
+
pg (~> 1.4.0)
|
80
|
+
rake
|
81
|
+
rspec (~> 3.5)
|
82
|
+
|
83
|
+
BUNDLED WITH
|
84
|
+
2.5.6
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ It works with your existing MySQL or PostgreSQL schema by mostly relying on simp
|
|
9
9
|
|
10
10
|
This makes Minidusen a quick way to implement find-as-you-type filters for index views:
|
11
11
|
|
12
|
-
![A list of records filtered by a query](https://raw.githubusercontent.com/makandra/minidusen/
|
12
|
+
![A list of records filtered by a query](https://raw.githubusercontent.com/makandra/minidusen/main/doc/filtered_index_view.cropped.png)
|
13
13
|
|
14
14
|
|
15
15
|
### Supported queries
|
@@ -223,6 +223,9 @@ Minidusen is tested on:
|
|
223
223
|
- Rails 5.2
|
224
224
|
- Rails 6.0
|
225
225
|
- Rails 6.1
|
226
|
+
- Rails 7.0
|
227
|
+
- Rails 7.1
|
228
|
+
- Rails 7.2
|
226
229
|
- MySQL 5.6
|
227
230
|
- PostgreSQL
|
228
231
|
|
data/lib/minidusen/syntax.rb
CHANGED
@@ -3,6 +3,7 @@ module Minidusen
|
|
3
3
|
|
4
4
|
def initialize
|
5
5
|
@scopers = {}
|
6
|
+
@alias_count = 0
|
6
7
|
end
|
7
8
|
|
8
9
|
def learn_field(field, &scoper)
|
@@ -45,9 +46,19 @@ module Minidusen
|
|
45
46
|
|
46
47
|
def append_excludes(instance, matches, exclude_query)
|
47
48
|
excluded_records = apply_query(instance, matches.origin_class, exclude_query)
|
48
|
-
|
49
|
-
|
50
|
-
|
49
|
+
primary_key = excluded_records.primary_key
|
50
|
+
join_alias = "exclude_#{@alias_count += 1}"
|
51
|
+
# due to performance reasons on big tables this needs to be implemented as an anti-join
|
52
|
+
# will generate SQL like
|
53
|
+
# LEFT JOIN (SELECT "users"."id" FROM "users" WHERE $condition) excluded
|
54
|
+
# ON "users"."id" = "excluded"."id"
|
55
|
+
# WHERE "excluded"."id" IS NULL
|
56
|
+
matches
|
57
|
+
.joins(<<~SQL)
|
58
|
+
LEFT JOIN (#{excluded_records.select(primary_key).to_sql}) #{join_alias}
|
59
|
+
ON #{Util.qualify_column_name(excluded_records, primary_key)} = #{Util.qualify_column_name(excluded_records, primary_key, table_name: join_alias)}
|
60
|
+
SQL
|
61
|
+
.where(join_alias => { primary_key => nil })
|
51
62
|
end
|
52
63
|
|
53
64
|
end
|
data/lib/minidusen/util.rb
CHANGED
@@ -41,10 +41,10 @@ module Minidusen
|
|
41
41
|
escape_with_backslash(phrase, ['%', '_'])
|
42
42
|
end
|
43
43
|
|
44
|
-
def qualify_column_name(model, column_name)
|
44
|
+
def qualify_column_name(model, column_name, table_name: model.table_name)
|
45
45
|
column_name = column_name.to_s
|
46
46
|
unless column_name.include?('.')
|
47
|
-
quoted_table_name = model.connection.quote_table_name(
|
47
|
+
quoted_table_name = model.connection.quote_table_name(table_name)
|
48
48
|
quoted_column_name = model.connection.quote_column_name(column_name)
|
49
49
|
column_name = "#{quoted_table_name}.#{quoted_column_name}"
|
50
50
|
end
|
data/lib/minidusen/version.rb
CHANGED
@@ -165,6 +165,14 @@ describe Minidusen::Filter do
|
|
165
165
|
user_filter.filter(User, '-name_and_city_regex:Power').to_a.should == [match]
|
166
166
|
end
|
167
167
|
|
168
|
+
it 'can be filtered twice' do
|
169
|
+
match = User.create!(:name => 'Sunny Flower', :city => "Flower")
|
170
|
+
no_match = User.create!(:name => 'Sunny Power', :city => "Power")
|
171
|
+
also_no_match = User.create!(:name => 'Sunny Forever', :city => "Forever")
|
172
|
+
first_result = user_filter.filter(User, '-name_and_city_regex:Power')
|
173
|
+
user_filter.filter(first_result, '-name_and_city_regex:Forever').to_a.should == [match]
|
174
|
+
end
|
175
|
+
|
168
176
|
end
|
169
177
|
|
170
178
|
context 'when the given query is blank' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minidusen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -83,6 +83,14 @@ files:
|
|
83
83
|
- Gemfile.7.0.mysql2.lock
|
84
84
|
- Gemfile.7.0.pg
|
85
85
|
- Gemfile.7.0.pg.lock
|
86
|
+
- Gemfile.7.1.mysql2
|
87
|
+
- Gemfile.7.1.mysql2.lock
|
88
|
+
- Gemfile.7.1.pg
|
89
|
+
- Gemfile.7.1.pg.lock
|
90
|
+
- Gemfile.7.2.mysql2
|
91
|
+
- Gemfile.7.2.mysql2.lock
|
92
|
+
- Gemfile.7.2.pg
|
93
|
+
- Gemfile.7.2.pg.lock
|
86
94
|
- LICENSE
|
87
95
|
- README.md
|
88
96
|
- Rakefile
|
@@ -112,7 +120,7 @@ licenses:
|
|
112
120
|
- MIT
|
113
121
|
metadata:
|
114
122
|
rubygems_mfa_required: 'true'
|
115
|
-
post_install_message:
|
123
|
+
post_install_message:
|
116
124
|
rdoc_options: []
|
117
125
|
require_paths:
|
118
126
|
- lib
|
@@ -127,8 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
135
|
- !ruby/object:Gem::Version
|
128
136
|
version: '0'
|
129
137
|
requirements: []
|
130
|
-
rubygems_version: 3.
|
131
|
-
signing_key:
|
138
|
+
rubygems_version: 3.3.27
|
139
|
+
signing_key:
|
132
140
|
specification_version: 4
|
133
141
|
summary: Low-tech search for ActiveRecord with MySQL or PostgreSQL
|
134
142
|
test_files: []
|