|
myTinySQL v0.2.0-2-g5000098
A tiny SQL interpreter over fixed-width text files
|
The command-line entry point: options, script mode, interactive mode, server mode. More...
#include <unistd.h>#include <charconv>#include <filesystem>#include <format>#include <fstream>#include <iostream>#include <optional>#include <sstream>#include <string>#include <string_view>#include <vector>#include "Output.hpp"#include "Server.hpp"#include "Session.hpp"Go to the source code of this file.
Classes | |
| struct | anonymous_namespace{main.cpp}::Options |
| The command-line options, after parsing. More... | |
Functions | |
| std::vector< std::string > | anonymous_namespace{main.cpp}::splitList (std::string_view text) |
| Splits a comma-separated list. | |
| Options | anonymous_namespace{main.cpp}::parseOptions (int argc, char **argv) |
Parses the command line. Options take their value as --name=value or --name value. | |
| int | anonymous_namespace{main.cpp}::runScript (Session &session, std::istream &in) |
| Runs a whole script and prints every result. | |
| int | anonymous_namespace{main.cpp}::runInteractive (Session &session) |
Reads statements at a tinysql> prompt until end of input (Ctrl+D). | |
| int | main (int argc, char **argv) |
| Program entry point. | |
Variables | |
| constexpr std::string_view | anonymous_namespace{main.cpp}::kUsage |
The text printed by --help and after a wrong option. | |
The command-line entry point: options, script mode, interactive mode, server mode.
./myTinySql --sqlfile=examples/select.sql run a script ./myTinySql type statements (or pipe them in) ./myTinySql --http browser page on http://localhost:8080
Definition in file main.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |