|
Lightweight 0.20260617.0
|
#include <QueryBuilders.hpp>
Public Member Functions | |
| auto | Exist () |
| auto | Count () |
| Executes a SELECT COUNT query and returns the number of records found. | |
| auto | All () |
| Executes a SELECT query and returns all records found. | |
| auto | Delete () |
| Executes a DELETE query. | |
| template<auto Field> requires std::is_member_object_pointer_v<decltype(Field)> | |
| auto | All () |
| Executes a SELECT query and returns all records found for the specified field. | |
| template<auto... ReferencedFields> requires (sizeof...(ReferencedFields) >= 2) | |
| auto | All () |
| Executes a SELECT query and returns all records found for the specified field, only having the specified fields queried and populated. | |
| auto | First () |
| Executes a SELECT query for the first record found and returns it. | |
| template<auto Field> requires std::is_member_object_pointer_v<decltype(Field)> | |
| auto | First () |
| Executes the query to get a single scalar value from the first record found. | |
| template<auto... ReferencedFields> requires (sizeof...(ReferencedFields) >= 2) | |
| auto | First () |
| Executes a SELECT query for the first record found and returns it with only the specified fields populated. | |
| auto | First (size_t n) |
| Executes a SELECT query for the first n records found and returns them. | |
| template<auto... ReferencedFields> | |
| auto | First (size_t n) |
| Executes a SELECT query for the first n records with only the specified fields populated. | |
| auto | Range (size_t offset, size_t limit) |
| Executes a SELECT query for a range of records and returns them. | |
| template<auto... ReferencedFields> | |
| auto | Range (size_t offset, size_t limit) |
| Executes a SELECT query for a range of records with only the specified fields populated. | |
Protected Member Functions | |
| LIGHTWEIGHT_FORCE_INLINE | SqlCoreDataMapperQueryBuilder (DataMapper &dm, std::string fields) noexcept |
| Constructs a query builder with the given data mapper and field list. | |
Main API for mapping records to C++ from the database using high level C++ syntax.
Definition at line 46 of file QueryBuilders.hpp.
|
inlineexplicitprotectednoexcept |
Constructs a query builder with the given data mapper and field list.
Definition at line 1067 of file DataMapper.hpp.
|
inline |
Executes a SELECT 1 ... query and returns true if a record exists We do not provide db specific syntax to check this but reuse the First() implementation
Definition at line 80 of file QueryBuilders.hpp.
|
inline |
Executes a SELECT COUNT query and returns the number of records found.
Definition at line 86 of file QueryBuilders.hpp.
|
inline |
Executes a SELECT query and returns all records found.
Definition at line 92 of file QueryBuilders.hpp.
|
inline |
Executes a DELETE query.
Definition at line 98 of file QueryBuilders.hpp.
|
inline |
Executes a SELECT query and returns all records found for the specified field.
| Field | The field to select from the record, in the form of &Record::FieldName. |
Definition at line 121 of file QueryBuilders.hpp.
|
inline |
Executes a SELECT query and returns all records found for the specified field, only having the specified fields queried and populated.
| ReferencedFields | The fields to select from the record, in the form of &Record::FieldName. |
Definition at line 141 of file QueryBuilders.hpp.
|
inline |
Executes a SELECT query for the first record found and returns it.
Definition at line 147 of file QueryBuilders.hpp.
|
inline |
Executes the query to get a single scalar value from the first record found.
| Field | The field to select from the record, in the form of &Record::FieldName. |
Definition at line 163 of file QueryBuilders.hpp.
|
inline |
Executes a SELECT query for the first record found and returns it with only the specified fields populated.
| ReferencedFields | The fields to select from the record, in the form of &Record::FieldName. |
Definition at line 175 of file QueryBuilders.hpp.
|
inline |
Executes a SELECT query for the first n records found and returns them.
Definition at line 181 of file QueryBuilders.hpp.
|
inline |
Executes a SELECT query for the first n records with only the specified fields populated.
Definition at line 188 of file QueryBuilders.hpp.
|
inline |
Executes a SELECT query for a range of records and returns them.
Definition at line 194 of file QueryBuilders.hpp.
|
inline |
Executes a SELECT query for a range of records with only the specified fields populated.
Definition at line 201 of file QueryBuilders.hpp.