MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:rburnett Date:March 29 2007 6:53pm
Subject:Visual Studio Plugin commit: r39 - in trunk: . Utils
View as plain text  
Modified:
   trunk/CHANGES
   trunk/MySqlDataObjectSupport.xml
   trunk/MySqlDataViewSupport.xml
   trunk/Utils/QueryBuilder.cs
Log:
Bug #26364 Error when using SP's in dataset designer. 

MySqlDataObjectSupport.xml - Commented out support for scalar and tabular functions
MySqlDataViewSupport.xml - Removed all but name property from the identity section for
stored procedures.  still trying to get the name to just appear as Name instead of as Name
(schema).
QueryBuilder.cs - Fixed problem where a symbol that came in as already quoted would be
quoted again resulting in a triple quote.


Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES	2007-03-27 21:07:14 UTC (rev 38)
+++ trunk/CHANGES	2007-03-29 18:53:54 UTC (rev 39)
@@ -3,10 +3,11 @@
   Bugs fixed
   ----------
 	Bug #26348 DataSet wizard shows all tables instead of tables on your selected database 
+	Bug #26364 Error when using SP's in dataset designer. 
 
   Other changes
   --------------------
-  Stored procedure editor should now respect the font settings defined in Tools|Options. 

+	  Stored procedure editor should now respect the font settings defined in Tools|Options.
 
 
 Version 1.0.2
 

Modified: trunk/MySqlDataObjectSupport.xml
===================================================================
--- trunk/MySqlDataObjectSupport.xml	2007-03-27 21:07:14 UTC (rev 38)
+++ trunk/MySqlDataObjectSupport.xml	2007-03-29 18:53:54 UTC (rev 39)
@@ -31,6 +31,8 @@
         -->
         <Concept name="Table" restrictions="null,{Schema},{Name}" />
       </Concepts>
+      
+      <!-- This section dfeines what uniquely identifes one of these objects -->
       <Identifier>
         <Part name="Database" itemName="TABLE_CATALOG">
           <Concepts>
@@ -48,6 +50,7 @@
           </Concepts>
         </Part>
       </Identifier>
+      
       <Properties>
         <Property name="Schema" type="System.String" itemName="TABLE_SCHEMA">
           <Concepts>
@@ -515,57 +518,52 @@
     <Type name="StoredProcedure" defaultSort="Schema, Name"
minSourceVersion="5.0.0">
       <Concepts>
         <Concept name="StoredProcedure" restrictions="null, {Schema}, {Name},
PROCEDURE" />
-        <Concept name="TabularFunction" restrictions="null, {Schema}, {Name},
PROCEDURE" />
+<!--        <Concept name="TabularFunction" restrictions="null, {Schema}, {Name},
PROCEDURE" />-->
         <Concept name="Function" restrictions="null, {Schema}, {Name}, FUNCTION" />
-        <Concept name="ScalarFunction" restrictions="null, {Schema}, {Name}, FUNCTION"
/>
+<!--        <Concept name="ScalarFunction" restrictions="null, {Schema}, {Name},
FUNCTION" />-->
       </Concepts>
+
       <Identifier>
         <Part name="Database" itemName="ROUTINE_CATALOG">
           <Concepts>
-            <Concept name="Identifier0" />
+            <Concept name="Identifier0"/>
           </Concepts>
         </Part>
         <Part name="Schema" itemName="ROUTINE_SCHEMA">
           <Concepts>
-            <Concept name="Identifier1" />
+            <Concept name="Identifier1"/>
           </Concepts>
         </Part>
-        <Part name="Type" itemName="ROUTINE_TYPE">
+        <Part name="Name" itemName="SPECIFIC_NAME">
           <Concepts>
-            <Concept name="Identifier2" />
+            <Concept name="Identifier2"/>
           </Concepts>
         </Part>
-        <Part name="Name" itemName="ROUTINE_NAME">
-          <Concepts>
-            <Concept name="Identifier3" />
-          </Concepts>
-        </Part>
       </Identifier>
+
       <Restrictions>
-        <Restriction name="Database" />
-        <Restriction name="Schema" />
-        <Restriction name="Name" />
-        <Restriction name="Type" />
+        <Restriction name="Database"/>
+        <Restriction name="Schema"/>
+        <Restriction name="Name"/>
+        <Restriction name="Type"/>
       </Restrictions>
-
+      
       <Properties>
         <Property name="Schema" type="System.String" itemName="ROUTINE_SCHEMA">
           <Concepts>
             <Concept name="Schema" />
-            <Concept name="Type">
-              <!--
-                Only procedures from information_schema schema considered as system 
-                procedures
-              -->
+<!--            <Concept name="Type">
               <Conversion>
                 <Calculate expr="IIF(NOT ({0} = 'information_schema'), 'USER',
'SYSTEM')" type="System.String" />
               </Conversion>
-            </Concept>
+            </Concept>-->
           </Concepts>
         </Property>
         <Property name="Type" type="System.String" itemName="ROUTINE_TYPE" />
         <Property name="Name" type="System.String" itemName="ROUTINE_NAME" />
         <Property name="SpecificName" type="System.String" itemName="SPECIFIC_NAME"
/>
+        <Property name="CreationTime" type="System.DateTime" itemName="CREATED" />
+        <Property name="LastModified" type="System.DateTime" itemName="LAST_ALTERED"
/>
         <Property name="Returns" type="System.String" itemName="DTD_IDENTIFIER" />
         <Property name="Body" type="System.String" itemName="ROUTINE_BODY" />
         <Property name="Definition" type="System.String" itemName="ROUTINE_DEFINITION"
/>
@@ -576,8 +574,6 @@
         <Property name="DataAccess" type="System.String" itemName="SQL_DATA_ACCESS"
/>
         <Property name="SqlPath" type="System.String" itemName="SQL_PATH" />
         <Property name="SecurityType" type="System.String" itemName="SECURITY_TYPE"
/>
-        <Property name="CreationTime" type="System.DateTime" itemName="CREATED" />
-        <Property name="LastModified" type="System.DateTime" itemName="LAST_ALTERED"
/>
         <Property name="Mode" type="System.String" itemName="SQL_MODE" />
         <Property name="Comment" type="System.String" itemName="ROUTINE_COMMENT" />
         <Property name="Definer" type="System.String" itemName="DEFINER" />
@@ -881,9 +877,10 @@
     <!--
 			Defines a type that represents an index.
 		-->
-    <Type name="Index" defaultSort="Catalog,Table,Name">
+    <Type name="Index" defaultSort="Schema,Table,Name">
       <Concepts>
-        <Concept name="TableUniqueKey" restrictions="null,{Table},{Name}"
filter="IsUnique = 'YES'"/>
+        <Concept name="TableIndex" restrictions="null,{Schema},{Table},{Name}"/>
+        <Concept name="TableUniqueKey" restrictions="null,{Schema},{Table},{Name}"
filter="IsUnique = true"/>
       </Concepts>
       <Identifier>
         <Part name="Catalog" itemName="INDEX_CATALOG">
@@ -953,9 +950,10 @@
       </Actions>
     </Type>
 
-    <Type name="IndexColumn" defaultSort="Catalog,Table,Index,Ordinal">
+    <Type name="IndexColumn" defaultSort="Schema,Table,Index,Ordinal">
       <Concepts>
-        <Concept name="TableUniqueKeyColumn"
restrictions="null,{Table},{TableUniqueKey},{Name}"/>
+        <Concept name="TableIndexColumn" restrictions
="null,{Schema},{Table},{TableIndex},{Name}"/>
+        <Concept name="TableUniqueKeyColumn"
restrictions="null,{Schema},{Table},{TableUniqueKey},{Name}"/>
       </Concepts>
       <Identifier>
         <Part name="Catalog" itemName="INDEX_CATALOG">

Modified: trunk/MySqlDataViewSupport.xml
===================================================================
--- trunk/MySqlDataViewSupport.xml	2007-03-27 21:07:14 UTC (rev 38)
+++ trunk/MySqlDataViewSupport.xml	2007-03-29 18:53:54 UTC (rev 39)
@@ -81,7 +81,7 @@
                         <Icon name="Column" />
                       </SelectionNode>
                     </Selection>
-                    <Selection type="Trigger"
restrictions="null,{Table.Schema},{Table.Name}" 
+                    <Selection type="Trigger"
restrictions="null,{Table.Schema},{Table.Name}"
                                minSourceVersion="5.0.0">
                       <SelectionNode>
                         <Icon name="Trigger" />
@@ -621,7 +621,7 @@
     <TypeExtension name="StoredProcedure">
       <DisplayName resource="Type_StoredProcedure" />
       <Identifier>
-        <Part name="Database">
+        <!--        <Part name="Database">
           <DisplayName resource="DisplayName_Object_Database" />
           <Category resource="Category_Identifier" />
           <Description resource="Description_Object_Database" />
@@ -639,7 +639,7 @@
             <StandardValue value="PROCEDURE" resource="Value_Procedure" />
             <StandardValue value="FUNCTION" resource="Value_Function" />
           </StandardValues>
-        </Part>
+        </Part>-->
         <Part name="Name">
           <DisplayName resource="DisplayName_Object_Name" />
           <Category resource="Category_Identifier" />

Modified: trunk/Utils/QueryBuilder.cs
===================================================================
--- trunk/Utils/QueryBuilder.cs	2007-03-27 21:07:14 UTC (rev 38)
+++ trunk/Utils/QueryBuilder.cs	2007-03-29 18:53:54 UTC (rev 39)
@@ -605,7 +605,17 @@
         {
             if (value == null)
                 throw new ArgumentNullException("value");
-            return '`' + value.Replace("`","``") + '`';
+            char open = Char.MinValue;
+            char close = Char.MinValue;
+
+            if (!value.StartsWith("`"))
+                open = '`';
+            if (!value.EndsWith("`"))
+                close = '`';
+            if (open == Char.MinValue && close == Char.MinValue)
+                return value;
+            value = value.Replace("`", "``");
+            return String.Format("{0}{1}{2}", open, value, close);
         } 
         #endregion
 

Thread
Visual Studio Plugin commit: r39 - in trunk: . Utilsrburnett29 Mar