Main class for schema browser is toBrowser. It is sub-classed from QTabWidget and provides:

Object list

Base classes for object list are toBrowserSchemaCodeBrowser (for code: functions, procedures, packages and types) and toBrowserSchemaTableView (for everything else: tables, views, synonyms etc.) both subclassed from toBrowserSchemaBase.

Object details

Base class for object details is toBrowserBaseWidget.

This class will provide tabs for different properties of selected object (f.e. for table that would be columns, indexes, constraints etc.). As it is just a base class – it does not have much functionality – simply manages updating object cache for all object types. It also defines which functions must be defined in all it's subclasses:

  • changeParams – this would fetch data for particular type of property.
  • changeConnection – TODO
  • addTab – this would be used for a specific database object type implementation to add a tab for each implemented property.

Further on each tab (each type of object) will have it's own class subclassed from toBrowserBaseWidget:

  • Sequences - toBrowserSequenceWidget
  • Triggers - toBrowserTriggerWidget
  • etc.

Each of these classes will have a number of objects to display different types of object type properties:

  • toResultItem - a number of read-only fields
  • toResultFields - one field (say to display code)
  • toResultCols - columns of an object
  • toResultGrants - grants of an object
  • toResultDepend - dependencies of an object
  • toResultExtract - SQL used to recreate an object
Change of displayed properties

When a user chooses a different type/property, following methods are called:

  • toBrowser::changeItem() - called when switching to a different object type
  • toBrowserBaseWidget::tabWidget_currentChanged - when switching to a different tab
  • toBrowserBaseWidget::changeParams
  • toBrowserBaseWidget::updateData
  • toResult::changeParams
  • toXXXXResult::query - this is item type (extract, depend, fields, cols etc.) dependant query which fetches required data and fills it into corresponding fields.
 
knowhow/schemabrowser.txt · Last modified: 2010/10/08 18:27 by Tomas Straupis
Recent changes RSS feed Privacy Policy Support This Project