|
| bool | morph::table::detail::shouldYield (Deadline deadline, ::core::async::StopToken const &stop) |
| | Whether a step should return now.
|
| TextCollator const & | morph::table::detail::collatorOf (Services const &services) |
| | The collator to use: the service's, or the default.
|
| DateParser const & | morph::table::detail::datesOf (Services const &services) |
| | The date parser to use: the service's, or the default.
|
| std::optional< std::int64_t > | morph::table::detail::parseInteger (std::string_view text) |
| | Parses a whole decimal integer, all of text.
|
| std::optional< double > | morph::table::detail::parseRealClassic (std::string_view text) |
| | Parses a floating-point number, all of text, through a stream in the classic locale: the fallback of parseReal for a standard library without floating-point from_chars.
|
| std::optional< double > | morph::table::detail::parseReal (std::string_view text) |
| | Parses a floating-point number, all of text.
|
| void | morph::table::buildKeys (RowSnapshot const &snapshot, std::size_t column, ColumnInfo const &info, Services const &services, std::size_t first, std::size_t last, KeyColumn &out) |
| | Builds the keys of rows [first, last) of one column into out.
|
| int | morph::table::compareKeys (KeyColumn const &keys, std::uint32_t left, std::uint32_t right, SortDirection dir) |
| | Compares two rows' keys in one column, valid before invalid in either direction.
|
| std::vector< std::uint32_t > | morph::table::sortRows (std::vector< std::uint32_t > rows, RowOrder order) |
| | Sorts rows by order in one call.
|
Typed sort keys and the chunked, stoppable merge sort over them.
Each column a sort or filter uses gets a KeyColumn: one typed array of keys plus a CellState per cell, built once from a snapshot. Comparing two rows is then a direct compare of two keys, with no parsing and no allocation. Exact kinds stay exact: integers, dates and booleans compare as int64, decimals and quantities as Rational (128-bit cross products); only a Number column holds a double.
Ordering rules, normative for every client and server (spec 7 ยง5):
- an empty or invalid cell sorts after every valid one, in either direction;
- each key of a chain has its own direction;
- ties break by source row, so the sort is stable.
See docs/spec/table/engine.md.
Definition in file sort.hpp.
| std::optional< double > morph::table::detail::parseRealClassic |
( |
std::string_view | text | ) |
|
|
inlinenodiscard |
Parses a floating-point number, all of text, through a stream in the classic locale: the fallback of parseReal for a standard library without floating-point from_chars.
The classic locale, not the global one: a filter value is the wire's text, so its decimal point is . whatever locale the process runs in.
- Parameters
-
- Returns
- The value, or nothing when
text is not exactly a number or is NaN.
Definition at line 136 of file sort.hpp.