<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 17 Mar 2020, at 17:27, Nikita Pettik <<a href="mailto:korablev@tarantool.org" class="">korablev@tarantool.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">On 16 Mar 23:53, Vladislav Shpilevoy wrote:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">On 16/03/2020 17:08, Nikita Pettik wrote:<br class=""><blockquote type="cite" class="">On 17 Feb 15:12, Chris Sosnin wrote:<br class=""><blockquote type="cite" class="">- space_object:update() is hard to use for configuring session settings,<br class="">so we provide box.session.setting table, which can be used in a much more<br class="">native way.<br class=""><br class="">- Prior to this patch sql settings were not accessible before box.cfg()<br class="">call, even though these flags can be set right after session creation.<br class=""><br class="">Part of #4711<br class="">---<br class=""></blockquote><br class="">tarantool> box.session.settings.sql_vdbe_debug<br class="">---<br class="">- false<br class="">...<br class=""><br class="">tarantool> box.session.settings.sql_vdbe_debug = true<br class="">---<br class="">...<br class=""><br class="">tarantool> box.session.settings.sql_vdbe_debug<br class="">---<br class="">- true<br class="">...<br class=""></blockquote><br class="">Yeah, we can ban this. To avoid confusion.<br class=""><br class=""><blockquote type="cite" class=""><br class="">tarantool> box.execute("select 1")<br class="">---<br class="">- metadata:<br class=""> - name: '1'<br class="">   type: integer<br class=""> rows:<br class=""> - [1]<br class="">...<br class=""><br class="">Looks inconsistent. Can we use instead of :set() method simple<br class="">table value assignment? Otherwise accessing row table values<br class=""></blockquote><br class="">Assignment would require not to store settings in box.session.settings,<br class="">to be able to redefine __newindex metamethod. If we don't store them, we<br class="">kill autocompletion, which was asked explicitly by somebody.<br class=""><br class="">But I am on your side here - I don't think autocompletion worth this<br class="">complication. Who wants to look at existing settings can just print<br class="">box.sessions.settings table.<br class=""><br class=""><blockquote type="cite" class="">should be disallowed. Same concerns :get() method. Why ever<br class="">anyone should bother with :get() when one can access table value<br class="">via simple indexing?<br class=""></blockquote><br class="">Hm. But there is no :get() method. We didn't implement getting, because<br class="">no one asked for this.<br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">As far as I remember no one either asked for :set() method (except for me) :)</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div></blockquote><div><br class=""></div>This method is a workaround to allow console autocompletion, Lua doesn’t allow you to overload</div><div>indexing for the keys already present in the table. But here I agree that this implementation is rather</div><div>misleading. I will rework the patch to allow settings.<name> = <value> syntax.</div><div><br class=""><blockquote type="cite" class=""><div class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">And indeed, usually you just set settings, without<br class="">checking if set really worked. I was thinking we could introduce get if<br class="">someone asks for that. But up to you. Can be added now as well.<br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">I do not insist since do not consider this to be prio1 task (as well</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">as any other issue connected with settings machinery).</span></div></blockquote></div><br class=""></body></html>