QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgssqlstatement.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgssqlstatement.h
3  ---------------------
4  begin : April 2016
5  copyright : (C) 2011 by Martin Dobias
6  copyright : (C) 2016 by Even Rouault
7  email : even.rouault at spatialys.com
8  ***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef QGSSQLSTATEMENT_H
18 #define QGSSQLSTATEMENT_H
19 
20 #include <QCoreApplication>
21 #include "qgis_sip.h"
22 #include <QMetaType>
23 #include <QStringList>
24 #include <QVariant>
25 #include <QList>
26 #include <QSet>
27 
28 #include "qgis_core.h"
29 
35 class CORE_EXPORT QgsSQLStatement
36 {
37  Q_DECLARE_TR_FUNCTIONS( QgsSQLStatement )
38  public:
39 
43  QgsSQLStatement( const QString &statement );
44 
48  QgsSQLStatement( const QgsSQLStatement &other );
49 
53  QgsSQLStatement &operator=( const QgsSQLStatement &other );
54  virtual ~QgsSQLStatement();
55 
57  bool hasParserError() const;
59  QString parserErrorString() const;
60 
66  bool doBasicValidationChecks( QString &errorMsgOut SIP_OUT ) const;
67 
68  class Node;
69 
74  const QgsSQLStatement::Node *rootNode() const;
75 
81  QString statement() const;
82 
89  QString dump() const;
90 
95  static QString quotedIdentifier( QString name );
96 
102  static QString quotedIdentifierIfNeeded( const QString &name );
103 
108  static QString stripQuotedIdentifier( QString text );
109 
114  static QString stripMsQuotedIdentifier( QString text );
115 
120  static QString quotedString( QString text );
121 
127  {
130  };
131 
137  {
138  // logical
141 
142  // comparison
143  boEQ, // =
144  boNE, // <>
145  boLE, // <=
146  boGE, // >=
147  boLT, // <
148  boGT, // >
155 
156  // math
164 
165  // strings
167  };
168 
173  enum JoinType
174  {
182  jtFull
183  };
184 
186  static const char *BINARY_OPERATOR_TEXT[] SIP_SKIP;
187 
189  static const char *UNARY_OPERATOR_TEXT[] SIP_SKIP;
190 
192  static const char *JOIN_TYPE_TEXT[] SIP_SKIP;
193 
195 
196  class Visitor; // visitor interface is defined below
197 
199  enum NodeType
200  {
213  ntCast
214  };
215 
220  class CORE_EXPORT Node
221  {
222 
223 #ifdef SIP_RUN
225  switch ( sipCpp->nodeType() )
226  {
227  case QgsSQLStatement::ntUnaryOperator: sipType = sipType_QgsSQLStatement_NodeUnaryOperator; break;
228  case QgsSQLStatement::ntBinaryOperator: sipType = sipType_QgsSQLStatement_NodeBinaryOperator; break;
229  case QgsSQLStatement::ntInOperator: sipType = sipType_QgsSQLStatement_NodeInOperator; break;
230  case QgsSQLStatement::ntBetweenOperator: sipType = sipType_QgsSQLStatement_NodeBetweenOperator; break;
231  case QgsSQLStatement::ntFunction: sipType = sipType_QgsSQLStatement_NodeFunction; break;
232  case QgsSQLStatement::ntLiteral: sipType = sipType_QgsSQLStatement_NodeLiteral; break;
233  case QgsSQLStatement::ntColumnRef: sipType = sipType_QgsSQLStatement_NodeColumnRef; break;
234  case QgsSQLStatement::ntSelectedColumn: sipType = sipType_QgsSQLStatement_NodeSelectedColumn; break;
235  case QgsSQLStatement::ntSelect: sipType = sipType_QgsSQLStatement_NodeSelect; break;
236  case QgsSQLStatement::ntTableDef: sipType = sipType_QgsSQLStatement_NodeTableDef; break;
237  case QgsSQLStatement::ntJoin: sipType = sipType_QgsSQLStatement_NodeJoin; break;
238  case QgsSQLStatement::ntColumnSorted: sipType = sipType_QgsSQLStatement_NodeColumnSorted; break;
239  case QgsSQLStatement::ntCast: sipType = sipType_QgsSQLStatement_NodeCast; break;
240  default: sipType = 0; break;
241  }
242  SIP_END
243 #endif
244 
245  public:
246  virtual ~Node() = default;
247 
253  virtual QgsSQLStatement::NodeType nodeType() const = 0;
254 
260  virtual QString dump() const = 0;
261 
271 
287  virtual void accept( QgsSQLStatement::Visitor &v ) const = 0;
288  };
289 
294  class CORE_EXPORT NodeList
295  {
296  public:
298  NodeList() = default;
299  virtual ~NodeList() { qDeleteAll( mList ); }
300 
302  void append( QgsSQLStatement::Node *node SIP_TRANSFER ) { mList.append( node ); }
303 
305  QList<QgsSQLStatement::Node *> list() { return mList; }
306 
310  int count() const { return mList.count(); }
311 
313  void accept( QgsSQLStatement::Visitor &v ) const;
314 
316  QgsSQLStatement::NodeList *clone() const SIP_FACTORY;
317 
319  virtual QString dump() const;
320 
321  protected:
322  QList<Node *> mList;
323  };
324 
329  class CORE_EXPORT NodeUnaryOperator : public QgsSQLStatement::Node
330  {
331  public:
333  NodeUnaryOperator( QgsSQLStatement::UnaryOperator op, QgsSQLStatement::Node *operand SIP_TRANSFER ) : mOp( op ), mOperand( operand ) {}
334  ~NodeUnaryOperator() override { delete mOperand; }
335 
337  QgsSQLStatement::UnaryOperator op() const { return mOp; }
338 
340  QgsSQLStatement::Node *operand() const { return mOperand; }
341 
342  QgsSQLStatement::NodeType nodeType() const override { return ntUnaryOperator; }
343  QString dump() const override;
344 
345  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
346  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
347 
348  protected:
350  Node *mOperand = nullptr;
351  };
352 
357  class CORE_EXPORT NodeBinaryOperator : public QgsSQLStatement::Node
358  {
359  public:
362  : mOp( op )
363  , mOpLeft( opLeft )
364  , mOpRight( opRight )
365  {}
366  ~NodeBinaryOperator() override { delete mOpLeft; delete mOpRight; }
367 
369  QgsSQLStatement::BinaryOperator op() const { return mOp; }
370 
372  QgsSQLStatement::Node *opLeft() const { return mOpLeft; }
373 
375  QgsSQLStatement::Node *opRight() const { return mOpRight; }
376 
377  QgsSQLStatement::NodeType nodeType() const override { return ntBinaryOperator; }
378  QString dump() const override;
379 
380  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
381  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
382 
384  int precedence() const;
385 
387  bool leftAssociative() const;
388 
389  protected:
390 
392  Node *mOpLeft = nullptr;
393  Node *mOpRight = nullptr;
394  };
395 
400  class CORE_EXPORT NodeInOperator : public QgsSQLStatement::Node
401  {
402  public:
404  NodeInOperator( QgsSQLStatement::Node *node SIP_TRANSFER, QgsSQLStatement::NodeList *list SIP_TRANSFER, bool notin = false ) : mNode( node ), mList( list ), mNotIn( notin ) {}
405  ~NodeInOperator() override { delete mNode; delete mList; }
406 
408  QgsSQLStatement::Node *node() const { return mNode; }
409 
411  bool isNotIn() const { return mNotIn; }
412 
414  QgsSQLStatement::NodeList *list() const { return mList; }
415 
416  QgsSQLStatement::NodeType nodeType() const override { return ntInOperator; }
417  QString dump() const override;
418 
419  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
420  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
421 
422  protected:
423  Node *mNode = nullptr;
424  NodeList *mList = nullptr;
425  bool mNotIn;
426  };
427 
432  class CORE_EXPORT NodeBetweenOperator : public QgsSQLStatement::Node
433  {
434  public:
437  : mNode( node ), mMinVal( minVal ), mMaxVal( maxVal ), mNotBetween( notBetween ) {}
438  ~NodeBetweenOperator() override { delete mNode; delete mMinVal; delete mMaxVal; }
439 
441  QgsSQLStatement::Node *node() const { return mNode; }
442 
444  bool isNotBetween() const { return mNotBetween; }
445 
447  QgsSQLStatement::Node *minVal() const { return mMinVal; }
448 
450  QgsSQLStatement::Node *maxVal() const { return mMaxVal; }
451 
452  QgsSQLStatement::NodeType nodeType() const override { return ntBetweenOperator; }
453  QString dump() const override;
454 
455  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
456  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
457 
458  protected:
459  Node *mNode = nullptr;
460  Node *mMinVal = nullptr;
461  Node *mMaxVal = nullptr;
462  bool mNotBetween;
463  };
464 
469  class CORE_EXPORT NodeFunction : public QgsSQLStatement::Node
470  {
471  public:
473  NodeFunction( const QString &name, QgsSQLStatement::NodeList *args SIP_TRANSFER ) : mName( name ), mArgs( args ) {}
474  ~NodeFunction() override { delete mArgs; }
475 
477  QString name() const { return mName; }
478 
480  QgsSQLStatement::NodeList *args() const { return mArgs; }
481 
482  QgsSQLStatement::NodeType nodeType() const override { return ntFunction; }
483  QString dump() const override;
484 
485  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
486  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
487 
488  protected:
489  QString mName;
490  NodeList *mArgs = nullptr;
491 
492  };
493 
498  class CORE_EXPORT NodeLiteral : public QgsSQLStatement::Node
499  {
500  public:
502  NodeLiteral( const QVariant &value ) : mValue( value ) {}
503 
505  inline QVariant value() const { return mValue; }
506 
507  QgsSQLStatement::NodeType nodeType() const override { return ntLiteral; }
508  QString dump() const override;
509 
510  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
511  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
512 
513  protected:
514  QVariant mValue;
515  };
516 
521  class CORE_EXPORT NodeColumnRef : public QgsSQLStatement::Node
522  {
523  public:
525  NodeColumnRef( const QString &name, bool star ) : mName( name ), mDistinct( false ), mStar( star ) {}
527  NodeColumnRef( const QString &tableName, const QString &name, bool star ) : mTableName( tableName ), mName( name ), mDistinct( false ), mStar( star ) {}
528 
530  void setDistinct( bool distinct = true ) { mDistinct = distinct; }
531 
533  QString tableName() const { return mTableName; }
534 
536  QString name() const { return mName; }
537 
539  bool star() const { return mStar; }
540 
542  bool distinct() const { return mDistinct; }
543 
544  QgsSQLStatement::NodeType nodeType() const override { return ntColumnRef; }
545  QString dump() const override;
546 
547  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
548  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
550  QgsSQLStatement::NodeColumnRef *cloneThis() const SIP_FACTORY;
551 
552  protected:
553  QString mTableName;
554  QString mName;
555  bool mDistinct;
556  bool mStar;
557  };
558 
563  class CORE_EXPORT NodeSelectedColumn : public QgsSQLStatement::Node
564  {
565  public:
567  NodeSelectedColumn( QgsSQLStatement::Node *node SIP_TRANSFER ) : mColumnNode( node ) {}
568  ~NodeSelectedColumn() override { delete mColumnNode; }
569 
571  void setAlias( const QString &alias ) { mAlias = alias; }
572 
574  QgsSQLStatement::Node *column() const { return mColumnNode; }
575 
577  QString alias() const { return mAlias; }
578 
579  QgsSQLStatement::NodeType nodeType() const override { return ntSelectedColumn; }
580  QString dump() const override;
581 
582  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
583  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
585  QgsSQLStatement::NodeSelectedColumn *cloneThis() const SIP_FACTORY;
586 
587  protected:
588  Node *mColumnNode = nullptr;
589  QString mAlias;
590  };
591 
596  class CORE_EXPORT NodeCast : public QgsSQLStatement::Node
597  {
598  public:
600  NodeCast( QgsSQLStatement::Node *node SIP_TRANSFER, const QString &type ) : mNode( node ), mType( type ) {}
601  ~NodeCast() override { delete mNode; }
602 
604  QgsSQLStatement::Node *node() const { return mNode; }
605 
607  QString type() const { return mType; }
608 
609  QgsSQLStatement::NodeType nodeType() const override { return ntCast; }
610  QString dump() const override;
611 
612  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
613  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
614 
615  protected:
616  Node *mNode = nullptr;
617  QString mType;
618  };
619 
624  class CORE_EXPORT NodeTableDef : public QgsSQLStatement::Node
625  {
626  public:
628  NodeTableDef( const QString &name ) : mName( name ) {}
630  NodeTableDef( const QString &name, const QString &alias ) : mName( name ), mAlias( alias ) {}
631 
633  QString name() const { return mName; }
634 
636  QString alias() const { return mAlias; }
637 
638  QgsSQLStatement::NodeType nodeType() const override { return ntTableDef; }
639  QString dump() const override;
640 
641  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
642  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
644  QgsSQLStatement::NodeTableDef *cloneThis() const SIP_FACTORY;
645 
646  protected:
647  QString mName;
648  QString mAlias;
649  };
650 
655  class CORE_EXPORT NodeJoin : public QgsSQLStatement::Node
656  {
657  public:
659  NodeJoin( QgsSQLStatement::NodeTableDef *tabledef SIP_TRANSFER, QgsSQLStatement::Node *onExpr SIP_TRANSFER, QgsSQLStatement::JoinType type ) : mTableDef( tabledef ), mOnExpr( onExpr ), mType( type ) {}
661  NodeJoin( QgsSQLStatement::NodeTableDef *tabledef SIP_TRANSFER, const QList<QString> &usingColumns, QgsSQLStatement::JoinType type ) : mTableDef( tabledef ), mUsingColumns( usingColumns ), mType( type ) {}
662  ~NodeJoin() override { delete mTableDef; delete mOnExpr; }
663 
665  QgsSQLStatement::NodeTableDef *tableDef() const { return mTableDef; }
666 
668  QgsSQLStatement::Node *onExpr() const { return mOnExpr; }
669 
671  QList<QString> usingColumns() const { return mUsingColumns; }
672 
674  QgsSQLStatement::JoinType type() const { return mType; }
675 
676  QgsSQLStatement::NodeType nodeType() const override { return ntJoin; }
677  QString dump() const override;
678 
679  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
680  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
682  QgsSQLStatement::NodeJoin *cloneThis() const SIP_FACTORY;
683 
684  protected:
685  NodeTableDef *mTableDef = nullptr;
686  Node *mOnExpr = nullptr;
687  QList<QString> mUsingColumns;
688  JoinType mType;
689  };
690 
695  class CORE_EXPORT NodeColumnSorted : public QgsSQLStatement::Node
696  {
697  public:
699  NodeColumnSorted( QgsSQLStatement::NodeColumnRef *column SIP_TRANSFER, bool asc ) : mColumn( column ), mAsc( asc ) {}
700  ~NodeColumnSorted() override { delete mColumn; }
701 
703  QgsSQLStatement::NodeColumnRef *column() const { return mColumn; }
704 
706  bool ascending() const { return mAsc; }
707 
708  QgsSQLStatement::NodeType nodeType() const override { return ntColumnSorted; }
709  QString dump() const override;
710 
711  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
712  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
714  QgsSQLStatement::NodeColumnSorted *cloneThis() const SIP_FACTORY;
715 
716  protected:
717  NodeColumnRef *mColumn = nullptr;
718  bool mAsc;
719  };
720 
725  class CORE_EXPORT NodeSelect : public QgsSQLStatement::Node
726  {
727  public:
729  NodeSelect( const QList<QgsSQLStatement::NodeTableDef *> &tableList SIP_TRANSFER, const QList<QgsSQLStatement::NodeSelectedColumn *> &columns SIP_TRANSFER, bool distinct ) : mTableList( tableList ), mColumns( columns ), mDistinct( distinct ) {}
730  ~NodeSelect() override;
731 
733  void setJoins( const QList<QgsSQLStatement::NodeJoin *> &joins SIP_TRANSFER ) { qDeleteAll( mJoins ); mJoins = joins; }
735  void appendJoin( QgsSQLStatement::NodeJoin *join SIP_TRANSFER ) { mJoins.append( join ); }
737  void setWhere( QgsSQLStatement::Node *where SIP_TRANSFER ) { delete mWhere; mWhere = where; }
739  void setOrderBy( const QList<QgsSQLStatement::NodeColumnSorted *> &orderBy SIP_TRANSFER ) { qDeleteAll( mOrderBy ); mOrderBy = orderBy; }
740 
742  QList<QgsSQLStatement::NodeTableDef *> tables() const { return mTableList; }
744  QList<QgsSQLStatement::NodeSelectedColumn *> columns() const { return mColumns; }
746  bool distinct() const { return mDistinct; }
748  QList<QgsSQLStatement::NodeJoin *> joins() const { return mJoins; }
750  QgsSQLStatement::Node *where() const { return mWhere; }
752  QList<QgsSQLStatement::NodeColumnSorted *> orderBy() const { return mOrderBy; }
753 
754  QgsSQLStatement::NodeType nodeType() const override { return ntSelect; }
755  QString dump() const override;
756 
757  void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
758  QgsSQLStatement::Node *clone() const override SIP_FACTORY;
759 
760  protected:
761  QList<NodeTableDef *> mTableList;
762  QList<NodeSelectedColumn *> mColumns;
763  bool mDistinct;
764  QList<NodeJoin *> mJoins;
765  Node *mWhere = nullptr;
766  QList<NodeColumnSorted *> mOrderBy;
767  };
768 
770 
776  class CORE_EXPORT Visitor
777  {
778  public:
779  virtual ~Visitor() = default;
781  virtual void visit( const QgsSQLStatement::NodeUnaryOperator &n ) = 0;
783  virtual void visit( const QgsSQLStatement::NodeBinaryOperator &n ) = 0;
785  virtual void visit( const QgsSQLStatement::NodeInOperator &n ) = 0;
787  virtual void visit( const QgsSQLStatement::NodeBetweenOperator &n ) = 0;
789  virtual void visit( const QgsSQLStatement::NodeFunction &n ) = 0;
791  virtual void visit( const QgsSQLStatement::NodeLiteral &n ) = 0;
793  virtual void visit( const QgsSQLStatement::NodeColumnRef &n ) = 0;
795  virtual void visit( const QgsSQLStatement::NodeSelectedColumn &n ) = 0;
797  virtual void visit( const QgsSQLStatement::NodeTableDef &n ) = 0;
799  virtual void visit( const QgsSQLStatement::NodeSelect &n ) = 0;
801  virtual void visit( const QgsSQLStatement::NodeJoin &n ) = 0;
803  virtual void visit( const QgsSQLStatement::NodeColumnSorted &n ) = 0;
805  virtual void visit( const QgsSQLStatement::NodeCast &n ) = 0;
806  };
807 
812  class CORE_EXPORT RecursiveVisitor: public QgsSQLStatement::Visitor
813  {
814  public:
816  RecursiveVisitor() = default;
817 
818  void visit( const QgsSQLStatement::NodeUnaryOperator &n ) override { n.operand()->accept( *this ); }
819  void visit( const QgsSQLStatement::NodeBinaryOperator &n ) override { n.opLeft()->accept( *this ); n.opRight()->accept( *this ); }
820  void visit( const QgsSQLStatement::NodeInOperator &n ) override { n.node()->accept( *this ); n.list()->accept( *this ); }
821  void visit( const QgsSQLStatement::NodeBetweenOperator &n ) override { n.node()->accept( *this ); n.minVal()->accept( *this ); n.maxVal()->accept( *this ); }
822  void visit( const QgsSQLStatement::NodeFunction &n ) override { n.args()->accept( *this ); }
823  void visit( const QgsSQLStatement::NodeLiteral & ) override {}
824  void visit( const QgsSQLStatement::NodeColumnRef & ) override { }
825  void visit( const QgsSQLStatement::NodeSelectedColumn &n ) override { n.column()->accept( *this ); }
826  void visit( const QgsSQLStatement::NodeTableDef & ) override {}
827  void visit( const QgsSQLStatement::NodeSelect &n ) override;
828  void visit( const QgsSQLStatement::NodeJoin &n ) override;
829  void visit( const QgsSQLStatement::NodeColumnSorted &n ) override { n.column()->accept( *this ); }
830  void visit( const QgsSQLStatement::NodeCast &n ) override { n.node()->accept( *this ); }
831  };
832 
834  void acceptVisitor( QgsSQLStatement::Visitor &v ) const;
835 
836  protected:
837  QgsSQLStatement::Node *mRootNode = nullptr;
838  bool mAllowFragments = false;
839  QString mStatement;
841 
850  QgsSQLStatement( const QString &statement, bool allowFragments );
851 };
852 
854 
855 
860 class CORE_EXPORT QgsSQLStatementFragment : public QgsSQLStatement
861 {
862  public:
863 
867  QgsSQLStatementFragment( const QString &fragment );
868 
869 };
870 
871 
872 #endif // QGSSQLSTATEMENT_H
QgsSQLStatement::Node
Abstract node class.
Definition: qgssqlstatement.h:221
QgsSQLStatement::NodeColumnRef::tableName
QString tableName() const
The name of the table. May be empty.
Definition: qgssqlstatement.h:533
QgsSQLStatement::NodeJoin
Join definition.
Definition: qgssqlstatement.h:656
QgsSQLStatement::NodeTableDef::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:641
QgsSQLStatement::NodeUnaryOperator::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:345
QgsSQLStatement::jtCross
@ jtCross
Definition: qgssqlstatement.h:180
QgsSQLStatement::NodeCast::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:609
QgsSQLStatement::QgsSQLStatement
QgsSQLStatement(const QString &statement)
Creates a new statement based on the provided string.
Definition: qgssqlstatement.cpp:128
QgsSQLStatement::boPlus
@ boPlus
Definition: qgssqlstatement.h:157
QgsSQLStatement::RecursiveVisitor::RecursiveVisitor
RecursiveVisitor()=default
Constructor.
QgsSQLStatement::NodeBinaryOperator::~NodeBinaryOperator
~NodeBinaryOperator() override
Definition: qgssqlstatement.h:366
QgsSQLStatement::NodeColumnSorted
Column in a ORDER BY.
Definition: qgssqlstatement.h:696
QgsSQLStatement::NodeBetweenOperator::NodeBetweenOperator
NodeBetweenOperator(QgsSQLStatement::Node *node, QgsSQLStatement::Node *minVal, QgsSQLStatement::Node *maxVal, bool notBetween=false)
Constructor.
Definition: qgssqlstatement.h:436
QgsSQLStatement::NodeCast::type
QString type() const
Type.
Definition: qgssqlstatement.h:607
QgsSQLStatement::NodeUnaryOperator::operand
QgsSQLStatement::Node * operand() const
Operand.
Definition: qgssqlstatement.h:340
QgsSQLStatement::RecursiveVisitor::visit
void visit(const QgsSQLStatement::NodeFunction &n) override
Visit NodeFunction.
Definition: qgssqlstatement.h:822
QgsSQLStatement::NodeTableDef::name
QString name() const
Table name.
Definition: qgssqlstatement.h:633
QgsSQLStatement::NodeFunction::NodeFunction
NodeFunction(const QString &name, QgsSQLStatement::NodeList *args)
Constructor.
Definition: qgssqlstatement.h:473
QgsSQLStatement::RecursiveVisitor::visit
void visit(const QgsSQLStatement::NodeCast &n) override
Visit NodeCast.
Definition: qgssqlstatement.h:830
QgsSQLStatement::RecursiveVisitor::visit
void visit(const QgsSQLStatement::NodeBinaryOperator &n) override
Visit NodeBinaryOperator.
Definition: qgssqlstatement.h:819
QgsSQLStatement::NodeBinaryOperator::opLeft
QgsSQLStatement::Node * opLeft() const
Left operand.
Definition: qgssqlstatement.h:372
QgsSQLStatement::NodeJoin::NodeJoin
NodeJoin(QgsSQLStatement::NodeTableDef *tabledef, QgsSQLStatement::Node *onExpr, QgsSQLStatement::JoinType type)
Constructor with table definition, ON expression.
Definition: qgssqlstatement.h:659
SIP_OUT
#define SIP_OUT
Definition: qgis_sip.h:58
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeTableDef &n)=0
Visit NodeTableDef.
QgsSQLStatement::NodeSelect::setOrderBy
void setOrderBy(const QList< QgsSQLStatement::NodeColumnSorted * > &orderBy)
Sets order by columns.
Definition: qgssqlstatement.h:739
QgsSQLStatement::NodeCast::~NodeCast
~NodeCast() override
Definition: qgssqlstatement.h:601
QgsSQLStatement::NodeSelectedColumn::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:582
QgsSQLStatement::NodeList::NodeList
NodeList()=default
Constructor.
QgsSQLStatement::NodeFunction::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:482
QgsSQLStatement::NodeSelect::setWhere
void setWhere(QgsSQLStatement::Node *where)
Sets where clause.
Definition: qgssqlstatement.h:737
QgsSQLStatement::boLE
@ boLE
Definition: qgssqlstatement.h:145
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeUnaryOperator &n)=0
Visit NodeUnaryOperator.
QgsSQLStatement::NodeTableDef
Table definition.
Definition: qgssqlstatement.h:625
QgsSQLStatement::boLT
@ boLT
Definition: qgssqlstatement.h:147
QgsSQLStatement::NodeList::append
void append(QgsSQLStatement::Node *node)
Takes ownership of the provided node.
Definition: qgssqlstatement.h:302
QgsSQLStatement::NodeFunction
Function with a name and arguments node.
Definition: qgssqlstatement.h:470
QgsSQLStatement::acceptVisitor
void acceptVisitor(QgsSQLStatement::Visitor &v) const
Entry function for the visitor pattern.
Definition: qgssqlstatement.cpp:167
QgsSQLStatement::NodeSelect::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:757
QgsSQLStatement::NodeSelect::where
QgsSQLStatement::Node * where() const
Returns the where clause.
Definition: qgssqlstatement.h:750
QgsSQLStatement::ntTableDef
@ ntTableDef
Definition: qgssqlstatement.h:210
QgsSQLStatement::boGE
@ boGE
Definition: qgssqlstatement.h:146
QgsSQLStatement::NodeColumnRef::setDistinct
void setDistinct(bool distinct=true)
Sets whether this is prefixed by DISTINCT.
Definition: qgssqlstatement.h:530
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeSelect &n)=0
Visit NodeSelect.
QgsSQLStatement::NodeSelect
SELECT node.
Definition: qgssqlstatement.h:726
QgsSQLStatement::NodeCast
CAST operator.
Definition: qgssqlstatement.h:597
QgsSQLStatement::NodeUnaryOperator
Unary logicial/arithmetical operator ( NOT, - )
Definition: qgssqlstatement.h:330
QgsSQLStatement::NodeSelect::setJoins
void setJoins(const QList< QgsSQLStatement::NodeJoin * > &joins)
Sets joins.
Definition: qgssqlstatement.h:733
QgsSQLStatement::NodeSelect::appendJoin
void appendJoin(QgsSQLStatement::NodeJoin *join)
Append a join.
Definition: qgssqlstatement.h:735
QgsSQLStatement::NodeList::~NodeList
virtual ~NodeList()
Definition: qgssqlstatement.h:299
QgsSQLStatement::ntFunction
@ ntFunction
Definition: qgssqlstatement.h:205
QgsSQLStatement::boMul
@ boMul
Definition: qgssqlstatement.h:159
QgsSQLStatement::NodeColumnSorted::ascending
bool ascending() const
Whether the column is sorted in ascending order.
Definition: qgssqlstatement.h:706
QgsSQLStatement::NodeLiteral::NodeLiteral
NodeLiteral(const QVariant &value)
Constructor.
Definition: qgssqlstatement.h:502
QgsSQLStatement::NodeCast::NodeCast
NodeCast(QgsSQLStatement::Node *node, const QString &type)
Constructor.
Definition: qgssqlstatement.h:600
QgsSQLStatement::Node::clone
virtual QgsSQLStatement::Node * clone() const =0
Generate a clone of this node.
QgsSQLStatement::Node::~Node
virtual ~Node()=default
QgsSQLStatement::ntInOperator
@ ntInOperator
Definition: qgssqlstatement.h:203
QgsSQLStatement::NodeBetweenOperator::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:452
QgsSQLStatement::boPow
@ boPow
Definition: qgssqlstatement.h:163
QgsSQLStatement::NodeJoin::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:679
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsSQLStatement::NodeSelect::columns
QList< QgsSQLStatement::NodeSelectedColumn * > columns() const
Returns the list of columns.
Definition: qgssqlstatement.h:744
QgsSQLStatement::NodeJoin::type
QgsSQLStatement::JoinType type() const
Join type.
Definition: qgssqlstatement.h:674
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
QgsSQLStatement::NodeColumnSorted::~NodeColumnSorted
~NodeColumnSorted() override
Definition: qgssqlstatement.h:700
QgsSQLStatement::NodeJoin::tableDef
QgsSQLStatement::NodeTableDef * tableDef() const
Table definition.
Definition: qgssqlstatement.h:665
QgsSQLStatement::NodeColumnSorted::column
QgsSQLStatement::NodeColumnRef * column() const
The name of the column.
Definition: qgssqlstatement.h:703
QgsSQLStatement::NodeJoin::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:676
QgsSQLStatement::NodeSelectedColumn::column
QgsSQLStatement::Node * column() const
Column that is referred to.
Definition: qgssqlstatement.h:574
QgsSQLStatement::boOr
@ boOr
Definition: qgssqlstatement.h:139
QgsSQLStatement::ntCast
@ ntCast
Definition: qgssqlstatement.h:213
QgsSQLStatement::NodeInOperator::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:416
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:177
QgsSQLStatement::Visitor
Support for visitor pattern - algorithms dealing with the statement may be implemented without modify...
Definition: qgssqlstatement.h:777
QgsSQLStatement::NodeBetweenOperator::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:455
QgsSQLStatement::NodeSelect::NodeSelect
NodeSelect(const QList< QgsSQLStatement::NodeTableDef * > &tableList, const QList< QgsSQLStatement::NodeSelectedColumn * > &columns, bool distinct)
Constructor.
Definition: qgssqlstatement.h:729
QgsSQLStatement::RecursiveVisitor::visit
void visit(const QgsSQLStatement::NodeSelectedColumn &n) override
Visit NodeSelectedColumn.
Definition: qgssqlstatement.h:825
QgsSQLStatement::ntBinaryOperator
@ ntBinaryOperator
Definition: qgssqlstatement.h:202
QgsSQLStatement::NodeLiteral::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:510
QgsSQLStatement::NodeColumnRef::NodeColumnRef
NodeColumnRef(const QString &name, bool star)
Constructor with column name only.
Definition: qgssqlstatement.h:525
QgsSQLStatement::ntSelectedColumn
@ ntSelectedColumn
Definition: qgssqlstatement.h:208
QgsSQLStatement::RecursiveVisitor::visit
void visit(const QgsSQLStatement::NodeBetweenOperator &n) override
Visit NodeBetweenOperator.
Definition: qgssqlstatement.h:821
QgsSQLStatement::NodeInOperator::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:419
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
QgsSQLStatement::NodeColumnSorted::NodeColumnSorted
NodeColumnSorted(QgsSQLStatement::NodeColumnRef *column, bool asc)
Constructor.
Definition: qgssqlstatement.h:699
QgsSQLStatement::boIsNot
@ boIsNot
Definition: qgssqlstatement.h:154
QgsSQLStatement::uoNot
@ uoNot
Definition: qgssqlstatement.h:128
QgsSQLStatement::boNE
@ boNE
Definition: qgssqlstatement.h:144
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeCast &n)=0
Visit NodeCast.
QgsSQLStatement::NodeInOperator::node
QgsSQLStatement::Node * node() const
Variable at the left of IN.
Definition: qgssqlstatement.h:408
QgsSQLStatement::boLike
@ boLike
Definition: qgssqlstatement.h:149
QgsSQLStatement::uoMinus
@ uoMinus
Definition: qgssqlstatement.h:129
QgsSQLStatement::boConcat
@ boConcat
Definition: qgssqlstatement.h:166
QgsSQLStatement::NodeUnaryOperator::op
QgsSQLStatement::UnaryOperator op() const
Operator.
Definition: qgssqlstatement.h:337
QgsSQLStatement::NodeJoin::usingColumns
QList< QString > usingColumns() const
Columns referenced by USING.
Definition: qgssqlstatement.h:671
QgsSQLStatement::NodeSelect::distinct
bool distinct() const
Returns if the SELECT is DISTINCT.
Definition: qgssqlstatement.h:746
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeBetweenOperator &n)=0
Visit NodeBetweenOperator.
QgsSQLStatement::NodeTableDef::alias
QString alias() const
Table alias.
Definition: qgssqlstatement.h:636
QgsSQLStatement::ntLiteral
@ ntLiteral
Definition: qgssqlstatement.h:206
QgsSQLStatement::boNotILike
@ boNotILike
Definition: qgssqlstatement.h:152
QgsSQLStatement::NodeLiteral::value
QVariant value() const
The value of the literal.
Definition: qgssqlstatement.h:505
QgsSQLStatement::NodeFunction::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:485
QgsSQLStatement::mParserErrorString
QString mParserErrorString
Definition: qgssqlstatement.h:840
QgsSQLStatement::NodeColumnSorted::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:711
QgsSQLStatement::NodeSelect::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:754
qgis_sip.h
QgsSQLStatement::NodeBinaryOperator::op
QgsSQLStatement::BinaryOperator op() const
Operator.
Definition: qgssqlstatement.h:369
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsSQLStatement::NodeBinaryOperator::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:380
QgsSQLStatement::ntColumnSorted
@ ntColumnSorted
Definition: qgssqlstatement.h:212
QgsSQLStatement
Class for parsing SQL statements.
Definition: qgssqlstatement.h:36
QgsSQLStatement::ntSelect
@ ntSelect
Definition: qgssqlstatement.h:209
QgsSQLStatement::NodeSelectedColumn::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:579
QgsSQLStatement::NodeBetweenOperator::~NodeBetweenOperator
~NodeBetweenOperator() override
Definition: qgssqlstatement.h:438
QgsSQLStatement::NodeInOperator::isNotIn
bool isNotIn() const
Whether this is a NOT IN operator.
Definition: qgssqlstatement.h:411
QgsSQLStatement::NodeSelect::tables
QList< QgsSQLStatement::NodeTableDef * > tables() const
Returns the list of tables.
Definition: qgssqlstatement.h:742
QgsSQLStatement::boMinus
@ boMinus
Definition: qgssqlstatement.h:158
QgsSQLStatement::NodeSelectedColumn::setAlias
void setAlias(const QString &alias)
Sets alias name.
Definition: qgssqlstatement.h:571
QgsSQLStatement::Node::dump
virtual QString dump() const =0
Abstract virtual dump method.
QgsSQLStatement::boIntDiv
@ boIntDiv
Definition: qgssqlstatement.h:161
QgsSQLStatement::NodeColumnRef::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:544
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeColumnSorted &n)=0
Visit NodeColumnSorted.
QgsSQLStatement::NodeBinaryOperator::opRight
QgsSQLStatement::Node * opRight() const
Right operand.
Definition: qgssqlstatement.h:375
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeBinaryOperator &n)=0
Visit NodeBinaryOperator.
QgsSQLStatement::NodeFunction::args
QgsSQLStatement::NodeList * args() const
Returns arguments.
Definition: qgssqlstatement.h:480
QgsSQLStatement::boIs
@ boIs
Definition: qgssqlstatement.h:153
QgsSQLStatement::boILike
@ boILike
Definition: qgssqlstatement.h:151
QgsSQLStatement::NodeUnaryOperator::NodeUnaryOperator
NodeUnaryOperator(QgsSQLStatement::UnaryOperator op, QgsSQLStatement::Node *operand)
Constructor.
Definition: qgssqlstatement.h:333
QgsSQLStatement::NodeBetweenOperator::node
QgsSQLStatement::Node * node() const
Variable at the left of BETWEEN.
Definition: qgssqlstatement.h:441
QgsSQLStatement::NodeColumnRef::NodeColumnRef
NodeColumnRef(const QString &tableName, const QString &name, bool star)
Constructor with table and column name.
Definition: qgssqlstatement.h:527
QgsSQLStatement::NodeType
NodeType
Node type.
Definition: qgssqlstatement.h:200
QgsSQLStatement::JoinType
JoinType
list of join types
Definition: qgssqlstatement.h:174
QgsSQLStatement::NodeInOperator
'x IN (y, z)' operator
Definition: qgssqlstatement.h:401
QgsSQLStatement::NodeBinaryOperator
Binary logical/arithmetical operator (AND, OR, =, +, ...)
Definition: qgssqlstatement.h:358
QgsSQLStatement::NodeSelectedColumn::NodeSelectedColumn
NodeSelectedColumn(QgsSQLStatement::Node *node)
Constructor.
Definition: qgssqlstatement.h:567
QgsSQLStatement::NodeFunction::~NodeFunction
~NodeFunction() override
Definition: qgssqlstatement.h:474
QgsSQLStatement::NodeSelectedColumn::~NodeSelectedColumn
~NodeSelectedColumn() override
Definition: qgssqlstatement.h:568
QgsSQLStatement::boGT
@ boGT
Definition: qgssqlstatement.h:148
QgsSQLStatement::NodeSelect::orderBy
QList< QgsSQLStatement::NodeColumnSorted * > orderBy() const
Returns the list of order by columns.
Definition: qgssqlstatement.h:752
QgsSQLStatement::boMod
@ boMod
Definition: qgssqlstatement.h:162
QgsSQLStatement::NodeJoin::NodeJoin
NodeJoin(QgsSQLStatement::NodeTableDef *tabledef, const QList< QString > &usingColumns, QgsSQLStatement::JoinType type)
Constructor with table definition and USING columns.
Definition: qgssqlstatement.h:661
QgsSQLStatement::NodeBinaryOperator::NodeBinaryOperator
NodeBinaryOperator(QgsSQLStatement::BinaryOperator op, QgsSQLStatement::Node *opLeft, QgsSQLStatement::Node *opRight)
Constructor.
Definition: qgssqlstatement.h:361
QgsSQLStatement::NodeColumnRef::star
bool star() const
Whether this is the * column.
Definition: qgssqlstatement.h:539
QgsSQLStatement::NodeCast::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:612
QgsSQLStatement::NodeBetweenOperator::maxVal
QgsSQLStatement::Node * maxVal() const
Maximum bound.
Definition: qgssqlstatement.h:450
QgsSQLStatement::RecursiveVisitor::visit
void visit(const QgsSQLStatement::NodeColumnSorted &n) override
Visit NodeColumnSorted.
Definition: qgssqlstatement.h:829
QgsSQLStatement::NodeColumnRef
Reference to a column.
Definition: qgssqlstatement.h:522
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeLiteral &n)=0
Visit NodeLiteral.
QgsSQLStatement::NodeBinaryOperator::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:377
QgsSQLStatement::NodeList
A list of nodes.
Definition: qgssqlstatement.h:295
QgsSQLStatement::jtRight
@ jtRight
Definition: qgssqlstatement.h:178
QgsSQLStatement::boDiv
@ boDiv
Definition: qgssqlstatement.h:160
QgsSQLStatement::NodeFunction::name
QString name() const
Returns function name.
Definition: qgssqlstatement.h:477
QgsSQLStatement::Node::accept
virtual void accept(QgsSQLStatement::Visitor &v) const =0
Support the visitor pattern.
QgsSQLStatement::NodeSelect::joins
QList< QgsSQLStatement::NodeJoin * > joins() const
Returns the list of joins.
Definition: qgssqlstatement.h:748
QgsSQLStatement::UnaryOperator
UnaryOperator
list of unary operators
Definition: qgssqlstatement.h:127
QgsSQLStatement::jtInner
@ jtInner
Definition: qgssqlstatement.h:181
QgsSQLStatement::NodeBetweenOperator::isNotBetween
bool isNotBetween() const
Whether this is a NOT BETWEEN operator.
Definition: qgssqlstatement.h:444
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeColumnRef &n)=0
Visit NodeColumnRef.
QgsSQLStatement::RecursiveVisitor::visit
void visit(const QgsSQLStatement::NodeUnaryOperator &n) override
Visit NodeUnaryOperator.
Definition: qgssqlstatement.h:818
QgsSQLStatement::NodeUnaryOperator::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:342
QgsSQLStatement::NodeCast::node
QgsSQLStatement::Node * node() const
Node that is referred to.
Definition: qgssqlstatement.h:604
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeFunction &n)=0
Visit NodeFunction.
QgsSQLStatement::RecursiveVisitor::visit
void visit(const QgsSQLStatement::NodeTableDef &) override
Visit NodeTableDef.
Definition: qgssqlstatement.h:826
QgsSQLStatement::mStatement
QString mStatement
Definition: qgssqlstatement.h:839
QgsSQLStatement::ntJoin
@ ntJoin
Definition: qgssqlstatement.h:211
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeJoin &n)=0
Visit NodeJoin.
QgsSQLStatement::NodeColumnRef::accept
void accept(QgsSQLStatement::Visitor &v) const override
Support the visitor pattern.
Definition: qgssqlstatement.h:547
QgsSQLStatement::RecursiveVisitor::visit
void visit(const QgsSQLStatement::NodeInOperator &n) override
Visit NodeInOperator.
Definition: qgssqlstatement.h:820
QgsSQLStatement::boAnd
@ boAnd
Definition: qgssqlstatement.h:140
QgsSQLStatementFragment
Class for parsing fragments of SQL statements, such as an expression or where clause.
Definition: qgssqlstatement.h:861
QgsSQLStatement::ntBetweenOperator
@ ntBetweenOperator
Definition: qgssqlstatement.h:204
QgsSQLStatement::RecursiveVisitor::visit
void visit(const QgsSQLStatement::NodeLiteral &) override
Visit NodeLiteral.
Definition: qgssqlstatement.h:823
QgsSQLStatement::NodeTableDef::NodeTableDef
NodeTableDef(const QString &name)
Constructor with table name.
Definition: qgssqlstatement.h:628
QgsSQLStatement::NodeInOperator::NodeInOperator
NodeInOperator(QgsSQLStatement::Node *node, QgsSQLStatement::NodeList *list, bool notin=false)
Constructor.
Definition: qgssqlstatement.h:404
QgsSQLStatement::NodeInOperator::~NodeInOperator
~NodeInOperator() override
Definition: qgssqlstatement.h:405
QgsSQLStatement::ntColumnRef
@ ntColumnRef
Definition: qgssqlstatement.h:207
QgsSQLStatement::jtLeftOuter
@ jtLeftOuter
Definition: qgssqlstatement.h:177
QgsSQLStatement::Node::nodeType
virtual QgsSQLStatement::NodeType nodeType() const =0
Abstract virtual that returns the type of this node.
QgsSQLStatement::NodeTableDef::NodeTableDef
NodeTableDef(const QString &name, const QString &alias)
Constructor with table name and alias.
Definition: qgssqlstatement.h:630
QgsSQLStatement::NodeJoin::~NodeJoin
~NodeJoin() override
Definition: qgssqlstatement.h:662
QgsSQLStatement::boEQ
@ boEQ
Definition: qgssqlstatement.h:143
QgsSQLStatement::jtLeft
@ jtLeft
Definition: qgssqlstatement.h:176
QgsSQLStatement::BinaryOperator
BinaryOperator
list of binary operators
Definition: qgssqlstatement.h:137
QgsSQLStatement::NodeList::list
QList< QgsSQLStatement::Node * > list()
Returns list.
Definition: qgssqlstatement.h:305
QgsSQLStatement::ntUnaryOperator
@ ntUnaryOperator
Definition: qgssqlstatement.h:201
QgsSQLStatement::RecursiveVisitor
A visitor that recursively explores all children.
Definition: qgssqlstatement.h:813
QgsSQLStatement::jtDefault
@ jtDefault
Definition: qgssqlstatement.h:175
QgsSQLStatement::NodeTableDef::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:638
QgsSQLStatement::NodeList::accept
void accept(QgsSQLStatement::Visitor &v) const
Accept visitor.
Definition: qgssqlstatement.cpp:275
QgsSQLStatement::boNotLike
@ boNotLike
Definition: qgssqlstatement.h:150
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeInOperator &n)=0
Visit NodeInOperator.
QgsSQLStatement::NodeInOperator::list
QgsSQLStatement::NodeList * list() const
Values list.
Definition: qgssqlstatement.h:414
QgsSQLStatement::NodeColumnRef::name
QString name() const
The name of the column.
Definition: qgssqlstatement.h:536
QgsSQLStatement::NodeSelectedColumn
Selected column.
Definition: qgssqlstatement.h:564
QgsSQLStatement::NodeBetweenOperator::minVal
QgsSQLStatement::Node * minVal() const
Minimum bound.
Definition: qgssqlstatement.h:447
QgsSQLStatement::NodeBetweenOperator
'X BETWEEN y and z' operator
Definition: qgssqlstatement.h:433
QgsSQLStatement::NodeList::count
int count() const
Returns the number of nodes in the list.
Definition: qgssqlstatement.h:310
QgsSQLStatement::NodeJoin::onExpr
QgsSQLStatement::Node * onExpr() const
On expression. Will be nullptr if usingColumns() is not empty.
Definition: qgssqlstatement.h:668
SIP_END
#define SIP_END
Definition: qgis_sip.h:194
QgsSQLStatement::Visitor::~Visitor
virtual ~Visitor()=default
QgsSQLStatement::NodeColumnSorted::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:708
QgsSQLStatement::jtRightOuter
@ jtRightOuter
Definition: qgssqlstatement.h:179
QgsSQLStatement::NodeUnaryOperator::~NodeUnaryOperator
~NodeUnaryOperator() override
Definition: qgssqlstatement.h:334
QgsSQLStatement::RecursiveVisitor::visit
void visit(const QgsSQLStatement::NodeColumnRef &) override
Visit NodeColumnRef.
Definition: qgssqlstatement.h:824
QgsSQLStatement::Visitor::visit
virtual void visit(const QgsSQLStatement::NodeSelectedColumn &n)=0
Visit NodeSelectedColumn.
QgsSQLStatement::NodeColumnRef::distinct
bool distinct() const
Whether this is prefixed by DISTINCT.
Definition: qgssqlstatement.h:542
QgsSQLStatement::NodeLiteral
Literal value (integer, integer64, double, string)
Definition: qgssqlstatement.h:499
QgsSQLStatement::NodeLiteral::nodeType
QgsSQLStatement::NodeType nodeType() const override
Abstract virtual that returns the type of this node.
Definition: qgssqlstatement.h:507
QgsSQLStatement::NodeSelectedColumn::alias
QString alias() const
Alias name.
Definition: qgssqlstatement.h:577