Skip to content

Commit 2e4c7fa

Browse files
committed
Style fix
1 parent 199e51e commit 2e4c7fa

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

crud/compare/keydef.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ local function new(replicasets, space_name, field_names, index_name)
5252
local conn = select(2, next(replicasets)).master.conn
5353
local space = conn.space[space_name]
5454
local index = space.index[index_name]
55-
local key = msgpack.encode({index.name, field_names, get_index_paths(index.parts)})
55+
local key = msgpack.encode({index_name, field_names, get_index_paths(index.parts)})
5656

5757
if keydef_cache[key] ~= nil then
5858
return keydef_cache[key]

test/unit/parse_conditions_test.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ g.test_jsonpath_parse = function()
112112
{'>=', '[\'year\'].a["f2"][\'f3\']', 2017},
113113
}
114114

115-
local conditions, err = select_conditions.parse(user_conditions)
115+
local conditions, err = compare_conditions.parse(user_conditions)
116116
t.assert(err == nil)
117117
t.assert_equals(conditions, {
118118
cond_funcs.eq('[\'name\']', 'Alexey'),

test/unit/select_filters_test.lua

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ g.test_parse = function()
8484
local age_filter_condition = filter_conditions[1]
8585
t.assert_type(age_filter_condition, 'table')
8686
t.assert_equals(age_filter_condition.fields, {5})
87-
t.assert_equals(age_filter_condition.operator, select_conditions.operators.LT)
87+
t.assert_equals(age_filter_condition.operator, compare_conditions.operators.LT)
8888
t.assert_equals(age_filter_condition.values, {40})
8989
t.assert_equals(age_filter_condition.types, {'number'})
9090
t.assert_equals(age_filter_condition.early_exit_is_possible, true)
@@ -93,7 +93,7 @@ g.test_parse = function()
9393
local full_name_filter_condition = filter_conditions[2]
9494
t.assert_type(full_name_filter_condition, 'table')
9595
t.assert_equals(full_name_filter_condition.fields, {3, 4})
96-
t.assert_equals(full_name_filter_condition.operator, select_conditions.operators.EQ)
96+
t.assert_equals(full_name_filter_condition.operator, compare_conditions.operators.EQ)
9797
t.assert_equals(full_name_filter_condition.values, {'Ivan', 'Ivanov'})
9898
t.assert_equals(full_name_filter_condition.types, {'string', 'string'})
9999
t.assert_equals(full_name_filter_condition.early_exit_is_possible, false)
@@ -116,7 +116,7 @@ g.test_parse = function()
116116
local has_a_car_filter_condition = filter_conditions[3]
117117
t.assert_type(has_a_car_filter_condition, 'table')
118118
t.assert_equals(has_a_car_filter_condition.fields, {7})
119-
t.assert_equals(has_a_car_filter_condition.operator, select_conditions.operators.EQ)
119+
t.assert_equals(has_a_car_filter_condition.operator, compare_conditions.operators.EQ)
120120
t.assert_equals(has_a_car_filter_condition.values, {true})
121121
t.assert_equals(has_a_car_filter_condition.types, {'boolean'})
122122
t.assert_equals(has_a_car_filter_condition.early_exit_is_possible, false)
@@ -131,7 +131,7 @@ g.test_one_condition_number = function()
131131
local filter_conditions = {
132132
{
133133
fields = {1},
134-
operator = select_conditions.operators.EQ,
134+
operator = compare_conditions.operators.EQ,
135135
values = {3},
136136
types = {'number'},
137137
early_exit_is_possible = true,
@@ -168,7 +168,7 @@ g.test_one_condition_boolean = function()
168168
local filter_conditions = {
169169
{
170170
fields = {1},
171-
operator = select_conditions.operators.EQ,
171+
operator = compare_conditions.operators.EQ,
172172
values = {true},
173173
types = {'boolean'},
174174
early_exit_is_possible = true,
@@ -208,7 +208,7 @@ g.test_one_condition_string = function()
208208
local filter_conditions = {
209209
{
210210
fields = {2},
211-
operator = select_conditions.operators.GT,
211+
operator = compare_conditions.operators.GT,
212212
values = {'dddddddd'},
213213
types = {'string'},
214214
early_exit_is_possible = true,
@@ -305,7 +305,7 @@ g.test_two_conditions_non_nullable = function()
305305
local filter_conditions = {
306306
{
307307
fields = {2, 3},
308-
operator = select_conditions.operators.GE,
308+
operator = compare_conditions.operators.GE,
309309
values = {"test", 5},
310310
types = {'string', 'number'},
311311
early_exit_is_possible = false,
@@ -316,7 +316,7 @@ g.test_two_conditions_non_nullable = function()
316316
},
317317
{
318318
fields = {1},
319-
operator = select_conditions.operators.LT,
319+
operator = compare_conditions.operators.LT,
320320
values = {3},
321321
types = {'number'},
322322
early_exit_is_possible = true,
@@ -373,7 +373,7 @@ g.test_one_condition_with_nil_value = function()
373373
local filter_conditions = {
374374
{
375375
fields = {2, 3},
376-
operator = select_conditions.operators.GE,
376+
operator = compare_conditions.operators.GE,
377377
values = {"test"},
378378
types = {'string', 'number'},
379379
early_exit_is_possible = false,
@@ -416,7 +416,7 @@ g.test_unicode_collation = function()
416416
local filter_conditions = {
417417
{
418418
fields = {1, 2, 3, 4},
419-
operator = select_conditions.operators.EQ,
419+
operator = compare_conditions.operators.EQ,
420420
values = {'A', 'Á', 'Ä', 6},
421421
types = {'string', 'string', 'string', 'number'},
422422
early_exit_is_possible = false,
@@ -462,7 +462,7 @@ g.test_binary_and_none_collation = function()
462462
local filter_conditions = {
463463
{
464464
fields = {1, 2, 3},
465-
operator = select_conditions.operators.EQ,
465+
operator = compare_conditions.operators.EQ,
466466
values = {'A', 'B', 'C'},
467467
types = {'string', 'string', 'string'},
468468
early_exit_is_possible = false,
@@ -507,7 +507,7 @@ g.test_null_as_last_value_eq = function()
507507
local filter_conditions = {
508508
{
509509
fields = {1, 2},
510-
operator = select_conditions.operators.EQ,
510+
operator = compare_conditions.operators.EQ,
511511
values = {'a', box.NULL},
512512
types = {'string', 'string'},
513513
early_exit_is_possible = false,
@@ -548,7 +548,7 @@ g.test_null_as_last_value_gt = function()
548548
local filter_conditions = {
549549
{
550550
fields = {1, 2},
551-
operator = select_conditions.operators.GT,
551+
operator = compare_conditions.operators.GT,
552552
values = {'a', box.NULL},
553553
types = {'string', 'string'},
554554
early_exit_is_possible = false,
@@ -595,7 +595,7 @@ g.test_null_as_last_value_gt_non_nullable = function()
595595
local filter_conditions = {
596596
{
597597
fields = {1, 2},
598-
operator = select_conditions.operators.GT,
598+
operator = compare_conditions.operators.GT,
599599
values = {'a', box.NULL},
600600
types = {'string', 'string'},
601601
early_exit_is_possible = false,
@@ -642,7 +642,7 @@ g.test_jsonpath_fields_eq = function()
642642
local filter_conditions = {
643643
{
644644
fields = {'[2].a.b'},
645-
operator = select_conditions.operators.EQ,
645+
operator = compare_conditions.operators.EQ,
646646
values = {55},
647647
types = {'number'},
648648
early_exit_is_possible = true,
@@ -680,7 +680,7 @@ g.test_jsonpath_fields_ge = function()
680680
local filter_conditions = {
681681
{
682682
fields = {'[2]["field_2"]'},
683-
operator = select_conditions.operators.GT,
683+
operator = compare_conditions.operators.GT,
684684
values = {23},
685685
types = {'number'},
686686
early_exit_is_possible = true,
@@ -720,7 +720,7 @@ g.test_several_jsonpath = function()
720720
local filter_conditions = {
721721
{
722722
fields = {'[3]["f2"][\'f3\']', '[4].f3'},
723-
operator = select_conditions.operators.EQ,
723+
operator = compare_conditions.operators.EQ,
724724
values = {'a', 'b'},
725725
types = {'string', 'string'},
726726
early_exit_is_possible = true,
@@ -758,14 +758,14 @@ g.test_jsonpath_two_conditions = function()
758758
local filter_conditions = {
759759
{
760760
fields = {'[2].fld_1', '[3]["f_1"]'},
761-
operator = select_conditions.operators.GE,
761+
operator = compare_conditions.operators.GE,
762762
values = {"jsonpath_test", 23},
763763
types = {'string', 'number'},
764764
early_exit_is_possible = false,
765765
},
766766
{
767767
fields = {'[1].field_1'},
768-
operator = select_conditions.operators.LT,
768+
operator = compare_conditions.operators.LT,
769769
values = {8},
770770
types = {'number'},
771771
early_exit_is_possible = true,

test/unit/select_filters_uuid_test.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ g.test_parse = function()
7474
local uuid_filter_condition = filter_conditions[1]
7575
t.assert_type(uuid_filter_condition, 'table')
7676
t.assert_equals(uuid_filter_condition.fields, {1})
77-
t.assert_equals(uuid_filter_condition.operator, select_conditions.operators.LT)
77+
t.assert_equals(uuid_filter_condition.operator, compare_conditions.operators.LT)
7878
t.assert_equals(uuid_filter_condition.values, {uuid2})
7979
t.assert_equals(uuid_filter_condition.types, {'uuid'})
8080
t.assert_equals(uuid_filter_condition.early_exit_is_possible, true)
@@ -83,7 +83,7 @@ g.test_parse = function()
8383
local name_filter_condition = filter_conditions[2]
8484
t.assert_type(name_filter_condition, 'table')
8585
t.assert_equals(name_filter_condition.fields, {3})
86-
t.assert_equals(name_filter_condition.operator, select_conditions.operators.EQ)
86+
t.assert_equals(name_filter_condition.operator, compare_conditions.operators.EQ)
8787
t.assert_equals(name_filter_condition.values, {'Charlie'})
8888
t.assert_equals(name_filter_condition.types, {'string'})
8989
t.assert_equals(name_filter_condition.early_exit_is_possible, false)
@@ -92,7 +92,7 @@ g.test_parse = function()
9292
local category_id_filter_condition = filter_conditions[3]
9393
t.assert_type(category_id_filter_condition, 'table')
9494
t.assert_equals(category_id_filter_condition.fields, {4})
95-
t.assert_equals(category_id_filter_condition.operator, select_conditions.operators.EQ)
95+
t.assert_equals(category_id_filter_condition.operator, compare_conditions.operators.EQ)
9696
t.assert_equals(category_id_filter_condition.values, {uuid3})
9797
t.assert_equals(category_id_filter_condition.types, {'uuid'})
9898
t.assert_equals(category_id_filter_condition.early_exit_is_possible, false)
@@ -112,7 +112,7 @@ g.test_one_condition_uuid = function()
112112
local filter_conditions = {
113113
{
114114
fields = {1},
115-
operator = select_conditions.operators.EQ,
115+
operator = compare_conditions.operators.EQ,
116116
values = {uuid1},
117117
types = {'uuid'},
118118
early_exit_is_possible = true,
@@ -154,7 +154,7 @@ g.test_one_condition_uuid_gt = function()
154154
local filter_conditions = {
155155
{
156156
fields = {1},
157-
operator = select_conditions.operators.GT,
157+
operator = compare_conditions.operators.GT,
158158
values = {uuid1},
159159
types = {'uuid'},
160160
early_exit_is_possible = true,
@@ -199,7 +199,7 @@ g.test_one_condition_uuid_with_nil_value = function()
199199
local filter_conditions = {
200200
{
201201
fields = {1, 3},
202-
operator = select_conditions.operators.GE,
202+
operator = compare_conditions.operators.GE,
203203
values = {uuid1},
204204
types = {'uuid', 'string'},
205205
early_exit_is_possible = false,
@@ -247,14 +247,14 @@ g.test_two_conditions_uuid = function()
247247
local filter_conditions = {
248248
{
249249
fields = {2},
250-
operator = select_conditions.operators.EQ,
250+
operator = compare_conditions.operators.EQ,
251251
values = {'Charlie'},
252252
types = {'string'},
253253
early_exit_is_possible = true,
254254
},
255255
{
256256
fields = {3},
257-
operator = select_conditions.operators.GE,
257+
operator = compare_conditions.operators.GE,
258258
values = {uuid2:str()},
259259
types = {'uuid'},
260260
early_exit_is_possible = false,

0 commit comments

Comments
 (0)