Top.Mail.Ru
space_object:alter() | Tarantool
 
Submodule box.space / space_object:alter()
Submodule box.space / space_object:alter()

space_object:alter()

space_object:alter()

object space_object
space_object:alter(options)

Since version 2.5.2. Alter an existing space. This method changes certain space parameters.

Parameters:
Return:

nothing in case of success; an error when fails

Example:

tarantool> s = box.schema.create_space('tester')
---
...
tarantool> format = {{name = 'field1', type = 'unsigned'}}
---
...
tarantool> s:alter({name = 'tester1', format = format})
---
...
tarantool> s.name
---
- tester1
...
tarantool> s:format()
---
- [{'name': 'field1', 'type': 'unsigned'}]
...