pg_eventstore 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: b824856ac1174e2aa2431388e12cd2997256ad4a5638c319d22ee1863c24f4ea
4
- data.tar.gz: 64f73d163abf7a80e9384483857ab1d2cfd38da6d98f2d8f7552a24ac8a7fb3c
3
+ metadata.gz: a831ceaad67e683c14de06960a1d3c2a636bee1dc64563fc50b55e1ed7dd2192
4
+ data.tar.gz: c533045245c6b7651d0a59bdf1b209e922a67ef28a3cf7e907bf2cec1c107c36
5
5
  SHA512:
6
- metadata.gz: c37a3572d224ed2706bf31d416da5bdfb91f37323225fd1f60f060eb76cd96ff33907055f32924cc6d155aa8abae44056e1f982eff560dcca27b70f0c43afa3e
7
- data.tar.gz: 891b7a1e7697b31f53964aeacfe9ae516294421c63e9a7d7095b0bd9489b5cf56ef9101639317cd5894d2f4e7f72b51be6ea14c9b7e5c238aaee2e25379d7a7b
6
+ metadata.gz: 6339701672ccb0dbd37fafccf4abe52ae9d02369256e5ccd01dc7fbbffd4573e68278e4a420224123be9391cf4f59ab74d250832b2f3ce289f127c88ab15c2d1
7
+ data.tar.gz: 207f162bdce04b1caa2deb332f327b9e75fba091faa61a8d8df91db3efaa93695a99e484050d2aab239d3800f4bd4090586e79ca21eade6a0970d05f2dbf0cba
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.1.1]
4
+ - Allow case insensitive search by context, stream name and event type in admin UI
5
+
3
6
  ## [1.1.0]
4
7
  - Add "Reset position" button on Subscriptions Admin UI page
5
8
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgEventstore
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
@@ -15,7 +15,7 @@ module PgEventstore
15
15
  where('context is not null and stream_name is not null').
16
16
  group('event_type').order("event_type #{order}").limit(per_page)
17
17
  sql_builder.where("event_type #{direction_operator} ?", starting_id) if starting_id
18
- sql_builder.where('event_type like ?', "#{options[:query]}%")
18
+ sql_builder.where('event_type ilike ?', "#{options[:query]}%")
19
19
  connection.with do |conn|
20
20
  conn.exec_params(*sql_builder.to_exec_params)
21
21
  end.to_a
@@ -30,7 +30,8 @@ module PgEventstore
30
30
  sql_builder =
31
31
  SQLBuilder.new.select('event_type').from('partitions').
32
32
  where('context is not null and stream_name is not null').
33
- where("event_type #{direction_operator} ?", starting_id).where('event_type like ?', "#{options[:query]}%").
33
+ where("event_type #{direction_operator} ?", starting_id).
34
+ where('event_type ilike ?', "#{options[:query]}%").
34
35
  group('event_type').order("event_type #{order}").limit(1).offset(per_page)
35
36
 
36
37
  connection.with do |conn|
@@ -14,7 +14,7 @@ module PgEventstore
14
14
  SQLBuilder.new.select('context').from('partitions').where('stream_name is null and event_type is null')
15
15
  .limit(per_page).order("context #{order}")
16
16
  sql_builder.where("context #{direction_operator} ?", starting_id) if starting_id
17
- sql_builder.where('context like ?', "#{options[:query]}%")
17
+ sql_builder.where('context ilike ?', "#{options[:query]}%")
18
18
  connection.with do |conn|
19
19
  conn.exec_params(*sql_builder.to_exec_params)
20
20
  end.to_a
@@ -28,7 +28,7 @@ module PgEventstore
28
28
  starting_id = collection.first['context']
29
29
  sql_builder =
30
30
  SQLBuilder.new.select('context').from('partitions').where('stream_name is null and event_type is null').
31
- where("context #{direction_operator} ?", starting_id).where('context like ?', "#{options[:query]}%").
31
+ where("context #{direction_operator} ?", starting_id).where('context ilike ?', "#{options[:query]}%").
32
32
  limit(1).offset(per_page).order("context #{order}")
33
33
 
34
34
  connection.with do |conn|
@@ -13,7 +13,7 @@ module PgEventstore
13
13
  sql_builder =
14
14
  SQLBuilder.new.select('stream_name').from('partitions').
15
15
  where('event_type is null and context = ?', options[:context]).
16
- where('stream_name like ?', "#{options[:query]}%")
16
+ where('stream_name ilike ?', "#{options[:query]}%")
17
17
  sql_builder.where("stream_name #{direction_operator} ?", starting_id) if starting_id
18
18
  sql_builder.limit(per_page).order("stream_name #{order}")
19
19
  connection.with do |conn|
@@ -30,7 +30,7 @@ module PgEventstore
30
30
  sql_builder =
31
31
  SQLBuilder.new.select('stream_name').from('partitions').
32
32
  where("stream_name #{direction_operator} ?", starting_id).
33
- where('stream_name like ?', "#{options[:query]}%").
33
+ where('stream_name ilike ?', "#{options[:query]}%").
34
34
  where('event_type is null and context = ?', options[:context]).
35
35
  limit(1).offset(per_page).order("stream_name #{order}")
36
36
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_eventstore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Dzyzenko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-08 00:00:00.000000000 Z
11
+ date: 2024-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg