`box.session.settings.<setting_name>:set(<new_value>)`.
Example of usage:
```
tarantool> box.session.settings.sql_default_engine
---
- memtx
...
tarantool> box.session.settings.sql_default_engine:set('vinyl')
---
...
```
The table itself represents the (unordered) result of select
from _session_settings space. Every setting is implemented as
a table, so there is no way to retrieve an actual value and use
it until :get() method is introduced.
SQL:
Instead of typing long UPDATE query one can use the SET statement:
`box.execute([[SET "<setting_name>" = <new_value>]])`.
Note, that this query is case sensitive so the name must be quoted.
Example:
```
tarantool> box.execute([[set "sql_default_engine" = 'memtx']])
---
- row_count: 1
...
tarantool> box.execute([[set "sql_defer_foreign_keys" = true]])
---
- row_count: 1
...
```
I am not so sure about binary search anymore. I just found another
probably much faster way - perfect hash function. There is a GNU
tool 'gperf' to generate C code for a given keyset with hash
calculation and search functions.
I fed our settings to it and obtained not so scary result.
File: test.gperf
%%
sql_default_engine
sql_defer_foreign_keys
sql_full_column_names
sql_full_metadata
sql_parser_debug
sql_recursive_triggers
sql_reverse_unordered_selects
sql_select_debug
sql_vdbe_debug
%%
Command: gperf test.gperf > test.c
The test.c file is 122 lines long including some {}, useless
checks, macros, and comments. It could easily be compacted a lot.