QGIS API Documentation 3.41.0-Master (af5edcb665c)
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 1318 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 1414 of file qgsabstractdatabaseproviderconnection.cpp.

◆ comment()

QString QgsAbstractDatabaseProviderConnection::TableProperty::comment ( ) const

Returns the table comment.

Definition at line 1486 of file qgsabstractdatabaseproviderconnection.cpp.

◆ crsList()

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

Returns the list of CRSs supported by the geometry column.

Definition at line 1506 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 1407 of file qgsabstractdatabaseproviderconnection.cpp.

◆ flags()

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

Returns the table flags.

Definition at line 1496 of file qgsabstractdatabaseproviderconnection.cpp.

◆ geometryColumn()

QString QgsAbstractDatabaseProviderConnection::TableProperty::geometryColumn ( ) const

Returns the geometry column name.

Definition at line 1526 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 1466 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 1332 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 1476 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 1437 of file qgsabstractdatabaseproviderconnection.cpp.

◆ operator==()

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

Definition at line 1447 of file qgsabstractdatabaseproviderconnection.cpp.

◆ primaryKeyColumns()

QStringList QgsAbstractDatabaseProviderConnection::TableProperty::primaryKeyColumns ( ) const

Returns the list of primary key column names.

Definition at line 1516 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 1536 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setComment()

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

Sets the table comment.

Definition at line 1491 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setFlag()

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

Sets a flag.

Definition at line 1432 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setFlags()

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

Sets the table flags.

Definition at line 1501 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setGeometryColumn()

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

Sets the geometry column name to geometryColumn.

Definition at line 1531 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setGeometryColumnCount()

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

Sets the geometryColumnCount.

Definition at line 1471 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 1460 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 1481 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setPrimaryKeyColumns()

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

Sets the primary key column names to primaryKeyColumns.

Definition at line 1521 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setSchema()

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

Sets the schema.

Definition at line 1541 of file qgsabstractdatabaseproviderconnection.cpp.

◆ setTableName()

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

Sets the table name to name.

See also
defaultName()

Definition at line 1313 of file qgsabstractdatabaseproviderconnection.cpp.

◆ tableName()

QString QgsAbstractDatabaseProviderConnection::TableProperty::tableName ( ) const

Returns the table name.

See also
defaultName()

Definition at line 1308 of file qgsabstractdatabaseproviderconnection.cpp.


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