Функция из скрипта:
function test_delete(val)
local result = box.space.upbx_test_redirections.index.name_index:delete(val)
return result
end
Я получаю: "message":"Get() doesn't support partial keys and non-unique indexes"
. Если я звоню из интерпретатора, все ок, я получаю кортеж. Опции мой индекс
name_index: 3: &3
unique: true
parts:
- type: string
is_nullable: false
fieldno: 4
id: 3
type: TREE
space_id: 517
name: name_index
bucket_id: *1
index_name: *3
ID: *0
secondary: *2
значение для теста: 1234567890abcdefghijkl0987654321_uuid
Код для создания пространства:
local upbx_test_redirections = box.schema.space.create(
"upbx_test_redirections",
{
format = {
{"ID", "integer"},
{"bucket_id", "unsigned"},
{"test1", "string"},
{"test2", "string"},
{"test3", "string"},
{"test4", "string"},
{"test5", "string"},
{"test6", "string"},
{"test7", "string"},
{"test8", "string"},
{"test9", "integer"},
{"test10", "integer"},
},
if_not_exists = true,
}
)
и индекс:
upbx_test_redirections:create_index(
"name_index",
{
parts = {"test2"},
unique = true,
if_not_exists = true,
}
)
Решение: необходимо изменить во всех случаях.