AnCH Framework 0.2
Another C++ Hack: C++23 utility libraries
Loading...
Searching...
No Matches
anch::sql::SqlSyntax Struct Reference

Lexical rules of an SQL dialect. More...

#include <placeholders.hpp>

Collaboration diagram for anch::sql::SqlSyntax:

Public Attributes

bool backslashEscape = false
bool doubleQuoteString = false
bool backquoteIdentifier = false
bool bracketIdentifier = false
bool escapeString = false
bool dollarQuote = false
bool nestedComment = false
bool hashComment = false
bool dashCommentNeedsSpace = false
bool questionMarkOperator = false
bool arraySlice = false
bool dollarParameters = false
bool prefixedParameters = false

Static Public Attributes

static const SqlSyntax STANDARD
static const SqlSyntax POSTGRESQL
static const SqlSyntax MYSQL
static const SqlSyntax SQLITE

Detailed Description

Lexical rules of an SQL dialect.

Used to find named parameters ( NamedQuery ) outside string literals, quoted identifiers and comments.

Author
Vincent Lachenal
Since
0.2

Member Data Documentation

◆ arraySlice

bool anch::sql::SqlSyntax::arraySlice = false

':' between '[' and ']' separates array slice bounds (PostgreSQL arr[1:n] )

◆ backquoteIdentifier

bool anch::sql::SqlSyntax::backquoteIdentifier = false

Back quotes delimit identifiers (MySQL, SQLite)

◆ backslashEscape

bool anch::sql::SqlSyntax::backslashEscape = false

Backslash escapes characters in string literals (MySQL)

◆ bracketIdentifier

bool anch::sql::SqlSyntax::bracketIdentifier = false

Square brackets delimit identifiers (SQLite)

◆ dashCommentNeedsSpace

bool anch::sql::SqlSyntax::dashCommentNeedsSpace = false

'--' line comments have to be followed by a space (MySQL)

◆ dollarParameters

bool anch::sql::SqlSyntax::dollarParameters = false

$1 is a positional parameter (PostgreSQL)

◆ dollarQuote

bool anch::sql::SqlSyntax::dollarQuote = false

Dollar quoted strings $tag$...$tag$ (PostgreSQL)

◆ doubleQuoteString

bool anch::sql::SqlSyntax::doubleQuoteString = false

Double quotes delimit string literals instead of identifiers (MySQL without ANSI_QUOTES )

◆ escapeString

bool anch::sql::SqlSyntax::escapeString = false

E'...' strings with backslash escapes (PostgreSQL)

◆ hashComment

bool anch::sql::SqlSyntax::hashComment = false

'#' line comments (MySQL)

◆ MYSQL

const SqlSyntax anch::sql::SqlSyntax::MYSQL
static

MySQL / MariaDB syntax (default SQL mode)

◆ nestedComment

bool anch::sql::SqlSyntax::nestedComment = false

Nested block comments (PostgreSQL)

◆ POSTGRESQL

const SqlSyntax anch::sql::SqlSyntax::POSTGRESQL
static

PostgreSQL syntax (standard_conforming_strings enabled)

◆ prefixedParameters

bool anch::sql::SqlSyntax::prefixedParameters = false

@name and $name are parameters (SQLite)

◆ questionMarkOperator

bool anch::sql::SqlSyntax::questionMarkOperator = false

'?' is an operator, not a parameter (PostgreSQL jsonb operators ? , ?| , ?& )

◆ SQLITE

const SqlSyntax anch::sql::SqlSyntax::SQLITE
static

SQLite syntax

◆ STANDARD

const SqlSyntax anch::sql::SqlSyntax::STANDARD
static

Standard SQL


The documentation for this struct was generated from the following file: