Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dtp-dev] DBDefinition model change request

Hi everybody.
       I'm Hui Cao, a committer of the SQL Dev project. When we investigated on how to integrate the SQL Editor/Debugger framework with the Model Base project, we made some modifications of the dbdefinition model to fit our needs. I bring them up here and hope these modifications can be included in the next version of the dbdefinition model. Here they are:

       1. Add a new class called
"DebuggerDefinition" with an attribute called conditionSupported which is used to specify whether a databse debugger supports condition for breakpoints. This allows us to correctly initialize the breakpoint property page.
 <eClassifiers xsi:type="ecore:EClass" name="DebuggerDefinition">

   <eStructuralFeatures xsi:type="ecore:EAttribute" name="conditionSupported" eType="ecore:EDataType"/>


       2. Add a new reference to a DebuggerDefinition object in
   <eStructuralFeatures xsi:type="ecore:EReference" name="debuggerDefinition" eType="#//DebuggerDefinition"/>

3. Add 2 new attributes in DatabaseVendorDefinition: eventSupported and sqlUdfSupported, referring respecitively to the features that whether a database vendor supports sql event or user defined function. These attributes are necessary for us to create/edit/run/debug these objects.
   <eStructuralFeatures xsi:type="ecore:EAttribute" name="eventSupported" eType="ecore:EDataType"/>

   <eStructuralFeatures xsi:type="ecore:EAttribute" name="sqlUdfSupported" eType="ecore:EDataType"/>

       Along with that, these correspondent APIs should be added in org.eclipse.wst.rdb.internal.core.definition.DatabaseDefinition:

       public DebuggerDefinition getDebuggerDefinition();

       public boolean supportsEvents();

       public boolean supportsSQLUDFs();

       and the following implementation should be in org.eclipse.wst.rdb.internal.core.definition.DatabaseDefinitionImpl :

       public boolean supportsEvents() {


               return this.databaseVendorDefinition.isEventSupported();


       public boolean supportsSQLUDFs() {


               return this.databaseVendorDefinition.isSqlUdfSupported();


       public DebuggerDefinition getDebuggerDefinition() {


               return this.databaseVendorDefinition.getDebuggerDefinition();


Any feedback is appreciated! Thanks!

Best Regards!

Hui Cao
Sr S/W Eng - Dev
Sybase, Inc. Shanghai, China
Tel: 86-21-68799918-3047

Back to the top