QGIS API Documentation  3.22.4-Białowieża (ce8e65e95e)
Public Member Functions | List of all members
QgsSQLStatementFragment Class Reference

Class for parsing fragments of SQL statements, such as an expression or where clause. More...

#include <qgssqlstatement.h>

Inheritance diagram for QgsSQLStatementFragment:
Inheritance graph
[legend]

Public Member Functions

 QgsSQLStatementFragment (const QString &fragment)
 Constructor for QgsSQLStatementFragment of the specified fragment. More...
 
- Public Member Functions inherited from QgsSQLStatement
 QgsSQLStatement (const QgsSQLStatement &other)
 Create a copy of this statement. More...
 
 QgsSQLStatement (const QString &statement)
 Creates a new statement based on the provided string. More...
 
virtual ~QgsSQLStatement ()
 
void acceptVisitor (QgsSQLStatement::Visitor &v) const
 Entry function for the visitor pattern. More...
 
bool doBasicValidationChecks (QString &errorMsgOut) const
 Performs basic validity checks. More...
 
QString dump () const
 Returns the statement string, constructed from the internal abstract syntax tree. More...
 
bool hasParserError () const
 Returns true if an error occurred when parsing the input statement. More...
 
QgsSQLStatementoperator= (const QgsSQLStatement &other)
 Create a copy of this statement. More...
 
QString parserErrorString () const
 Returns parser error. More...
 
const QgsSQLStatement::NoderootNode () const
 Returns the root node of the statement. More...
 
QString statement () const
 Returns the original, unmodified statement string. More...
 

Additional Inherited Members

- Public Types inherited from QgsSQLStatement
enum  BinaryOperator {
  boOr , boAnd , boEQ , boNE ,
  boLE , boGE , boLT , boGT ,
  boLike , boNotLike , boILike , boNotILike ,
  boIs , boIsNot , boPlus , boMinus ,
  boMul , boDiv , boIntDiv , boMod ,
  boPow , boConcat
}
 list of binary operators More...
 
enum  JoinType {
  jtDefault , jtLeft , jtLeftOuter , jtRight ,
  jtRightOuter , jtCross , jtInner , jtFull
}
 list of join types More...
 
enum  NodeType {
  ntUnaryOperator , ntBinaryOperator , ntInOperator , ntBetweenOperator ,
  ntFunction , ntLiteral , ntColumnRef , ntSelectedColumn ,
  ntSelect , ntTableDef , ntJoin , ntColumnSorted ,
  ntCast
}
 Node type. More...
 
enum  UnaryOperator { uoNot , uoMinus }
 list of unary operators More...
 
- Static Public Member Functions inherited from QgsSQLStatement
static QString quotedIdentifier (QString name)
 Returns a quoted column reference (in double quotes) More...
 
static QString quotedIdentifierIfNeeded (const QString &name)
 Returns a quoted column reference (in double quotes) if needed, or otherwise the original string. More...
 
static QString quotedString (QString text)
 Returns a quoted version of a string (in single quotes) More...
 
static QString stripMsQuotedIdentifier (QString text)
 Remove double quotes from an Microsoft style identifier. More...
 
static QString stripQuotedIdentifier (QString text)
 Remove double quotes from an identifier. More...
 
- Static Public Attributes inherited from QgsSQLStatement
static const char * BINARY_OPERATOR_TEXT []
 
static const char * JOIN_TYPE_TEXT []
 
static const char * UNARY_OPERATOR_TEXT []
 
- Protected Member Functions inherited from QgsSQLStatement
 QgsSQLStatement (const QString &statement, bool allowFragments)
 Constructor for QgsSQLStatement, with the specified statement. More...
 
- Protected Attributes inherited from QgsSQLStatement
bool mAllowFragments = false
 
QString mParserErrorString
 
QgsSQLStatement::NodemRootNode = nullptr
 
QString mStatement
 

Detailed Description

Class for parsing fragments of SQL statements, such as an expression or where clause.

Since
QGIS 3.16

Definition at line 860 of file qgssqlstatement.h.

Constructor & Destructor Documentation

◆ QgsSQLStatementFragment()

QgsSQLStatementFragment::QgsSQLStatementFragment ( const QString &  fragment)

Constructor for QgsSQLStatementFragment of the specified fragment.

Definition at line 769 of file qgssqlstatement.cpp.


The documentation for this class was generated from the following files: