A model containing schemas from a database connection.  
 More...
#include <qgsdatabaseschemamodel.h>
 | 
| void  | refresh () | 
|   | Refreshes the schema list by querying the underlying connection.  
  | 
|   | 
A model containing schemas from a database connection. 
This class does not automatically subscribe to database updates. Schemas are queried from the database initially upon model construction. In order to update the listed schemas, QgsDatabaseSchemaModel::refresh() must be manually called.
- Since
 - QGIS 3.14 
 
Definition at line 42 of file qgsdatabaseschemamodel.h.
 
◆ CustomRole
Custom model roles. 
- Note
 - Prior to QGIS 3.36 this was available as QgsDatabaseSchemaModel::Role 
 
- Since
 - QGIS 3.36 
 
| Enumerator | 
|---|
| Empty  | Entry is an empty entry.  
 | 
Definition at line 56 of file qgsdatabaseschemamodel.h.
 
 
◆ QgsDatabaseSchemaModel() [1/2]
  
  
      
        
          | QgsDatabaseSchemaModel::QgsDatabaseSchemaModel  | 
          ( | 
          const QString &  | 
          provider,  | 
         
        
           | 
           | 
          const QString &  | 
          connection,  | 
         
        
           | 
           | 
          QObject *  | 
          parent = nullptr  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
explicit   | 
  
 
 
◆ QgsDatabaseSchemaModel() [2/2]
◆ allowEmptySchema()
  
  
      
        
          | bool QgsDatabaseSchemaModel::allowEmptySchema  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ columnCount()
  
  
      
        
          | int QgsDatabaseSchemaModel::columnCount  | 
          ( | 
          const QModelIndex &  | 
          parent = QModelIndex() | ) | 
           const | 
         
       
   | 
  
override   | 
  
 
 
◆ data()
  
  
      
        
          | QVariant QgsDatabaseSchemaModel::data  | 
          ( | 
          const QModelIndex &  | 
          index,  | 
         
        
           | 
           | 
          int  | 
          role = Qt::DisplayRole  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
override   | 
  
 
 
◆ index()
  
  
      
        
          | QModelIndex QgsDatabaseSchemaModel::index  | 
          ( | 
          int  | 
          row,  | 
         
        
           | 
           | 
          int  | 
          column,  | 
         
        
           | 
           | 
          const QModelIndex &  | 
          parent  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
override   | 
  
 
 
◆ parent()
  
  
      
        
          | QModelIndex QgsDatabaseSchemaModel::parent  | 
          ( | 
          const QModelIndex &  | 
          child | ) | 
           const | 
         
       
   | 
  
override   | 
  
 
 
◆ refresh
  
  
      
        
          | void QgsDatabaseSchemaModel::refresh  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
slot   | 
  
 
 
◆ rowCount()
  
  
      
        
          | int QgsDatabaseSchemaModel::rowCount  | 
          ( | 
          const QModelIndex &  | 
          parent = QModelIndex() | ) | 
           const | 
         
       
   | 
  
override   | 
  
 
 
◆ setAllowEmptySchema()
      
        
          | void QgsDatabaseSchemaModel::setAllowEmptySchema  | 
          ( | 
          bool  | 
          allowEmpty | ) | 
           | 
        
      
 
 
The documentation for this class was generated from the following files: