parameters: (self, schema=None)
return_statement: return items
docstring: Get list of table with a geometry column
          it returns a table of tuples:
              name (table name)
              namespace (schema/owner)
              isView (is a view?)
              geometry_column
              srid
docstring_summary: Get list of table with a geometry column
          it returns a table of tuples:
              name (table name)
              namespace (schema/owner)
              isView (is a view?)
              geometry_column
              srid
docstring_tokens: Get list of table with a geometry column it returns a table of tuples : name ( table name ) namespace ( schema / owner ) isView ( is a view? ) geometry_column srid
function: def getVectorTables(self, schema=None):
          """Get list of table with a geometry column
          it returns a table of tuples:
              name (table name)
              namespace (schema/owner)
              isView (is a view?)
              geometry_column
              srid
          """
          if not self.has_spatial:
              return []
  
          # discovery of all geographic tables
          prefix = u"all"
          owner = u"c.owner"
          where = None
  
          if not self.geometryColumnsOnly:
              where = u"WHERE c.data_type = 'SDO_GEOMETRY'"
          if schema and not self.userTablesOnly:
              where = u"{0} c.owner = {1}".format(
                  u"{} AND".format(where) if where else u"WHERE",
                  self.quoteString(schema))
  
          if self.userTablesOnly:
              prefix = u"user"
              owner = u"user As owner"
              if self.geometryColumnsOnly:
                  where = u""
  
          sql = u"""
          SELECT c.table_name, {0},
                 CASE o.OBJECT_TYPE
                 WHEN 'VIEW' THEN 1
                 ELSE 0 END As isView,
                 c.column_name,
                 {1}
          FROM {2}_{3} c
          JOIN {2}_objects o ON c.table_name = o.object_name
               AND o.object_type IN ('TABLE','VIEW','SYNONYM') {4} {5}
          ORDER BY TABLE_NAME
          """.format(owner,
                     u"c.srid" if self.geometryColumnsOnly
                     else u"NULL as srid",
                     prefix,
                     u"sdo_geom_metadata" if self.geometryColumnsOnly
                     else u"tab_columns",
                     u"" if self.userTablesOnly
                     else u"AND c.owner = o.owner",
                     where)
  
          # For each table, get all of the details
          items = []
  
          c = self._execute(None, sql)
          lst_tables = self._fetchall(c)
          c.close()
  
          for i, tbl in enumerate(lst_tables):
              item = list(tbl)
              detectedSrid = item.pop()
              if detectedSrid == NULL:
                  detectedSrid = u"-1"
              else:
                  detectedSrid = int(detectedSrid)
  
              if schema:
                  table_name = u"{0}.{1}".format(self.quoteId(schema),
                                                 self.quoteId(item[0]))
              else:
                  table_name = self.quoteId(item[0])
              geocol = self.quoteId(item[3])
              geomMultiTypes, multiSrids = self.getTableGeomTypes(
                  table_name, geocol)
              geomtypes = list(geomMultiTypes)
              srids = list(multiSrids)
              item.insert(0, Table.VectorType)
  
              geomtypes, srids = self.singleGeomTypes(geomtypes, srids)
  
              for j in range(len(geomtypes)):
                  buf = list(item)
                  geomtype = geomtypes[j]
                  datatype = QgsWkbTypes.displayString(QgsWkbTypes.flatType(QgsWkbTypes.singleType(geomtype)))
                  geo = datatype.upper()
                  buf.append(geo)  # Geometry type as String
                  buf.append(geomtype)  # Qgis.WkbType
                  buf.append(QgsWkbTypes.coordDimensions(geomtype))  # Dimensions
                  buf.append(detectedSrid)  # srid
                  if not self.onlyExistingTypes:
                      geomMultiTypes.append(0)
                      multiSrids.append(multiSrids[0])
                  buf.append(u",".join([str(x) for x in
                                        geomMultiTypes]))
                  buf.append(u",".join([str(x) for x in multiSrids]))
                  items.append(buf)
  
              if self.allowGeometrylessTables and buf[-6] != u"UNKNOWN":
                  copybuf = list(buf)
                  copybuf[4] = u""
                  copybuf[-6] = u"UNKNOWN"
                  copybuf[-5] = QgsWkbTypes.NullGeometry
                  copybuf[-2] = QgsWkbTypes.NullGeometry
                  copybuf[-1] = u"0"
                  items.append(copybuf)
  
          return items
