Package pysql :: Module pysqlgraphics
[hide private]
[frames] | no frames]

Module pysqlgraphics

source code

This module defines all high level graphical functions of pysql


Authors:
Sébastien Delcros (Sebastien.Delcros@gmail.com), Sébastien Renard (sebastien.renard@digitalfox.org)

License: GNU GPL V3

Functions [hide private]
 
datamodel(db, userName, tableFilter=None, withColumns=True)
Extracts the datamodel of the current user as a picture The generation of the picture is powered by Graphviz (http://www.graphviz.org) through the PyDot API (http://www.dkbza.org/pydot.html)
source code
 
dependencies(db, objectName, direction, maxDepth, maxNodes)
Displays object dependencies as a picture The generation of the picture is powered by Graphviz (http://www.graphviz.org) through the PyDot API (http://www.dkbza.org/pydot.html)
source code
 
diskusage(db, userName, withIndexes=False, percent=True)
Extracts the physical storage of the current user as a picture based on Oracle statistics The generation of the picture is powered by Graphviz (http://www.graphviz.org) through the PyDot API (http://www.dkbza.org/pydot.html)
source code
 
pkgTree(db, packageName)
Creates the call tree of internal package functions and procedures
source code
 
viewImage(imagePath)
Shows Image with prefered user image viewer
source code
 
generateImage(graph, filename, prog, format)
Generate graphviz image from graph
source code
Function Details [hide private]

datamodel(db, userName, tableFilter=None, withColumns=True)

source code 

Extracts the datamodel of the current user as a picture The generation of the picture is powered by Graphviz (http://www.graphviz.org) through the PyDot API (http://www.dkbza.org/pydot.html)

Parameters:
  • db - pysql db connection
  • userName - schema to be extracted
  • tableFilter - filter pattern (in pysql extended syntax to extract only some tables (None means all)
  • withColumns - Indicate whether columns are included or not in datamodel picture

dependencies(db, objectName, direction, maxDepth, maxNodes)

source code 

Displays object dependencies as a picture The generation of the picture is powered by Graphviz (http://www.graphviz.org) through the PyDot API (http://www.dkbza.org/pydot.html)

Parameters:
  • db - pysql db connection
  • objectName - name of the oracle object on which dependancies are computed
  • direction - direction of the dependancy graph. Can be "onto", "from" or "both"
  • maxDepth - Override default maxDepth value. If None, use default value
  • maxNodes - Override default maxNodes value. If None, use default value

viewImage(imagePath)

source code 

Shows Image with prefered user image viewer

Parameters:
  • imagePath - path to image file

generateImage(graph, filename, prog, format)

source code 

Generate graphviz image from graph

Parameters:
  • graph - pydot graph object
  • filename - image filename (str)
  • format - image format (str)