API Entry point for building SQL queries.
More...
#include <SqlQuery.hpp>
|
| | SqlQueryBuilder (SqlQueryFormatter const &formatter, std::string &&table={}, std::string &&alias={}) noexcept |
| | Constructs a new query builder for the given table.
|
| |
|
LIGHTWEIGHT_API SqlQueryBuilder & | FromTable (std::string table) |
| | Constructs a new query builder for the given table.
|
| |
|
LIGHTWEIGHT_API SqlQueryBuilder & | FromTable (std::string_view table) |
| | Constructs a new query builder for the given table.
|
| |
| template<size_t N> |
| SqlQueryBuilder & | FromTable (char const (&table)[N]) |
| | Constructs a new query builder for the given table.
|
| |
|
LIGHTWEIGHT_API SqlQueryBuilder & | FromTableAs (std::string table, std::string alias) |
| | Constructs a new query builder for the given table with an alias.
|
| |
| LIGHTWEIGHT_API SqlQueryBuilder & | FromSchemaTable (std::string_view schema, std::string_view table) |
| |
| LIGHTWEIGHT_API SqlInsertQueryBuilder | Insert (std::vector< SqlVariant > *boundInputs=nullptr) noexcept |
| |
|
LIGHTWEIGHT_API SqlLastInsertIdQuery | LastInsertId () |
| | Constructs a query to retrieve the last insert ID for the given table.
|
| |
|
LIGHTWEIGHT_API SqlSelectQueryBuilder | Select () noexcept |
| | Initiates SELECT query building.
|
| |
| LIGHTWEIGHT_API SqlUpdateQueryBuilder | Update (std::vector< SqlVariant > *boundInputs=nullptr) noexcept |
| |
|
LIGHTWEIGHT_API SqlDeleteQueryBuilder | Delete () noexcept |
| | Initiates DELETE query building.
|
| |
|
LIGHTWEIGHT_API SqlMigrationQueryBuilder | Migration () |
| | Initiates query for building database migrations.
|
| |
API Entry point for building SQL queries.
Definition at line 28 of file SqlQuery.hpp.
◆ SqlQueryBuilder()
| LIGHTWEIGHT_FORCE_INLINE Lightweight::SqlQueryBuilder::SqlQueryBuilder |
( |
SqlQueryFormatter const & |
formatter, |
|
|
std::string && |
table = {}, |
|
|
std::string && |
alias = {} |
|
) |
| |
|
inlineexplicitnoexcept |
Constructs a new query builder for the given table.
Definition at line 90 of file SqlQuery.hpp.
◆ FromTable()
template<size_t N>
| SqlQueryBuilder & Lightweight::SqlQueryBuilder::FromTable |
( |
char const (&) |
table[N] | ) |
|
|
inline |
Constructs a new query builder for the given table.
Definition at line 44 of file SqlQuery.hpp.
◆ FromSchemaTable()
| LIGHTWEIGHT_API SqlQueryBuilder & Lightweight::SqlQueryBuilder::FromSchemaTable |
( |
std::string_view |
schema, |
|
|
std::string_view |
table |
|
) |
| |
Constructs a new query builder for the given schema and table.
- Parameters
-
| schema | The schema name (e.g., "public", "dbo") |
| table | The table name |
◆ Insert()
Initiates INSERT query building
- Parameters
-
| boundInputs | Optional vector to store bound inputs. If provided, the inputs will be appended to this vector and can be used to bind the values to the query via SqlStatement::ExecuteWithVariants(...) |
◆ Update()
| LIGHTWEIGHT_API SqlUpdateQueryBuilder Lightweight::SqlQueryBuilder::Update |
( |
std::vector< SqlVariant > * |
boundInputs = nullptr | ) |
|
|
noexcept |
Initiates UPDATE query building.
- Parameters
-
| boundInputs | Optional vector to store bound inputs. If provided, the inputs will be appended to this vector and can be used to bind the values to the query via SqlStatement::ExecuteWithVariants(...) |
Referenced by Lightweight::DataMapper::Update().
The documentation for this class was generated from the following file: