QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsProviderSqlQueryBuilder Class Reference

Provides an interface for provider-specific creation of SQL queries. More...

#include <qgsprovidersqlquerybuilder.h>

Public Member Functions

virtual ~QgsProviderSqlQueryBuilder ()
 
virtual QString createLimitQueryForTable (const QString &schema, const QString &name, int limit=10) const
 Returns a result size limited SQL query string generated for the given schema and table name, retrieving all columns for the first limit rows.
 
virtual QString quoteIdentifier (const QString &identifier) const
 Returns a properly quoted version of a table/schema identifier.
 

Detailed Description

Provides an interface for provider-specific creation of SQL queries.

The QgsProviderSqlQueryBuilder provides an interface for creation of SQL queries, which can be overridden for backend provider specific SQL syntax.

Since
QGIS 3.28

Definition at line 33 of file qgsprovidersqlquerybuilder.h.

Constructor & Destructor Documentation

◆ ~QgsProviderSqlQueryBuilder()

QgsProviderSqlQueryBuilder::~QgsProviderSqlQueryBuilder ( )
virtualdefault

Member Function Documentation

◆ createLimitQueryForTable()

QString QgsProviderSqlQueryBuilder::createLimitQueryForTable ( const QString &  schema,
const QString &  name,
int  limit = 10 
) const
virtual

Returns a result size limited SQL query string generated for the given schema and table name, retrieving all columns for the first limit rows.

The base class method returns the SQL query "SELECT * FROM table LIMIT 10". Subclasses may return database specific equivalents to this query.

Definition at line 22 of file qgsprovidersqlquerybuilder.cpp.

◆ quoteIdentifier()

QString QgsProviderSqlQueryBuilder::quoteIdentifier ( const QString &  identifier) const
virtual

Returns a properly quoted version of a table/schema identifier.

Definition at line 30 of file qgsprovidersqlquerybuilder.cpp.


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