Skip to content

Commit b42e022

Browse files
authored
fix typos in error messages and comments
* `doesn\'t exists` -> `doesn\'t exist` * `specifed` -> `specified` * `buckect_id` -> `bucket_id`
1 parent dcb04ff commit b42e022

File tree

9 files changed

+28
-28
lines changed

9 files changed

+28
-28
lines changed

crud/delete.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ local function call_delete_on_storage(space_name, key)
1818

1919
local space = box.space[space_name]
2020
if space == nil then
21-
return nil, DeleteError:new("Space %q doesn't exists", space_name)
21+
return nil, DeleteError:new("Space %q doesn't exist", space_name)
2222
end
2323

2424
local tuple = space:delete(key)
@@ -58,7 +58,7 @@ function delete.call(space_name, key, opts)
5858

5959
local space = utils.get_space(space_name, vshard.router.routeall())
6060
if space == nil then
61-
return nil, DeleteError:new("Space %q doesn't exists", space_name)
61+
return nil, DeleteError:new("Space %q doesn't exist", space_name)
6262
end
6363

6464
if box.tuple.is(key) then

crud/get.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ local function call_get_on_storage(space_name, key)
1818

1919
local space = box.space[space_name]
2020
if space == nil then
21-
return nil, GetError:new("Space %q doesn't exists", space_name)
21+
return nil, GetError:new("Space %q doesn't exist", space_name)
2222
end
2323

2424
local tuple = space:get(key)
@@ -31,7 +31,7 @@ function get.init()
3131
})
3232
end
3333

34-
--- Get tuple from the specifed space by key
34+
--- Get tuple from the specified space by key
3535
--
3636
-- @function call
3737
--
@@ -57,7 +57,7 @@ function get.call(space_name, key, opts)
5757

5858
local space = utils.get_space(space_name, vshard.router.routeall())
5959
if space == nil then
60-
return nil, GetError:new("Space %q doesn't exists", space_name)
60+
return nil, GetError:new("Space %q doesn't exist", space_name)
6161
end
6262

6363
if box.tuple.is(key) then

crud/insert.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ local function call_insert_on_storage(space_name, tuple)
1818

1919
local space = box.space[space_name]
2020
if space == nil then
21-
return nil, InsertError:new("Space %q doesn't exists", space_name)
21+
return nil, InsertError:new("Space %q doesn't exist", space_name)
2222
end
2323

2424
return space:insert(tuple)
@@ -30,7 +30,7 @@ function insert.init()
3030
})
3131
end
3232

33-
--- Inserts tuple to the specifed space
33+
--- Inserts tuple to the specified space
3434
--
3535
-- @function call
3636
--
@@ -59,7 +59,7 @@ function insert.call(space_name, obj, opts)
5959

6060
local space = utils.get_space(space_name, vshard.router.routeall())
6161
if space == nil then
62-
return nil, InsertError:new("Space %q doesn't exists", space_name)
62+
return nil, InsertError:new("Space %q doesn't exist", space_name)
6363
end
6464
local space_format = space:format()
6565

crud/replace.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ local function call_replace_on_storage(space_name, tuple)
1818

1919
local space = box.space[space_name]
2020
if space == nil then
21-
return nil, ReplaceError:new("Space %q doesn't exists", space_name)
21+
return nil, ReplaceError:new("Space %q doesn't exist", space_name)
2222
end
2323

2424
return space:replace(tuple)
@@ -30,7 +30,7 @@ function replace.init()
3030
})
3131
end
3232

33-
--- Insert or replace a tuple in the specifed space
33+
--- Insert or replace a tuple in the specified space
3434
--
3535
-- @function call
3636
--
@@ -56,11 +56,11 @@ function replace.call(space_name, obj, opts)
5656

5757
local space = utils.get_space(space_name, vshard.router.routeall())
5858
if space == nil then
59-
return nil, ReplaceError:new("Space %q doesn't exists", space_name)
59+
return nil, ReplaceError:new("Space %q doesn't exist", space_name)
6060
end
6161

6262
local space_format = space:format()
63-
-- compute default buckect_id
63+
-- compute default bucket_id
6464
local tuple, err = utils.flatten(obj, space_format)
6565
if err ~= nil then
6666
return nil, ReplaceError:new("Object is specified in bad format: %s", err)

crud/select.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ local function call_select_on_storage(space_name, index_id, conditions, opts)
3535

3636
local space = box.space[space_name]
3737
if space == nil then
38-
return nil, SelectError:new("Space %s doesn't exists", space_name)
38+
return nil, SelectError:new("Space %s doesn't exist", space_name)
3939
end
4040

4141
local index = space.index[index_id]
4242
if index == nil then
43-
return nil, SelectError:new("Index with ID %s doesn't exists", index_id)
43+
return nil, SelectError:new("Index with ID %s doesn't exist", index_id)
4444
end
4545

