QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
qgssqliteexpressioncompiler.h
Go to the documentation of this file.
1/***************************************************************************
2 qgssqliteexpressioncompiler.h
3 ---------------------------------
4 begin : November 2015
5 copyright : (C) 2015 Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSSQLITEEXPRESSIONCOMPILER_H
17#define QGSSQLITEEXPRESSIONCOMPILER_H
18
19#define SIP_NO_FILE
20
22
23#include "qgis_core.h"
25
37class CORE_EXPORT QgsSQLiteExpressionCompiler : public QgsSqlExpressionCompiler
38{
39 public:
40
48 explicit QgsSQLiteExpressionCompiler( const QgsFields &fields, bool ignoreStaticNodes = false );
49
50 protected:
51
52 Result compileNode( const QgsExpressionNode *node, QString &str ) override;
53 QString quotedIdentifier( const QString &identifier ) override;
54 QString quotedValue( const QVariant &value, bool &ok ) override;
55 QString sqlFunctionFromFunctionName( const QString &fnName ) const override;
56 QStringList sqlArgumentsFromFunctionName( const QString &fnName, const QStringList &fnArgs ) const override;
57 QString castToReal( const QString &value ) const override;
58 QString castToInt( const QString &value ) const override;
59 QString castToText( const QString &value ) const override;
60
61};
62
64
65#endif // QGSSQLITEEXPRESSIONCOMPILER_H
Abstract base class for all nodes that can appear in an expression.
Container of fields for a vector layer.
Definition: qgsfields.h:45
Generic expression compiler for translation to provider specific SQL WHERE clauses.
virtual Result compileNode(const QgsExpressionNode *node, QString &str)
Compiles an expression node and returns the result of the compilation.
virtual QStringList sqlArgumentsFromFunctionName(const QString &fnName, const QStringList &fnArgs) const
Returns the Arguments for SQL function for the expression function.
virtual QString quotedValue(const QVariant &value, bool &ok)
Returns a quoted attribute value, in the format expected by the provider.
virtual QString castToText(const QString &value) const
Casts a value to a text result.
virtual QString castToInt(const QString &value) const
Casts a value to a integer result.
virtual QString quotedIdentifier(const QString &identifier)
Returns a quoted column identifier, in the format expected by the provider.
virtual QString sqlFunctionFromFunctionName(const QString &fnName) const
Returns the SQL function for the expression function.
virtual QString castToReal(const QString &value) const
Casts a value to a real result.
#define str(x)
Definition: qgis.cpp:38