Skip to content

Update by field names #877

Closed
Closed
@Gerold103

Description

@Gerold103

It is possible now to use field names instead of numbers in update operations. It affects all update and upsert functions, such as of space, tuple, index, netbox connector - everything. Note, that field names are valid for update operations, not for update key. You still can't insert a map directly into box. An example:

box.cfg{}
format = {}
format[1] = {'id', 'unsigned'}
format[2] = {'field', 'unsigned'}
s = box.schema.create_space('test', {format = format})
pk = s:create_index('pk')
s:replace{1, 1}
s:update({1}, {'+', 'field', 1})
---
- [1, 2]
...

Introduced by me in tarantool/tarantool@9ee5cf8.

Metadata

Metadata

Assignees

Labels

featureA new functionalitymanual[location] Tarantool manual, no definite locationserver[area] Task relates to Tarantool's server (core) functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions