searchkon 1.0.2 → 1.0.3

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -31
  3. data/searchkon.gemspec +3 -3
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c48b564308ba6cfc2179d89383d7ae2602655466a7468631413a0a0472ad6aea
4
- data.tar.gz: cc8ae626d7cc7861c678c650c4cca4a256e2e35d728eddf8945ac25eb78aaabb
3
+ metadata.gz: 8b03e8feb425ac126b0abc8d2e0684ba41f57a89e36373da2b7bb6e834b30841
4
+ data.tar.gz: 97bc80799ba817ba658ed2f259e8664c3ede624e419c8e5b317ecf195e8c6ece
5
5
  SHA512:
6
- metadata.gz: 2c04327ac3103a5c5a2498434a6d44b078ec12f6f6d8cef9ad0e425ab644a1a0569d6feabe810f6a3756704ba42d3ead3ae29abbade24423183d6cc6b67291e3
7
- data.tar.gz: 6a836a104d4110d1423aa2da85a86b8bb4343d2003217a313745ada708e771ed02143f7da9bb1e295012d4c2078e59998bb79d37031f0aa1811a2226dd44dc31
6
+ metadata.gz: 1fe13d61e92bf189d2aa96db3f09efa587c4657fe712e870f57dc5340a371f77a016c81d886785c3be67f0ed5810a3b5755a6dfe9d96279d9ab8bc887a217ff5
7
+ data.tar.gz: b7eeb6ba941a093e1ec77826efe721eab29664147d006dca01a0f7abf877d9047e4e3401d8d72cb37ea88086433a1144db77e4f8e69d26b250b135de3ba56c39
data/README.md CHANGED
@@ -7,14 +7,12 @@ Searchkon is Advanced active record search(filter) command that makes easy to se
7
7
  Lets say we want to return a list of products filtered by multiple parameters. our request contain below parameters:
8
8
 
9
9
  ```
10
- {
11
- filters: {
12
- title: 'foobar',
13
- id: [1, 2, 3, 4],
14
- created_at: '(2012-12-21..2019-12-21)'
15
- categories.name: 'mobile'
16
- }
17
- }
10
+ {
11
+ title: 'foobar',
12
+ id: [1, 2, 3, 4],
13
+ created_at: '(2012-12-21..2019-12-21)'
14
+ categories.name: 'mobile'
15
+ }
18
16
 
19
17
  ```
20
18
 
@@ -75,12 +73,10 @@ select * from products where created_at = foo
75
73
 
76
74
 
77
75
  ```rb
78
- params = {
79
- filters: {
80
- id: 1,
81
- title: 'foobar'
82
- }
83
- }
76
+ params = {
77
+ id: 1,
78
+ title: 'foobar'
79
+ }
84
80
  ```
85
81
 
86
82
  ```rb
@@ -95,12 +91,10 @@ SELECT "products".* FROM "products" WHERE (products.title like '%foobar%') AND "
95
91
  ### Search Range
96
92
 
97
93
  ```rb
98
- params = {
99
- filters: {
100
- id: '(1..10)',
101
- created_at: '(2012-12-21..2019-12-21)'
102
- }
103
- }
94
+ params = {
95
+ id: '(1..10)',
96
+ created_at: '(2012-12-21..2019-12-21)'
97
+ }
104
98
  ```
105
99
 
106
100
  sql result:
@@ -114,11 +108,9 @@ SELECT "products".* FROM "products" WHERE (products.title like '%foobar%') AND "
114
108
 
115
109
 
116
110
  ```rb
117
- params = {
118
- {
119
- filters: { 'coupons.id': [1,4,8] }
120
- }
121
- }
111
+ params = {
112
+ 'coupons.id': [1,4,8]
113
+ }
122
114
  ```
123
115
 
124
116
  sql result:
@@ -133,12 +125,10 @@ SELECT "products".* FROM "products" INNER JOIN "coupons" ON "coupons"."product_i
133
125
  if your filter parameters contain invalid column name, Searchkon skip it and create query without that column.
134
126
 
135
127
  ```rb
136
- invalid_mock_params = {
137
- filters: {
138
- id: 1,
139
- foo: 'foobar'
140
- }
141
- }
128
+ invalid_mock_params = {
129
+ id: 1,
130
+ foo: 'foobar'
131
+ }
142
132
  ```
143
133
 
144
134
  ```rb
@@ -1,9 +1,9 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'searchkon'
3
- s.version = '1.0.2'
3
+ s.version = '1.0.3'
4
4
  s.date = '2020-05-24'
5
- s.summary = "Search Command"
6
- s.description = "Advanced activerecord Search Command"
5
+ s.summary = "Advanced activerecord search/filter command"
6
+ s.description = "Advanced activerecord search/filter command"
7
7
  s.authors = ["Majid Imanzade", 'Amin Samadzade']
8
8
  s.email = 'majidimanzade1@gmail.com'
9
9
  s.homepage = 'https://rubygems.org/gems/searchkon'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchkon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Majid Imanzade
@@ -95,7 +95,7 @@ dependencies:
95
95
  - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
- description: Advanced activerecord Search Command
98
+ description: Advanced activerecord search/filter command
99
99
  email: majidimanzade1@gmail.com
100
100
  executables: []
101
101
  extensions: []
@@ -140,5 +140,5 @@ requirements: []
140
140
  rubygems_version: 3.1.2
141
141
  signing_key:
142
142
  specification_version: 4
143
- summary: Search Command
143
+ summary: Advanced activerecord search/filter command
144
144
  test_files: []