[Qgis-developer] Get table names from postgis database Quantum GIS
API
Minja
msiljegovic at gmail.com
Fri Aug 13 06:00:22 EDT 2010
Hi all,
I strated to develop some small framework using Quantum GIS API(stable
version)...I have created class for connection to postgis database using
QGISDataSourceUri class and its methods.
There is method "void
setDataSource<http://doc.qgis.org/stable/classQgsDataSourceURI.html#c4916de51bcb4ea512a52bb23527a5a7>(const
QString &aSchema, const QString &aTable, const QString
&aGeometryColumn, const QString &aSql=QString())" in which I specified
schema name, table name, and geometry column name from which I want
potentialy to create layer for my canvas.
My Question is is it possible somehow to read from connection string all
schema names in database or to read all tables which belongs to specific
schema. I already used some Autodesk APIs and it is implemented....For
example to loop through all tables that belongs to some schema!
What I want in my application is for example when user start application to
load all tables (as layers) from postgis database that are related to some
schema. As I can see, maybe I missed it, I need to be aware of every table
name in schema and geometry column, probably I can do it by making some
configuration file from which I will read what tables initaly I want to load
from schema
Is there something similar in Quantum GIS API, I couldnt find it...
Thanks for any help
Minja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20100813/19595c69/attachment.html
More information about the Qgis-developer
mailing list