QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
QgsAbstractDatabaseProviderConnection::TableProperty Struct Reference

The TableProperty class represents a database table or view. More...

#include <qgsabstractdatabaseproviderconnection.h>

Classes

struct  GeometryColumnType
 The GeometryColumnType struct represents the combination of geometry type and CRS for the table geometry column. More...
 

Public Member Functions

void addGeometryColumnType (Qgis::WkbType type, const QgsCoordinateReferenceSystem &crs)
 Appends the geometry column type with the given srid to the geometry column types list.
 
TableProperty at (int index) const
 Returns the table property corresponding to the geometry type at the given index.
 
QString comment () const
 Returns the table comment.
 
QList< QgsCoordinateReferenceSystemcrsList () const
 Returns the list of CRSs supported by the geometry column.
 
QString defaultName () const
 Returns the default name for the table entry.
 
TableFlags flags () const
 Returns the table flags.
 
QString geometryColumn () const
 Returns the geometry column name.
 
int geometryColumnCount () const
 Returns the number of geometry columns in the original table this entry refers to.
 
QList< QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnTypegeometryColumnTypes () const
 Returns the list of geometry column types and CRSs.
 
QVariantMap info () const
 Returns additional information about the table.
 
int maxCoordinateDimensions () const
 Returns the maximum coordinate dimensions of the geometries of a vector table.
 
bool operator== (const QgsAbstractDatabaseProviderConnection::TableProperty &other) const
 
QStringList primaryKeyColumns () const
 Returns the list of primary key column names.
 
QString schema () const
 Returns the schema or an empty string for backends that do not support a schema.
 
void setComment (const QString &comment)
 Sets the table comment.
 
void setFlag (const TableFlag &flag)
 Sets a flag.
 
void setFlags (const TableFlags &flags)
 Sets the table flags.
 
void setGeometryColumn (const QString &geometryColumn)
 Sets the geometry column name to geometryColumn.
 
void setGeometryColumnCount (int geometryColumnCount)
 Sets the geometryColumnCount.
 
void setGeometryColumnTypes (const QList< QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType > &geometryColumnTypes)
 Sets the geometry column types to geometryColumnTypes.
 
void setInfo (const QVariantMap &info)
 Sets additional information about the table to info.
 
void setPrimaryKeyColumns (const QStringList &primaryKeyColumns)
 Sets the primary key column names to primaryKeyColumns.
 
void setSchema (const QString &schema)
 Sets the schema.
 
void setTableName (const QString &name)
 Sets the table name to name.
 
QString tableName () const
 Returns the table name.
 

Detailed Description

The TableProperty class represents a database table or view.

In case the table is a vector spatial table and it has multiple geometry columns, separate entries for each geometry column must be created.

In case the table is a vector spatial table and the geometry column can contain multiple geometry types and/or CRSs, a clone of the property for the individual geometry type/CRS can be retrieved with at(i)

Definition at line 269 of file qgsabstractdatabaseproviderconnection.h.

Member Function Documentation

◆ addGeometryColumnType()

void QgsAbstractDatabaseProviderConnection::TableProperty::addGeometryColumnType ( Qgis::WkbType  type,
const QgsCoordinateReferenceSystem crs 
)

Appends the geometry column type with the given srid to the geometry column types list.

Definition at line 1317 of file qgsabstractdatabaseproviderconnection.cpp.

◆ at()

QgsAbstractDatabaseProviderConnection::TableProperty QgsAbstractDatabaseProviderConnection::TableProperty::at ( int  index) const

Returns the table property corresponding to the geometry type at the given index.

Definition at line 1413 of file qgsabstractdatabaseproviderconnection.cpp.

◆ comment()

QString QgsAbstractDatabaseProviderConnection::TableProperty::comment ( ) const

Returns the table comment.

Definition at line 1485 of file qgsabstractdatabaseproviderconnection.cpp.

◆ crsList()

QList< QgsCoordinateReferenceSystem > QgsAbstractDatabaseProviderConnection::TableProperty::crsList ( ) const

Returns the list of CRSs supported by the geometry column.

Definition at line 1505 of file qgsabstractdatabaseproviderconnection.cpp.

◆ defaultName()

QString QgsAbstractDatabaseProviderConnection::TableProperty::defaultName ( ) const

Returns the default name for the table entry.

This is usually the table name but in case there are multiple geometry columns, the geometry column name is appended to the table name.

See also
geometryColumnCount()

Definition at line 1406 of file qgsabstractdatabaseproviderconnection.cpp.

◆ flags()

QgsAbstractDatabaseProviderConnection::TableFlags QgsAbstractDatabaseProviderConnection::TableProperty::flags ( ) const

Returns the table flags.

Definition at line 1495 of file qgsabstractdatabaseproviderconnection.cpp.

◆ geometryColumn()

QString QgsAbstractDatabaseProviderConnection::TableProperty::geometryColumn ( ) const

Returns the geometry column name.

Definition at line 1525 of file qgsabstractdatabaseproviderconnection.cpp.

◆ geometryColumnCount()

int QgsAbstractDatabaseProviderConnection::TableProperty::geometryColumnCount ( ) const

Returns the number of geometry columns in the original table this entry refers to.

This information is used internally to build the

See also
defaultName().

Definition at line 1465 of file qgsabstractdatabaseproviderconnection.cpp.

◆ geometryColumnTypes()

QList< QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType > QgsAbstractDatabaseProviderConnection::TableProperty::geometryColumnTypes ( ) const

Returns the list of geometry column types and CRSs.

The method returns a list of GeometryColumnType.

Definition at line 1331 of file qgsabstractdatabaseproviderconnection.cpp.

◆ info()

QVariantMap QgsAbstractDatabaseProviderConnection::TableProperty::info ( ) const

Returns additional information about the table.

Provider classes may use this property to store custom bits of information.

Definition at line 1475 of file qgsabstractdatabaseproviderconnection.cpp.

◆ maxCoordinateDimensions()

int QgsAbstractDatabaseProviderConnection::TableProperty::maxCoordinateDimensions ( ) const

Returns the maximum coordinate dimensions of the geometries of a vector table.

This information is calculated from the geometry columns types.

See also
geometryColumnTypes()

Definition at line 1436 of file qgsabstractdatabaseproviderconnection.cpp.

◆ operator==()

bool QgsAbstractDatabaseProviderConnection::TableProperty::operator== ( const QgsAbstractDatabaseProviderConnection::TableProperty other) const

Definition at line 1446 of file qgsabstractdatabaseproviderconnection.cpp.

◆ primaryKeyColumns()

QStringList QgsAbstractDatabaseProviderConnection::TableProperty::primaryKeyColumns ( ) const

Returns the list of primary key column names.

Definition at line 1515 of file qgsabstractdatabaseproviderconnection.cpp.

◆ schema()

QString QgsAbstractDatabaseProviderConnection::TableProperty::schema ( ) const

Returns the schema or an empty string for backends that do not support a schema.

Definition at line 1535 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setComment()

void QgsAbstractDatabaseProviderConnection::TableProperty::setComment ( const QString &  comment)

Sets the table comment.

Definition at line 1490 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setFlag()

void QgsAbstractDatabaseProviderConnection::TableProperty::setFlag ( const TableFlag flag)

Sets a flag.

Definition at line 1431 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setFlags()

void QgsAbstractDatabaseProviderConnection::TableProperty::setFlags ( const TableFlags &  flags)

Sets the table flags.

Definition at line 1500 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setGeometryColumn()

void QgsAbstractDatabaseProviderConnection::TableProperty::setGeometryColumn ( const QString &  geometryColumn)

Sets the geometry column name to geometryColumn.

Definition at line 1530 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setGeometryColumnCount()

void QgsAbstractDatabaseProviderConnection::TableProperty::setGeometryColumnCount ( int  geometryColumnCount)

Sets the geometryColumnCount.

Definition at line 1470 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setGeometryColumnTypes()

void QgsAbstractDatabaseProviderConnection::TableProperty::setGeometryColumnTypes ( const QList< QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType > &  geometryColumnTypes)

Sets the geometry column types to geometryColumnTypes.

Definition at line 1459 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setInfo()

void QgsAbstractDatabaseProviderConnection::TableProperty::setInfo ( const QVariantMap &  info)

Sets additional information about the table to info.

Provider classes may use this property to store custom bits of information.

Definition at line 1480 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setPrimaryKeyColumns()

void QgsAbstractDatabaseProviderConnection::TableProperty::setPrimaryKeyColumns ( const QStringList &  primaryKeyColumns)

Sets the primary key column names to primaryKeyColumns.

Definition at line 1520 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setSchema()

void QgsAbstractDatabaseProviderConnection::TableProperty::setSchema ( const QString &  schema)

Sets the schema.

Definition at line 1540 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setTableName()

void QgsAbstractDatabaseProviderConnection::TableProperty::setTableName ( const QString &  name)

Sets the table name to name.

See also
defaultName()

Definition at line 1312 of file qgsabstractdatabaseproviderconnection.cpp.

◆ tableName()

QString QgsAbstractDatabaseProviderConnection::TableProperty::tableName ( ) const

Returns the table name.

See also
defaultName()

Definition at line 1307 of file qgsabstractdatabaseproviderconnection.cpp.


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