4646
local filter_func, err = select_filters.gen_func(space, conditions, {
@@ -145,7 +145,7 @@ local function build_select_iterator(space_name, user_conditions, opts)
145145

146146
local space = utils.get_space(space_name, replicasets)
147147
if space == nil then
148-
return nil, SelectError:new("Space %s doesn't exists", space_name)
148+
return nil, SelectError:new("Space %s doesn't exist", space_name)
149149
end
150150
local space_format = space:format()
151151

crud/update.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ local function call_update_on_storage(space_name, key, operations)
1818

1919
local space = box.space[space_name]
2020
if space == nil then
21-
return nil, UpdateError:new("Space %q doesn't exists", space_name)
21+
return nil, UpdateError:new("Space %q doesn't exist", space_name)
2222
end
2323

2424
local tuple = space:update(key, operations)
@@ -31,7 +31,7 @@ function update.init()
3131
})
3232
end
3333

34-
--- Updates tuple in the specifed space
34+
--- Updates tuple in the specified space
3535
--
3636
-- @function call
3737
--
@@ -61,7 +61,7 @@ function update.call(space_name, key, user_operations, opts)
6161

6262
local space = utils.get_space(space_name, vshard.router.routeall())
6363
if space == nil then
64-
return nil, UpdateError:new("Space %q doesn't exists", space_name)
64+
return nil, UpdateError:new("Space %q doesn't exist", space_name)
6565
end
6666
local space_format = space:format()
6767

crud/upsert.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ local function call_upsert_on_storage(space_name, tuple, operations)
1818

1919
local space = box.space[space_name]
2020
if space == nil then
21-
return nil, UpsertError:new("Space %q doesn't exists", space_name)
21+
return nil, UpsertError:new("Space %q doesn't exist", space_name)
2222
end
2323

2424
return space:upsert(tuple, operations)
@@ -60,7 +60,7 @@ function upsert.call(space_name, obj, user_operations, opts)
6060

6161
local space = utils.get_space(space_name, vshard.router.routeall())
6262
if space == nil then
63-
return nil, UpsertError:new("Space %q doesn't exists", space_name)
63+
return nil, UpsertError:new("Space %q doesn't exist", space_name)
6464
end
6565

6666
local space_format = space:format()
@@ -69,7 +69,7 @@ function upsert.call(space_name, obj, user_operations, opts)
6969
return nil, UpsertError:new("Wrong operations are specified: %s", err)
7070
end
7171

72-
-- compute default buckect_id
72+
-- compute default bucket_id
7373
local tuple, err = utils.flatten(obj, space_format)
7474
if err ~= nil then
7575
return nil, UpsertError:new("Object is specified in bad format: %s", err)

test/integration/select_test.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ add('test_non_existent_space', function(g)
116116
]])
117117

118118
t.assert_equals(obj, nil)
119-
t.assert_str_contains(err.err, "Space non_existent_space doesn't exists")
119+
t.assert_str_contains(err.err, "Space non_existent_space doesn't exist")
120120
end)
121121

122122
add('test_select_all', function(g)

test/integration/simple_operations_test.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ add('test_non_existent_space', function(g)
8989
]])
9090

9191
t.assert_equals(obj, nil)
92-
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exists')
92+
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exist')
9393

9494
-- get
9595
local obj, err = g.cluster.main_server.net_box:eval([[
@@ -98,7 +98,7 @@ add('test_non_existent_space', function(g)
9898
]])
9999

100100
t.assert_equals(obj, nil)
101-
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exists')
101+
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exist')
102102

103103
-- update
104104
local obj, err = g.cluster.main_server.net_box:eval([[
@@ -107,7 +107,7 @@ add('test_non_existent_space', function(g)
107107
]])
108108

109109
t.assert_equals(obj, nil)
110-
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exists')
110+
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exist')
111111

112112
-- delete
113113
local obj, err = g.cluster.main_server.net_box:eval([[
@@ -116,7 +116,7 @@ add('test_non_existent_space', function(g)
116116
]])
117117

118118
t.assert_equals(obj, nil)
119-
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exists')
119+
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exist')
120120

121121
-- replace
122122
local obj, err = g.cluster.main_server.net_box:eval([[
@@ -125,7 +125,7 @@ add('test_non_existent_space', function(g)
125125
]])
126126

127127
t.assert_equals(obj, nil)
128-
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exists')
128+
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exist')
129129

130130
-- upsert
131131
local obj, err = g.cluster.main_server.net_box:eval([[
@@ -134,7 +134,7 @@ add('test_non_existent_space', function(g)
134134
]])
135135

136136
t.assert_equals(obj, nil)
137-
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exists')
137+
t.assert_str_contains(err.err, 'Space "non_existent_space" doesn\'t exist')
138138
end)
139139

140140
add('test_insert_get', function(g)

0 commit comments

Comments
 (0)