lintel 0.2.0
Loading...
Searching...
No Matches
Identifier.h
Go to the documentation of this file.
1#ifndef LINTEL_PERSISTENCE_IDENTIFIER_H
2#define LINTEL_PERSISTENCE_IDENTIFIER_H
3
4#include <string>
5#include <string_view>
6
7namespace lintel {
8namespace db {
10 inline std::string quoteIdentifier(std::string_view identifier)
11 {
12 std::string quoted;
13 quoted.reserve(identifier.size() + 2);
14 quoted += '"';
15 for (const char c : identifier) {
16 if (c == '"') {
17 quoted += "\"\"";
18 } else {
19 quoted += c;
20 }
21 }
22 quoted += '"';
23 return quoted;
24 }
25}// namespace db
26
27}// namespace lintel
28#endif// LINTEL_PERSISTENCE_IDENTIFIER_H
std::string quoteIdentifier(std::string_view identifier)
Definition Identifier.h:10
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9