tarantool

How do I select a limited number of records from tarantool, like with SELECT LIMIT in SQL?

橙三吉。 提交于 2021-02-10 06:00:13
问题 I want to perform a selection on a Tarantool space, using filtering and limiting the results, as I can do with a simple SQL query like " SELECT * FROM users WHERE age > 33 LIMIT 1 ". How can I achieve that? 回答1: It can be done using Lua as well as SQL. 1) Here is an example in Lua. Assume we have a space named "users" with fields "name", "surname", "age". First, let's create and populate the space: $ tarantool Tarantool 2.1.1-465-gbd1a43fbc type 'help' for interactive help tarantool> box.cfg(

How do I select a limited number of records from tarantool, like with SELECT LIMIT in SQL?

喜夏-厌秋 提交于 2021-02-10 05:59:12
问题 I want to perform a selection on a Tarantool space, using filtering and limiting the results, as I can do with a simple SQL query like " SELECT * FROM users WHERE age > 33 LIMIT 1 ". How can I achieve that? 回答1: It can be done using Lua as well as SQL. 1) Here is an example in Lua. Assume we have a space named "users" with fields "name", "surname", "age". First, let's create and populate the space: $ tarantool Tarantool 2.1.1-465-gbd1a43fbc type 'help' for interactive help tarantool> box.cfg(

Difference between Redis AOF and Tarantool WAL log

不想你离开。 提交于 2021-02-06 14:26:53
问题 I was reading this article about Tarantool and they seem to say that AOF and WAL log are not working the same way. Tarantool: besides snapshots, it has a full-scale WAL (write ahead log). So it can secure data persistency after each transaction out-of-the-box. Redis: in fact, it has snapshots only. Technically, you have AOF (append-only file, where all the operations are written), but it requires manual control over it, including manual restore after reboot. Simply put, with Redis you need to

Difference between Redis AOF and Tarantool WAL log

早过忘川 提交于 2021-02-06 14:21:10
问题 I was reading this article about Tarantool and they seem to say that AOF and WAL log are not working the same way. Tarantool: besides snapshots, it has a full-scale WAL (write ahead log). So it can secure data persistency after each transaction out-of-the-box. Redis: in fact, it has snapshots only. Technically, you have AOF (append-only file, where all the operations are written), but it requires manual control over it, including manual restore after reboot. Simply put, with Redis you need to

Difference between Redis AOF and Tarantool WAL log

浪子不回头ぞ 提交于 2021-02-06 14:20:58
问题 I was reading this article about Tarantool and they seem to say that AOF and WAL log are not working the same way. Tarantool: besides snapshots, it has a full-scale WAL (write ahead log). So it can secure data persistency after each transaction out-of-the-box. Redis: in fact, it has snapshots only. Technically, you have AOF (append-only file, where all the operations are written), but it requires manual control over it, including manual restore after reboot. Simply put, with Redis you need to

How I can to get custom options in the `init` function of the Tarantool Cartridge role?

ぃ、小莉子 提交于 2021-01-27 05:14:39
问题 A Tarantool Cartridge role file has a function init . I want to get my custom options from the instance.yml file. But the opts variable doesn't have it. How I can do it? 回答1: Cartridge has a built-in module called "argparse". It parses a few sources of configuration and combines them together: instances.yml or files in /etc/tarantool/conf.d command line arguments environment variables starting with TARANTOOL_ Cartridge uses this module to get various pieces of configuration like the port