Skip to content

Commit b992bc0

Browse files
committed
Consistently use singular names for Khepri projections
Previously about half of the Khepri projection names were pluralized.
1 parent 6bf0aac commit b992bc0

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

deps/rabbit/src/rabbit_db_binding.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
-define(MNESIA_SEMI_DURABLE_TABLE, rabbit_semi_durable_route).
5454
-define(MNESIA_REVERSE_TABLE, rabbit_reverse_route).
5555
-define(MNESIA_INDEX_TABLE, rabbit_index_route).
56-
-define(KHEPRI_BINDINGS_PROJECTION, rabbit_khepri_bindings).
56+
-define(KHEPRI_BINDINGS_PROJECTION, rabbit_khepri_binding).
5757
-define(KHEPRI_INDEX_ROUTE_PROJECTION, rabbit_khepri_index_route).
5858

5959
%% -------------------------------------------------------------------

deps/rabbit/src/rabbit_db_rtparams.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
]).
2424

2525
-define(MNESIA_TABLE, rabbit_runtime_parameters).
26-
-define(KHEPRI_GLOBAL_PROJECTION, rabbit_khepri_global_rtparams).
27-
-define(KHEPRI_VHOST_PROJECTION, rabbit_khepri_per_vhost_rtparams).
26+
-define(KHEPRI_GLOBAL_PROJECTION, rabbit_khepri_global_rtparam).
27+
-define(KHEPRI_VHOST_PROJECTION, rabbit_khepri_per_vhost_rtparam).
2828
-define(any(Value), case Value of
2929
'_' -> ?KHEPRI_WILDCARD_STAR;
3030
_ -> Value

deps/rabbit/src/rabbit_db_user.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
-define(MNESIA_TABLE, rabbit_user).
7676
-define(PERM_MNESIA_TABLE, rabbit_user_permission).
7777
-define(TOPIC_PERM_MNESIA_TABLE, rabbit_topic_permission).
78-
-define(KHEPRI_USERS_PROJECTION, rabbit_khepri_users).
79-
-define(KHEPRI_PERMISSIONS_PROJECTION, rabbit_khepri_user_permissions).
78+
-define(KHEPRI_USERS_PROJECTION, rabbit_khepri_user).
79+
-define(KHEPRI_PERMISSIONS_PROJECTION, rabbit_khepri_user_permission).
8080

8181
%% -------------------------------------------------------------------
8282
%% create().

deps/rabbit/src/rabbit_khepri.erl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,21 +1190,21 @@ register_rabbit_vhost_projection() ->
11901190
register_simple_projection(Name, PathPattern, KeyPos).
11911191

11921192
register_rabbit_users_projection() ->
1193-
Name = rabbit_khepri_users,
1193+
Name = rabbit_khepri_user,
11941194
PathPattern = rabbit_db_user:khepri_user_path(
11951195
_UserName = ?KHEPRI_WILDCARD_STAR),
11961196
KeyPos = 2, %% #internal_user.username
11971197
register_simple_projection(Name, PathPattern, KeyPos).
11981198

11991199
register_rabbit_global_runtime_parameters_projection() ->
1200-
Name = rabbit_khepri_global_rtparams,
1200+
Name = rabbit_khepri_global_rtparam,
12011201
PathPattern = rabbit_db_rtparams:khepri_global_rp_path(
12021202
_Key = ?KHEPRI_WILDCARD_STAR_STAR),
12031203
KeyPos = #runtime_parameters.key,
12041204
register_simple_projection(Name, PathPattern, KeyPos).
12051205

12061206
register_rabbit_per_vhost_runtime_parameters_projection() ->
1207-
Name = rabbit_khepri_per_vhost_rtparams,
1207+
Name = rabbit_khepri_per_vhost_rtparam,
12081208
PathPattern = rabbit_db_rtparams:khepri_vhost_rp_path(
12091209
_VHost = ?KHEPRI_WILDCARD_STAR_STAR,
12101210
_Component = ?KHEPRI_WILDCARD_STAR_STAR,
@@ -1213,7 +1213,7 @@ register_rabbit_per_vhost_runtime_parameters_projection() ->
12131213
register_simple_projection(Name, PathPattern, KeyPos).
12141214

12151215
register_rabbit_user_permissions_projection() ->
1216-
Name = rabbit_khepri_user_permissions,
1216+
Name = rabbit_khepri_user_permission,
12171217
PathPattern = rabbit_db_user:khepri_user_permission_path(
12181218
_UserName = ?KHEPRI_WILDCARD_STAR,
12191219
_VHost = ?KHEPRI_WILDCARD_STAR),
@@ -1232,7 +1232,7 @@ register_rabbit_bindings_projection() ->
12321232
ProjectionFun = projection_fun_for_sets(MapFun),
12331233
Options = #{keypos => #route.binding},
12341234
Projection = khepri_projection:new(
1235-
rabbit_khepri_bindings, ProjectionFun, Options),
1235+
rabbit_khepri_binding, ProjectionFun, Options),
12361236
PathPattern = rabbit_db_binding:khepri_route_path(
12371237
_VHost = ?KHEPRI_WILDCARD_STAR,
12381238
_ExchangeName = ?KHEPRI_WILDCARD_STAR,

0 commit comments

Comments
 (0)