function_tokens: def getVectorTables ( self , schema = None ) : if not self . has_spatial : return [ ] # discovery of all geographic tables prefix = u"all" owner = u"c.owner" where = None if not self . geometryColumnsOnly : where = u"WHERE c.data_type = 'SDO_GEOMETRY'" if schema and not self . userTablesOnly : where = u"{0} c.owner = {1}" . format ( u"{} AND" . format ( where ) if where else u"WHERE" , self . quoteString ( schema ) ) if self . userTablesOnly : prefix = u"user" owner = u"user As owner" if self . geometryColumnsOnly : where = u"" sql = u"""
          SELECT c.table_name, {0},
                 CASE o.OBJECT_TYPE
                 WHEN 'VIEW' THEN 1
                 ELSE 0 END As isView,
                 c.column_name,
                 {1}
          FROM {2}_{3} c
          JOIN {2}_objects o ON c.table_name = o.object_name
               AND o.object_type IN ('TABLE','VIEW','SYNONYM') {4} {5}
          ORDER BY TABLE_NAME
          """ . format ( owner , u"c.srid" if self . geometryColumnsOnly else u"NULL as srid" , prefix , u"sdo_geom_metadata" if self . geometryColumnsOnly else u"tab_columns" , u"" if self . userTablesOnly else u"AND c.owner = o.owner" , where ) # For each table, get all of the details items = [ ] c = self . _execute ( None , sql ) lst_tables = self . _fetchall ( c ) c . close ( ) for i , tbl in enumerate ( lst_tables ) : item = list ( tbl ) detectedSrid = item . pop ( ) if detectedSrid == NULL : detectedSrid = u"-1" else : detectedSrid = int ( detectedSrid ) if schema : table_name = u"{0}.{1}" . format ( self . quoteId ( schema ) , self . quoteId ( item [ 0 ] ) ) else : table_name = self . quoteId ( item [ 0 ] ) geocol = self . quoteId ( item [ 3 ] ) geomMultiTypes , multiSrids = self . getTableGeomTypes ( table_name , geocol ) geomtypes = list ( geomMultiTypes ) srids = list ( multiSrids ) item . insert ( 0 , Table . VectorType ) geomtypes , srids = self . singleGeomTypes ( geomtypes , srids ) for j in range ( len ( geomtypes ) ) : buf = list ( item ) geomtype = geomtypes [ j ] datatype = QgsWkbTypes . displayString ( QgsWkbTypes . flatType ( QgsWkbTypes . singleType ( geomtype ) ) ) geo = datatype . upper ( ) buf . append ( geo ) # Geometry type as String buf . append ( geomtype ) # Qgis.WkbType buf . append ( QgsWkbTypes . coordDimensions ( geomtype ) ) # Dimensions buf . append ( detectedSrid ) # srid if not self . onlyExistingTypes : geomMultiTypes . append ( 0 ) multiSrids . append ( multiSrids [ 0 ] ) buf . append ( u"," . join ( [ str ( x ) for x in geomMultiTypes ] ) ) buf . append ( u"," . join ( [ str ( x ) for x in multiSrids ] ) ) items . append ( buf ) if self . allowGeometrylessTables and buf [ - 6 ] != u"UNKNOWN" : copybuf = list ( buf ) copybuf [ 4 ] = u"" copybuf [ - 6 ] = u"UNKNOWN" copybuf [ - 5 ] = QgsWkbTypes . NullGeometry copybuf [ - 2 ] = QgsWkbTypes . NullGeometry copybuf [ - 1 ] = u"0" items . append ( copybuf ) return items