#include <drogon/orm/Criteria.h>
#include <drogon/orm/DbClient.h>
#include <string_view>
#include <future>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include <optional>
Go to the source code of this file.
|
| namespace | drogon |
| | Drogon Test is a minimal effort test framework developed because the major C++ test frameworks doesn't handle async programs well. Drogon Test's syntax is inspired by both Google Test and Catch2.
|
|
| enum class | drogon::orm::JoinType { InnerJoin
, LeftJoin
, RightJoin
, FullJoin
} |
| | Represents a SQL JOIN clause.
|
|
|
std::string | drogon::orm::to_string (CompareOperator op) |
|
std::string | drogon::orm::to_join_string (JoinType type) |
| bool | drogon::orm::isValidSqlIdentifier (const std::string &identifier) |
| | Validate that a string is a safe SQL identifier.
|
- Author
- Ken Matsui
Copyright 2022, Ken Matsui. All rights reserved. https://github.com/drogonframework/drogon Use of this source code is governed by a MIT license that can be found in the License file.
Drogon
◆ unimplemented
| #define unimplemented |
( |
| ) |
|
Value:assert(false && "unimplemented")
◆ isValidSqlIdentifier()
| bool drogon::orm::isValidSqlIdentifier |
( |
const std::string & | identifier | ) |
|
|
inline |
Validate that a string is a safe SQL identifier.
Only allows alphanumeric characters, underscores, and dots (for table.column notation). This prevents SQL injection when building JOIN clauses from user-provided identifiers.
- Parameters
-
| identifier | The identifier to validate. |
- Returns
- true if the identifier is safe to use in SQL.