#include <KDbToken.h>
A type-safe KDbSQL token It can be used in KDb expressions.
- See also
- KDbExpression
Definition at line 36 of file KDbToken.h.
◆ KDbToken() [1/3]
◆ KDbToken() [2/3]
KDbToken::KDbToken |
( |
const KDbToken & | other | ) |
|
|
inline |
◆ KDbToken() [3/3]
KDbToken::KDbToken |
( |
char | charToken | ) |
|
Creates a single-character token Only characters that belong to the grammar are accepted: ';' ',' '.
' '>' '<' '=' '+' '-' '&' '|' '/' '*' '' '~' '#' ':' '(' ')' Invalid KDbToken is created for character that is not accepted.
Definition at line 33 of file KDbToken.cpp.
◆ allTokens()
◆ isValid()
bool KDbToken::isValid |
( |
| ) |
const |
|
inline |
- Returns
- true if this token is valid
Definition at line 53 of file KDbToken.h.
◆ name()
- Returns
- name of this token Useful for debugging. For example "NOT_EQUAL" string is returned for the NOT_EQUAL token. A single character is returned for printable single-character tokens. A number is returned for non-printable single-character. "<INVALID_TOKEN>" is returned for an invalid string.
Definition at line 38 of file KDbToken.cpp.
◆ operator!=() [1/2]
bool KDbToken::operator!= |
( |
char | charToken | ) |
const |
|
inline |
- Returns
- true if this token is not equal to other token
Definition at line 97 of file KDbToken.h.
◆ operator!=() [2/2]
bool KDbToken::operator!= |
( |
KDbToken | other | ) |
const |
|
inline |
- Returns
- true if this token is not equal to other token
Definition at line 91 of file KDbToken.h.
◆ operator=()
void KDbToken::operator= |
( |
char | charToken | ) |
|
|
inline |
◆ operator==() [1/2]
bool KDbToken::operator== |
( |
char | charToken | ) |
const |
|
inline |
- Returns
- true if this token is equal to other token
Definition at line 94 of file KDbToken.h.
◆ operator==() [2/2]
bool KDbToken::operator== |
( |
KDbToken | other | ) |
const |
|
inline |
- Returns
- true if this token is equal to other token
Definition at line 88 of file KDbToken.h.
◆ toChar()
char KDbToken::toChar |
( |
| ) |
const |
|
inline |
- Returns
- character equivalent of this token Only character-based tokens are supported this way (toInt() <= maxCharTokenValue). For unsupported tokens
nullptr
is returned.
Definition at line 82 of file KDbToken.h.
◆ toString() [1/2]
- Returns
- string interpretation of this token (as visibe to the user) For example "<>" is returned for the NOT_EQUAL token. Empty string is returned for an invalid string The result may depend on the optional driver parameter. If driver is
nullptr
, representation for portable KDbSQL dialect is returned.
Definition at line 54 of file KDbToken.cpp.
◆ toString() [2/2]
Like toString(const KDbDriver *driver)
Definition at line 92 of file KDbToken.cpp.
◆ value()
int KDbToken::value |
( |
| ) |
const |
|
inline |
- Returns
- numeric value of this token
Definition at line 85 of file KDbToken.h.
◆ AND
◆ AS
◆ AS_EMPTY
◆ ASC
◆ AUTO_INCREMENT
◆ BETWEEN
◆ BETWEEN_AND
Custom tokens are not used in parser but used as an extension in expression classes.
Definition at line 173 of file KDbToken.h.
◆ BIT
◆ BITWISE_SHIFT_LEFT
const KDbToken KDbToken::BITWISE_SHIFT_LEFT |
|
static |
◆ BITWISE_SHIFT_RIGHT
const KDbToken KDbToken::BITWISE_SHIFT_RIGHT |
|
static |
◆ BY
◆ CHARACTER_STRING_LITERAL
const KDbToken KDbToken::CHARACTER_STRING_LITERAL |
|
static |
◆ CONCATENATION
◆ CREATE
◆ DATE_CONST
◆ DATE_TIME_INTEGER
const KDbToken KDbToken::DATE_TIME_INTEGER |
|
static |
◆ DATETIME_CONST
◆ DESC
◆ DISTINCT
◆ DOUBLE_QUOTED_STRING
const KDbToken KDbToken::DOUBLE_QUOTED_STRING |
|
static |
◆ EXCEPT
◆ FROM
◆ GREATER_OR_EQUAL
const KDbToken KDbToken::GREATER_OR_EQUAL |
|
static |
◆ IDENTIFIER
◆ IDENTIFIER_DOT_ASTERISK
const KDbToken KDbToken::IDENTIFIER_DOT_ASTERISK |
|
static |
◆ ILIKE
◆ INTEGER_CONST
◆ INTERSECT
◆ JOIN
◆ KEY
◆ LEFT
◆ LESS_OR_EQUAL
◆ LIKE
◆ maxCharTokenValue
const int KDbToken::maxCharTokenValue = 253 |
|
static |
Maximum character token value (253)
Definition at line 74 of file KDbToken.h.
◆ maxTokenValue
const int KDbToken::maxTokenValue = YYMAXUTOK |
|
static |
Maximum character token value.
Definition at line 77 of file KDbToken.h.
◆ NOT
◆ NOT_BETWEEN
◆ NOT_BETWEEN_AND
const KDbToken KDbToken::NOT_BETWEEN_AND |
|
static |
◆ NOT_EQUAL
◆ NOT_EQUAL2
◆ NOT_LIKE
◆ NOT_SIMILAR_TO
◆ OR
◆ ORDER
◆ PRIMARY
◆ QUERY_PARAMETER
const KDbToken KDbToken::QUERY_PARAMETER |
|
static |
◆ REAL_CONST
◆ RIGHT
◆ SCAN_ERROR
◆ SELECT
◆ SIMILAR_TO
◆ SQL
◆ SQL_FALSE
◆ SQL_IN
◆ SQL_IS
◆ SQL_IS_NOT_NULL
const KDbToken KDbToken::SQL_IS_NOT_NULL |
|
static |
◆ SQL_IS_NULL
◆ SQL_NULL
◆ SQL_ON
◆ SQL_TRUE
◆ SQL_TYPE
◆ TABLE
◆ TABS_OR_SPACES
◆ TIME_AM
◆ TIME_CONST
◆ TIME_PM
◆ UMINUS
◆ UNION
◆ VARCHAR
◆ WHERE
◆ XOR
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:43 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.