|
myTinySQL v0.2.0-2-g5000098
A tiny SQL interpreter over fixed-width text files
|
Functions | |
| std::string | fit (std::string_view text, std::size_t width, char filler) |
| Cuts or pads text to an exact width. | |
| std::string | headerLine (const ResultSet &table) |
Builds the dashed header line of a console table, e.g. ID-------- NOME----. | |
| std::string | jsonString (std::string_view text) |
| Writes text as a JSON string: in double quotes, with quotes, backslashes and control characters escaped. | |
| std::string tinysql::anonymous_namespace{Output.cpp}::fit | ( | std::string_view | text, |
| std::size_t | width, | ||
| char | filler | ||
| ) |
Cuts or pads text to an exact width.
| text | The text. |
| width | The width wanted. |
| filler | The character used for padding (space for values, dash for headers). |
width characters. Definition at line 19 of file Output.cpp.
| std::string tinysql::anonymous_namespace{Output.cpp}::headerLine | ( | const ResultSet & | table | ) |
Builds the dashed header line of a console table, e.g. ID-------- NOME----.
| table | The result set. |
Definition at line 29 of file Output.cpp.
| std::string tinysql::anonymous_namespace{Output.cpp}::jsonString | ( | std::string_view | text | ) |
Writes text as a JSON string: in double quotes, with quotes, backslashes and control characters escaped.
| text | Any text (UTF-8 is passed through unchanged). |
say "hi" becomes "say \"hi\"". Definition at line 44 of file Output.cpp.