Utility class for loading SQL files and parsing queries.
More...
#include <SQLLoader.h>
|
| static std::string | readFile (const std::string &filepath) |
| |
| static void | parseQueries (const std::string &content) |
| |
| static std::string | trim (const std::string &str) |
| |
Utility class for loading SQL files and parsing queries.
◆ SQLLoader()
◆ getQuery()
| const std::string & SQLLoader::getQuery |
( |
const Query |
query | ) |
|
|
static |
Get a query by its ID.
- Parameters
-
| query | The identifier of the query to retrieve. |
- Returns
- A constant reference to the query string.
◆ loadQueriesFromFile()
| void SQLLoader::loadQueriesFromFile |
( |
| ) |
|
|
static |
Load SQL file and parse queries.
◆ loadSchemaFromFile()
| std::string SQLLoader::loadSchemaFromFile |
( |
| ) |
|
|
static |
Load database schema from file.
- Returns
- A string containing the database schema.
◆ parseQueries()
| void SQLLoader::parseQueries |
( |
const std::string & |
content | ) |
|
|
staticprivate |
◆ readFile()
| std::string SQLLoader::readFile |
( |
const std::string & |
filepath | ) |
|
|
staticprivate |
◆ trim()
| std::string SQLLoader::trim |
( |
const std::string & |
str | ) |
|
|
staticprivate |
◆ queries_
| std::unordered_map< Query, std::string > SQLLoader::queries_ {} |
|
staticprivate |
The documentation for this class was generated from the following files: