- Description:
- [Mirror] Middleware for data
- Last Change:
- Clone URL:
Commit Briefs
datetime: support tz field in :totable() (ligurio/gh-10331-tz-and-tzindex-totable)
`datetime` module has a function `:totable()` that converts the information from a datetime object into the table format. The commit 43e10ed34949 ("build, lua: built-in module datetime") added `tzoffset` field to the datetime object and to table produced by `:totable()`. The commit 9ee45289e012 ("datetime: datetime.TZ array") added fields `tz` and `tzindex` to the datetime object, but not to the table produced by `:totable()`. The patch fixes that. Note, `tzindex` is not added, because it is an internal field. ``` tarantool> datetime.parse('2004-12-01T00:00 Europe/Moscow'):totable() --- - tz: Europe/Moscow sec: 0 min: 0 yday: 336 day: 1 nsec: 0 isdst: false wday: 4 tzoffset: 180 month: 12 year: 2004 hour: 0 ... ``` Fixes #10331 Follows up #6751 @TarantoolBot document Title: Support of tz field in :totable() In addition to the `tzoffset` in a table produced by `:totable` we added `tz` field. ``` tarantool> datetime.parse('2004-12-01T00:00 Europe/Moscow'):totable() --- - tz: Europe/Moscow sec: 0 min: 0 yday: 336 day: 1 nsec: 0 isdst: false wday: 4 tzoffset: 180 month: 12 year: 2004 hour: 0 ... ```
datetime: remove unused function datetime_gmtoff
The function `datetime_gmtoff()` has been introduced in commit aec6fbac1f22 ("datetime: implement date.isdst") for a function `datetime_increment_by()`. In commit 6ca072853034 ("datetime: fix interval arithmetic for DST") the function `datetime_increment_by()` has been updated and call of the function `datetime_gmtoff()` was removed. `datetime_gmtoff` is dead code now. The patch removes `datetime_gmtoff()`. NO_CHANGELOG=codehealth NO_DOC=codehealth NO_TEST=codehealth
datetime: fix typos
The patch fixes a number of typos in datetime source code. NO_CHANGELOG=codehealth NO_DOC=codehealth NO_TEST=codehealth
datetime: fix values of unspecified fields in dt.parse()
datetime object can be created using `datetime.new()` and `datetime.parse()`. `datetime.new()` sets values of unspecified fields to appropriate values of fields in a Unix time (00:00:00 UTC on 1 January 1971, Thursday), see commit 43e10ed34949 ("build, lua: built-in module datetime"): ``` tarantool> datetime.new() --- - 1970-01-01T00:00:00Z ... tarantool> datetime.new():totable() --- - sec: 0 min: 0 yday: 1 day: 1 nsec: 0 isdst: false wday: 5 tzoffset: 0 month: 1 year: 1970 hour: 0 ``` The function `datetime.parse` converts an input string with the date and time information into a datetime object. When fields are not specified in a input string their values becomes undefined: ``` tarantool> dt.parse('01:01:01', {format ='%H:%M:%S'}):totable() --- - sec: -59 min: -58 yday: 366 day: 31 nsec: 0 isdst: false wday: 1 tzoffset: 0 month: 12 year: 0 hour: -22 ... tarantool> ``` The commit fixes aforementioned behaviour of `datetime.parse()` by setting values for fields not specified by user to values of appropriate fields of Unix time. NO_DOC=bugfix Fixes #8588
doc: update config storage doc
Update `config.storage` README to include `tarantool-ee` changes from this PR [1]. Note that these changes are for EE only. [1] https://github.com/tarantool/tarantool-ee/pull/857 Part of https://github.com/tarantool/tarantool-ee/issues/849 NO_DOC=doc_changes NO_TEST=doc_changes NO_CHANGELOG=doc_changes
box: don't require functional index function to be sandboxed
Closes #4765 Closes #10349 @TarantoolBot document Title: Functional index function doesn't have to sandboxed anymore The user may now create a functional index using a function that doesn't have the flag `is_sandboxed`. Note that a functional index function must be deterministic and isn't allowed to yield or access the database so the flag `is_sandboxed` is still recommended. However, there are cases when the user might want to clear the flag. For example, it's the only way to let a functional index function to call a deterministic function defined in a module (e.g. `json.encode`).
txn: first step towards cross-engine transactions
This patch replaces `txn::engine` with `txn::engines[3]`, so that a multi- statement transaction can involve up to 3 storage engines. However, for now the ENGINE_SUPPORTS_CROSS_ENGINE_TX flag is set only for memtx engine (when MVCC is off), so there are no user-visible changes. Needed for #1803 Needed for tarantool/tarantool-ee#823 NO_DOC=No user-visible changes NO_CHANGELOG=No user-visible changes
lua-yaml: wrap large doubles in quotes
Since tarantool/luajit@a16313f large exponent double strings are not considered convertible to number. It broke encoding lua objects to YAML because single quotes weren't considered necessary for decoding. This commit adds wrapping of every string containing infinite double values into a single quotes. Closes #10164 NO_DOC=bug fix
uri: uri.format encapsulate IPv6 address in []
This patch adds encapsulation for IPv6 addresses in brackets when calling uri.format (as per RFC 2732). Closes #9556 NO_DOC=bugfix
uri: fix parsing uppercased IPv6 addresses
Before this patch `uri.parse(<uri-string-with-ipv6-addres>)` did not work correctly. In particular, it did not parse an IPv6 address if it contained `A-F`. It is a regression caused by commit 1376aad9b3fd ("Refactor src/uri.rl to support RFC3986 and add Lua bindings"). This patch fixes a bug where characters `A-F` are not supported in IPv6. Part of #9556 NO_DOC=bugfix
Branches
Tree
README.md
# Tarantool [![Actions Status][actions-badge]][actions-url] [![Code Coverage][coverage-badge]][coverage-url] [![OSS Fuzz][oss-fuzz-badge]][oss-fuzz-url] [![Telegram][telegram-badge]][telegram-url] [![GitHub Discussions][discussions-badge]][discussions-url] [![Stack Overflow][stackoverflow-badge]][stackoverflow-url] [Tarantool][tarantool-url] is an in-memory computing platform consisting of a database and an application server. It is distributed under [BSD 2-Clause][license] terms. Key features of the application server: * Heavily optimized Lua interpreter with incredibly fast tracing JIT compiler, based on LuaJIT 2.1. * Cooperative multitasking, non-blocking IO. * [Persistent queues][queue]. * [Sharding][vshard]. * [Cluster and application management framework][cartridge]. * Access to external databases such as [MySQL][mysql] and [PostgreSQL][pg]. * A rich set of built-in and standalone [modules][modules]. Key features of the database: * MessagePack data format and MessagePack based client-server protocol. * Two data engines: 100% in-memory with complete WAL-based persistence and an own implementation of LSM-tree, to use with large data sets. * Multiple index types: HASH, TREE, RTREE, BITSET. * Document oriented JSON path indexes. * Asynchronous master-master replication. * Synchronous quorum-based replication. * RAFT-based automatic leader election for the single-leader configuration. * Authentication and access control. * ANSI SQL, including views, joins, referential and check constraints. * [Connectors][connectors] for many programming languages. * The database is a C extension of the application server and can be turned off. Supported platforms are Linux (x86_64, aarch64), Mac OS X (x86_64, M1), FreeBSD (x86_64). Tarantool is ideal for data-enriched components of scalable Web architecture: queue servers, caches, stateful Web applications. To download and install Tarantool as a binary package for your OS or using Docker, please see the [download instructions][download]. To build Tarantool from source, see detailed [instructions][building] in the Tarantool documentation. To find modules, connectors and tools for Tarantool, check out our [Awesome Tarantool][awesome-list] list. Please report bugs to our [issue tracker][issue-tracker]. We also warmly welcome your feedback on the [discussions][discussions-url] page and questions on [Stack Overflow][stackoverflow-url]. We accept contributions via pull requests. Check out our [contributing guide][contributing]. Thank you for your interest in Tarantool! [actions-badge]: https://github.com/tarantool/tarantool/workflows/release/badge.svg [actions-url]: https://github.com/tarantool/tarantool/actions [coverage-badge]: https://coveralls.io/repos/github/tarantool/tarantool/badge.svg?branch=master [coverage-url]: https://coveralls.io/github/tarantool/tarantool?branch=master [telegram-badge]: https://img.shields.io/badge/Telegram-join%20chat-blue.svg [telegram-url]: http://telegram.me/tarantool [discussions-badge]: https://img.shields.io/github/discussions/tarantool/tarantool [discussions-url]: https://github.com/tarantool/tarantool/discussions [stackoverflow-badge]: https://img.shields.io/badge/stackoverflow-tarantool-orange.svg [stackoverflow-url]: https://stackoverflow.com/questions/tagged/tarantool [oss-fuzz-badge]: https://oss-fuzz-build-logs.storage.googleapis.com/badges/tarantool.svg [oss-fuzz-url]: https://oss-fuzz.com/coverage-report/job/libfuzzer_asan_tarantool/latest [tarantool-url]: https://www.tarantool.io/en/ [license]: LICENSE [modules]: https://www.tarantool.io/en/download/rocks [queue]: https://github.com/tarantool/queue [vshard]: https://github.com/tarantool/vshard [cartridge]: https://github.com/tarantool/cartridge [mysql]: https://github.com/tarantool/mysql [pg]: https://github.com/tarantool/pg [connectors]: https://www.tarantool.io/en/download/connectors [download]: https://www.tarantool.io/en/download/ [building]: https://www.tarantool.io/en/doc/latest/dev_guide/building_from_source/ [issue-tracker]: https://github.com/tarantool/tarantool/issues [contributing]: CONTRIBUTING.md [awesome-list]: https://github.com/tarantool/awesome-tarantool/