[Monodevelop-patches-list] r2701 - in trunk/MonoDevelop: . Extras/MonoQuery Extras/MonoQuery/Mono.Data.Sql Extras/MonoQuery/Mono.Data.Sql/Providers Extras/MonoQuery/Mono.Data.Sql/Schema Extras/MonoQuery/MonoQuery Extras/MonoQuery/MonoQuery/Commands Extras/MonoQuery/MonoQuery/Gui Extras/MonoQuery/MonoQuery/Gui/NodeBuilders Extras/MonoQuery/tests build/data/resources/icons po
Christian Hergert <chris@mosaix.net>
chergert at mono-cvs.ximian.com
Tue Aug 2 16:35:00 EDT 2005
Author: chergert
Date: 2005-08-02 16:35:00 -0400 (Tue, 02 Aug 2005)
New Revision: 2701
Added:
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql.mds
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/AssemblyInfo.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Makefile.am
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Mono.Data.Sql.mdp
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/DbProviderBase.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/MySqlDbProvider.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/NpgsqlDbProvider.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/OracleDbProvider.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/SqlDbProvider.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/SqliteDbProvider.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/AbstractSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/AggregateSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/CheckConstraintSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ColumnSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ConstraintSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/DataTypeSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ForeignKeyConstraintSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/GroupSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ISchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/IndexConstraintSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/LanguageSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/OperatorSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ParameterSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/PrimaryKeyConstraintSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/PrivilegeSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ProcedureSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/RoleSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/RuleSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/SchemaSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/SequenceSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/TableSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/TriggerSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/UniqueConstraintSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/UserSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ViewSchema.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/AssemblyInfo.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Commands/
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Commands/Commands.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/ConnectionDialog.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DataGridView.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DatabasePad.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DbProviderCollection.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/FakeNodes.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/AggregatesNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ColumnNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ColumnsNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ConstraintNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ConstraintsNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/DatabaseNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/GroupsNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/LanguagesNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/OperatorsNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ParametersNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProcedureNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProceduresNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProviderCollectionNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/RolesNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/RulesNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/SequencesNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TableNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TablesNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TriggersNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TypesNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/UsersNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ViewNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ViewsNodeBuilder.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/SqlDefinitionPad.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile.am
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile.in
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.addin.xml
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.mdp
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.mds
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQueryService.cs
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/monoquery.glade
trunk/MonoDevelop/Extras/MonoQuery/tests/
trunk/MonoDevelop/Extras/MonoQuery/tests/CreateProviderTests.cs
trunk/MonoDevelop/Extras/MonoQuery/tests/Mono.Data.Sql.Tests.mdp
trunk/MonoDevelop/Extras/MonoQuery/tests/NpgsqlTablesTest.cs
trunk/MonoDevelop/Extras/MonoQuery/tests/pgsql.sql
trunk/MonoDevelop/build/data/resources/icons/MonoQuery.Column
trunk/MonoDevelop/build/data/resources/icons/MonoQuery.ColumnFK
trunk/MonoDevelop/build/data/resources/icons/MonoQuery.ColumnPK
trunk/MonoDevelop/build/data/resources/icons/MonoQuery.DateTime
trunk/MonoDevelop/build/data/resources/icons/MonoQuery.User
Removed:
trunk/MonoDevelop/Extras/MonoQuery/AssemblyInfo.cs
trunk/MonoDevelop/Extras/MonoQuery/Codons/
trunk/MonoDevelop/Extras/MonoQuery/Collection/
trunk/MonoDevelop/Extras/MonoQuery/Commands/
trunk/MonoDevelop/Extras/MonoQuery/Connection/
trunk/MonoDevelop/Extras/MonoQuery/Exceptions/
trunk/MonoDevelop/Extras/MonoQuery/Gui/
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.addin.xml.in
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.cmbx
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.mdsx
trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.prjx
trunk/MonoDevelop/Extras/MonoQuery/MonoQueryView.cs
trunk/MonoDevelop/Extras/MonoQuery/SchemaClass/
trunk/MonoDevelop/Extras/MonoQuery/Services/
Modified:
trunk/MonoDevelop/ChangeLog
trunk/MonoDevelop/Extras/MonoQuery/
trunk/MonoDevelop/Extras/MonoQuery/ChangeLog
trunk/MonoDevelop/Extras/MonoQuery/Makefile.am
trunk/MonoDevelop/build/data/resources/icons/Makefile.am
trunk/MonoDevelop/build/data/resources/icons/MonoQuery.Database
trunk/MonoDevelop/build/data/resources/icons/MonoQuery.Table
trunk/MonoDevelop/build/data/resources/icons/MonoQuery.Tables
trunk/MonoDevelop/configure.in
trunk/MonoDevelop/po/POTFILES.in
Log:
Large commit. See ChangeLog and Extras/MonoQuery/ChangeLog
Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/ChangeLog 2005-08-02 20:35:00 UTC (rev 2701)
@@ -1,3 +1,8 @@
+2005-08-02 Chrstian Hergert <christian.hergert at gmail.com>
+
+ * configure.in: Remove monoquery autoconf options. We no longer need them.
+ * build/data/resources/icons: Added some icons donated from MySQL.
+
2005-07-21 Peter Johanson <latexer at gentoo.org>
* configure.in: Bump boo dep as needed by recent completion changes.
Property changes on: trunk/MonoDevelop/Extras/MonoQuery
___________________________________________________________________
Name: svn:ignore
- Makefile
Makefile.in
MonoQuery.dll
MonoQuery.addin.xml
+ Makefile
Makefile.in
bin
Deleted: trunk/MonoDevelop/Extras/MonoQuery/AssemblyInfo.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/AssemblyInfo.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/AssemblyInfo.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -1,49 +0,0 @@
-// MonoQuery.MonoQuery.dll - Addin for #Develop for database design
-// Copyright (C) 2003 Denis ERCHOFF
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following
-// attributes.
-//
-// change them to the information which is associated with the assembly
-// you compile.
-
-[assembly: AssemblyTitle("MonoQuery")]
-[assembly: AssemblyDescription("Database addin for MonoDevelop")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("#Develop, MonoDevelop")]
-[assembly: AssemblyProduct("Mono Query")]
-[assembly: AssemblyCopyright("Copyright (C) 2003 Denis ERCHOFF, 2004 Christian Hergert")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has following format :
-//
-// Major.Minor.Build.Revision
-//
-// You can specify all values by your own or you can build default build and revision
-// numbers with the '*' character (the default):
-
-[assembly: AssemblyVersion("0.4.0.*")]
-
-// The following attributes specify the key for the sign of your assembly. See the
-// .NET Framework documentation for more information about signing.
-// This is not required, if you don't want signing let these attributes like they're.
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
Modified: trunk/MonoDevelop/Extras/MonoQuery/ChangeLog
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/ChangeLog 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/ChangeLog 2005-08-02 20:35:00 UTC (rev 2701)
@@ -1,3 +1,102 @@
+2005-08-02 Christian Hergert <christian.hergert at gmail.com>
+
+ * MonoQuery.prjx: deleted
+ * MonoQuery.addin.xml.in: removed
+ * Exceptions: removed
+ * Services: removed
+ * Gui: removed
+ * Codons: removed
+ * SchemaClass: removed
+ * MonoQuery.cmbx: removed
+ * Collection: removed
+ * MonoQueryView.cs: removed
+ * MonoQuery/AssemblyInfo.cs: part of monoquery2
+ * MonoQuery/MonoQuery.mds:
+ * MonoQuery/Commands:
+ * MonoQuery/Commands/Commands.cs:
+ * MonoQuery/Makefile.in:
+ * MonoQuery/MonoQueryService.cs:
+ * MonoQuery/Gui/NodeBuilders/UsersNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/ParametersNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/DatabaseNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/TypesNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/LanguagesNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/ProviderCollectionNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/ConstraintsNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/AggregatesNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/TablesNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/ViewNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/ProceduresNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/OperatorsNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/GroupsNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/ColumnsNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/RolesNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/ConstraintNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/TriggersNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/TableNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/ProcedureNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/RulesNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/SequencesNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/ColumnNodeBuilder.cs:
+ * MonoQuery/Gui/NodeBuilders/ViewsNodeBuilder.cs:
+ * MonoQuery/Gui/DbProviderCollection.cs:
+ * MonoQuery/Gui/SqlDefinitionPad.cs:
+ * MonoQuery/Gui/ConnectionDialog.cs:
+ * MonoQuery/Gui/FakeNodes.cs:
+ * MonoQuery/Gui/DatabasePad.cs:
+ * MonoQuery/Gui/DataGridView.cs:
+ * MonoQuery/monoquery.glade:
+ * MonoQuery/Makefile.am:
+ * MonoQuery/MonoQuery.addin.xml:
+ * MonoQuery/Makefile:
+ * MonoQuery/MonoQuery.mdp:
+ * AssemblyInfo.cs: removed
+ * Mono.Data.Sql.mds: removed
+ * Commands: removed
+ * tests/NpgsqlTablesTest.cs: start of tests for monoquery2. these dont
+ really do anything at the moment
+ * tests/pgsql.sql
+ * tests/CreateProviderTests.cs
+ * tests/Mono.Data.Sql.Tests.mdp
+ * MonoQuery.mdsx: removed
+ * Makefile.am: updated
+ * Mono.Data.Sql/AssemblyInfo.cs: core to monoquery2
+ * Mono.Data.Sql/Schema:
+ * Mono.Data.Sql/Schema/OperatorSchema.cs:
+ * Mono.Data.Sql/Schema/GroupSchema.cs:
+ * Mono.Data.Sql/Schema/ColumnSchema.cs:
+ * Mono.Data.Sql/Schema/SchemaSchema.cs:
+ * Mono.Data.Sql/Schema/RoleSchema.cs:
+ * Mono.Data.Sql/Schema/PrimaryKeyConstraintSchema.cs:
+ * Mono.Data.Sql/Schema/AbstractSchema.cs:
+ * Mono.Data.Sql/Schema/TriggerSchema.cs:
+ * Mono.Data.Sql/Schema/RuleSchema.cs:
+ * Mono.Data.Sql/Schema/ForeignKeyConstraintSchema.cs:
+ * Mono.Data.Sql/Schema/SequenceSchema.cs:
+ * Mono.Data.Sql/Schema/ViewSchema.cs:
+ * Mono.Data.Sql/Schema/UniqueConstraintSchema.cs:
+ * Mono.Data.Sql/Schema/DataTypeSchema.cs:
+ * Mono.Data.Sql/Schema/IndexConstraintSchema.cs:
+ * Mono.Data.Sql/Schema/UserSchema.cs:
+ * Mono.Data.Sql/Schema/ParameterSchema.cs:
+ * Mono.Data.Sql/Schema/CheckConstraintSchema.cs:
+ * Mono.Data.Sql/Schema/LanguageSchema.cs:
+ * Mono.Data.Sql/Schema/ConstraintSchema.cs:
+ * Mono.Data.Sql/Schema/PrivilegeSchema.cs:
+ * Mono.Data.Sql/Schema/AggregateSchema.cs:
+ * Mono.Data.Sql/Schema/TableSchema.cs:
+ * Mono.Data.Sql/Schema/ISchema.cs:
+ * Mono.Data.Sql/Schema/ProcedureSchema.cs:
+ * Mono.Data.Sql/Makefile.am:
+ * Mono.Data.Sql/Providers:
+ * Mono.Data.Sql/Providers/DbProviderBase.cs:
+ * Mono.Data.Sql/Providers/SqlDbProvider.cs:
+ * Mono.Data.Sql/Providers/SqliteDbProvider.cs:
+ * Mono.Data.Sql/Providers/NpgsqlDbProvider.cs:
+ * Mono.Data.Sql/Providers/MySqlDbProvider.cs:
+ * Mono.Data.Sql/Providers/OracleDbProvider.cs:
+ * Mono.Data.Sql/Mono.Data.Sql.mdp:
+
2005-07-13 Lluis Sanchez Gual <lluis at novell.com>
* MonoQueryView.cs:
Modified: trunk/MonoDevelop/Extras/MonoQuery/Makefile.am
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Makefile.am 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Makefile.am 2005-08-02 20:35:00 UTC (rev 2701)
@@ -1,80 +1,3 @@
-FILES = \
-AssemblyInfo.cs \
-Codons/MonoQueryConnectionCodon.cs \
-Collection/MonoQuerySchemaClassCollection.cs \
-Collection/MonoQueryStringDictionary.cs \
-Collection/MonoQueryListDictionary.cs \
-Collection/MonoQueryParameterCollection.cs \
-Collection/ConnectionProviderDescriptor.cs \
-Commands/Abstract/AbstractMonoQueryCommand.cs \
-Commands/MonoQueryCommands.cs \
-Connection/Abstract/AbstractMonoQueryConnectionWrapper.cs \
-Connection/Interface/IConnection.cs \
-Connection/Npgsql/NpgsqlConnectionWrapper.cs \
-Connection/Mysql/MysqlConnectionWrapper.cs \
-Exceptions/Abstract/MonoQueryAbstractException.cs \
-Exceptions/ConnectionStringException.cs \
-Exceptions/ExecuteProcedureException.cs \
-Exceptions/ExecuteSQLException.cs \
-Exceptions/OpenConnectionException.cs \
-SchemaClass/Abstract/AbstractMonoQuerySchemaClass.cs \
-SchemaClass/Interface/ISchemaClass.cs \
-SchemaClass/MonoQuerySchemaClass.cs \
-MonoQueryView.cs \
-Gui/Abstract/AbstractMonoQueryNode.cs \
-Gui/DataView/SQLParameterInput.cs \
-Gui/DataView/MonoQueryDataView.cs \
-Gui/Interface/IMonoQueryNode.cs \
-Gui/MonoQueryTree/MonoQueryNodesRoot.cs \
-Gui/MonoQueryTree/MonoQueryTree.cs \
-Gui/MonoQueryTree/MonoQueryDataNodes.cs \
-Gui/MonoQueryPanel.cs \
-Gui/Forms/CreateConnectionDruid.cs \
-Gui/SqlQueryView/SqlQueryView.cs \
-Services/MonoQueryService.cs
-if ENABLE_MONOQUERY_SQLITE
-SQLITE_FILES=Connection/Sqlite/SqliteConnectionWrapper.cs
-else
-SQLITE_FILES=
-endif
-
-
-build_sources = $(addprefix $(srcdir)/, $(FILES)) \
- $(addprefix $(srcdir)/, $(SQLITE_FILES))
-
-REFS = /r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
- /r:$(top_builddir)/build/bin/MonoDevelop.Base.dll \
- /r:$(top_builddir)/build/bin/MonoDevelop.Gui.Widgets.dll \
- /r:Npgsql.dll \
- /r:System.Data.dll \
- /r:ByteFX.Data.dll \
- /r:Mono.Data.SqliteClient \
- $(GTK_SHARP_LIBS) \
- $(GLADE_SHARP_LIBS) \
- $(GCONF_SHARP_LIBS) \
- $(GTKSOURCEVIEW_SHARP_LIBS)
-
-ADDIN = MonoQuery.addin.xml
-
-ADDIN_BUILD = $(top_builddir)/build/AddIns/MonoQuery
-
-DLL = $(ADDIN_BUILD)/MonoQuery.dll
-
-all: $(ADDIN_BUILD)/$(ADDIN) $(DLL)
-
-$(ADDIN_BUILD)/$(ADDIN): $(srcdir)/$(ADDIN)
- mkdir -p $(ADDIN_BUILD)
- cp $(srcdir)/$(ADDIN) $(ADDIN_BUILD)/$(ADDIN)
-
-$(DLL): $(build_sources) $(srcdir)/$(GLADEFILE)
- mkdir -p $(ADDIN_BUILD)
- $(CSC) $(CSC_FLAGS) -target:library -out:$@ $(build_sources) $(REFS)
-
-CLEANFILES = $(DLL) $(DLL).mdb $(ADDIN_BUILD)/$(ADDIN)
-
-EXTRA_DIST = $(FILES) $(ADDIN) $(SQLITE_FILES)
-
-monoquerydir = $(MD_ADDIN_DIR)/MonoQuery
-monoquery_DATA = $(DLL) $(ADDIN_BUILD)/$(ADDIN)
-
+SUBDIRS = Mono.Data.Sql MonoQuery
+#SUBDIRS = Mono.Data.Sql MonoQuery tests
Property changes on: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql
___________________________________________________________________
Name: svn:ignore
+ Makefile
Makefile.in
*.pidb
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/AssemblyInfo.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/AssemblyInfo.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/AssemblyInfo.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,62 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified, the assembly is not signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine. KeyFile refers to a file which contains
+// a key.
+// (*) If the KeyFile and the KeyName values are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP, that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the KeyFile is installed into the CSP and used.
+// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+// When specifying the KeyFile, the location of the KeyFile should be
+// relative to the "project output directory". The location of the project output
+// directory is dependent on whether you are working with a local or web project.
+// For local projects, the project output directory is defined as
+// <Project Directory>\obj\<Configuration>. For example, if your KeyFile is
+// located in the project directory, you would specify the AssemblyKeyFile
+// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+// For web projects, the project output directory is defined as
+// %HOMEPATH%\VSWebCache\<Machine Name>\<Project Directory>\obj\<Configuration>.
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Makefile.am
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Makefile.am 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Makefile.am 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,59 @@
+FILES = \
+Schema/IndexConstraintSchema.cs \
+Schema/OperatorSchema.cs \
+Schema/GroupSchema.cs \
+Schema/ColumnSchema.cs \
+Schema/SchemaSchema.cs \
+Schema/RoleSchema.cs \
+Schema/ISchema.cs \
+Schema/PrimaryKeyConstraintSchema.cs \
+Schema/AbstractSchema.cs \
+Schema/TriggerSchema.cs \
+Schema/RuleSchema.cs \
+Schema/ForeignKeyConstraintSchema.cs \
+Schema/SequenceSchema.cs \
+Schema/ViewSchema.cs \
+Schema/DataTypeSchema.cs \
+Schema/UniqueConstraintSchema.cs \
+Schema/UserSchema.cs \
+Schema/ParameterSchema.cs \
+Schema/CheckConstraintSchema.cs \
+Schema/LanguageSchema.cs \
+Schema/ConstraintSchema.cs \
+Schema/PrivilegeSchema.cs \
+Schema/AggregateSchema.cs \
+Schema/TableSchema.cs \
+Schema/ProcedureSchema.cs \
+Providers/MySqlDbProvider.cs \
+Providers/DbProviderBase.cs \
+Providers/NpgsqlDbProvider.cs \
+Providers/SqliteDbProvider.cs \
+Providers/OracleDbProvider.cs \
+Providers/SqlDbProvider.cs \
+AssemblyInfo.cs
+
+build_sources = $(addprefix $(srcdir)/, $(FILES))
+
+REFS = \
+-r:System.Data \
+-r:Npgsql \
+-r:ByteFX.Data \
+-r:Mono.Data.SqliteClient \
+-r:System.Data.OracleClient
+
+ADDIN_BUILD = $(top_builddir)/build/AddIns/MonoQuery
+
+DLL = $(ADDIN_BUILD)/Mono.Data.Sql.dll
+
+all: $(DLL)
+
+$(DLL):
+ mkdir -p $(ADDIN_BUILD)
+ $(CSC) $(SCS_FLAGS) -target:library -out:$@ $(build_sources) $(REFS)
+
+CLEANFILES = $(DLL) $(DLL).mdb
+
+EXTRA_DIST = $(FILES)
+
+monoquerydir = $(MD_ADDIN_DIR)/MonoQuery
+monoquery_DATA = $(DLL)
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Mono.Data.Sql.mdp
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Mono.Data.Sql.mdp 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Mono.Data.Sql.mdp 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,60 @@
+<Project name="Mono.Data.Sql" fileversion="2.0" language="C#" ctype="DotNetProject">
+ <Configurations active="Debug">
+ <Configuration name="Debug" ctype="DotNetProjectConfiguration">
+ <Output directory="../bin/Debug" assembly="Mono.Data.Sql" />
+ <Build debugmode="True" target="Library" />
+ <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" />
+ <CodeGeneration compiler="Csc" warninglevel="1" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="True" ctype="CSharpCompilerParameters" />
+ </Configuration>
+ <Configuration name="Release" ctype="DotNetProjectConfiguration">
+ <Output directory="../bin/Release" assembly="Mono.Data.Sql" />
+ <Build debugmode="True" target="Library" />
+ <Execution runwithwarnings="False" consolepause="True" runtime="MsNet" />
+ <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="True" ctype="CSharpCompilerParameters" />
+ </Configuration>
+ </Configurations>
+ <References>
+ <ProjectReference type="Gac" localcopy="True" refto="Npgsql, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
+ <ProjectReference type="Gac" localcopy="True" refto="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Gac" localcopy="True" refto="ByteFX.Data, Version=0.7.6.1, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
+ <ProjectReference type="Gac" localcopy="True" refto="Mono.Data.SqliteClient, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
+ <ProjectReference type="Gac" localcopy="True" refto="System.Data.OracleClient, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ </References>
+ <DeploymentInformation strategy="File">
+ <excludeFiles />
+ </DeploymentInformation>
+ <Contents>
+ <File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Providers/DbProviderBase.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Providers/NpgsqlDbProvider.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/AbstractSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/AggregateSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/CheckConstraintSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/ColumnSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/ConstraintSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/DataTypeSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/ForeignKeyConstraintSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/GroupSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/IndexConstraintSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/ISchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/LanguageSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/OperatorSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/ParameterSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/PrimaryKeyConstraintSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/PrivilegeSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/ProcedureSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/RoleSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/RuleSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/SchemaSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/SequenceSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/TableSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/TriggerSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/UniqueConstraintSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/UserSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Schema/ViewSchema.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Providers/MySqlDbProvider.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Providers/SqliteDbProvider.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Providers/OracleDbProvider.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Providers/SqlDbProvider.cs" subtype="Code" buildaction="Compile" />
+ </Contents>
+</Project>
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/DbProviderBase.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/DbProviderBase.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/DbProviderBase.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,347 @@
+//
+// DbProviderBase.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.Data;
+using System.Threading;
+
+namespace Mono.Data.Sql
+{
+ public delegate void DbProviderChangedEventHandler (object sender, DbProviderChangedArgs args);
+ public delegate void SQLCallback (object sender, object Results);
+
+ public class DbProviderChangedArgs : EventArgs
+ {
+ public DbProviderBase Provider = null;
+
+ public DbProviderChangedArgs (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ [Serializable]
+ public abstract class DbProviderBase
+ {
+ public event DbProviderChangedEventHandler NameChanged;
+ public event DbProviderChangedEventHandler StateChanged;
+ public event DbProviderChangedEventHandler Refreshed;
+
+ protected string name = String.Empty;
+
+ #region // Threading objects
+ Object ThreadSync = new Object ();
+ SQLCallback ThreadedSQLCallback;
+ TableSchema ThreadedTableSchema;
+ ViewSchema ThreadedViewSchema;
+ ProcedureSchema ThreadedProcedureSchema;
+ String ThreadedSQLText = String.Empty;
+ #endregion // End of Threading objects
+
+ public DbProviderBase ()
+ {
+ }
+
+ public virtual string ProviderName {
+ get {
+ return "Unknown Provider";
+ }
+ }
+
+ public virtual string Name {
+ get {
+ return name;
+ }
+ set {
+ name = value;
+ if (NameChanged != null)
+ NameChanged (this, new DbProviderChangedArgs (this));
+ }
+ }
+
+ public virtual IDbConnection Connection {
+ get {
+ return (IDbConnection) null;
+ }
+ }
+
+ public virtual string ConnectionString {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public virtual bool IsConnectionStringWrong {
+ get {
+ return true;
+ }
+ }
+
+ public virtual bool IsOpen {
+ get {
+ return false;
+ }
+ }
+
+ public virtual bool Open ()
+ {
+ return IsOpen;
+ }
+
+ public virtual void Close ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void Refresh ()
+ {
+ if (Refreshed != null)
+ Refreshed (this, new DbProviderChangedArgs (this));
+ }
+
+ public virtual bool SupportsSchemaType (Type type)
+ {
+ return false;
+ }
+
+ public virtual void ExecuteSQL (string SQLText, SQLCallback Callback)
+ {
+ lock (ThreadSync) {
+ ThreadedSQLCallback = Callback;
+ ThreadedSQLText = SQLText;
+ Thread eThread = new Thread (new ThreadStart (ExecuteSQLThreadStart));
+ eThread.Start ();
+ }
+ }
+
+ public virtual DataTable ExecuteSQL (string SQLText)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void GetTables (SQLCallback Callback)
+ {
+ Thread eThread = null;
+ lock (ThreadSync) {
+ ThreadedSQLCallback = Callback;
+ eThread = new Thread (new ThreadStart (GetTablesThreadStart));
+ eThread.Start ();
+ }
+ }
+
+ public virtual TableSchema[] GetTables ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void GetTableColumns (SQLCallback Callback, TableSchema schema)
+ {
+ Thread eThread = null;
+ lock (ThreadSync) {
+ ThreadedSQLCallback = Callback;
+ ThreadedTableSchema = schema;
+ eThread = new Thread (new ThreadStart (GetTableColumnsThreadStart));
+ eThread.Start ();
+ }
+ }
+
+ public virtual ColumnSchema[] GetTableColumns (TableSchema schema)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void GetTableConstraints (SQLCallback Callback, TableSchema schema)
+ {
+ Thread eThread = null;
+ lock (ThreadSync) {
+ ThreadedSQLCallback = Callback;
+ ThreadedTableSchema = schema;
+ eThread = new Thread (new ThreadStart (GetTableConstraintsThreadStart));
+ eThread.Start ();
+ }
+ }
+
+ public virtual ConstraintSchema[] GetTableConstraints (TableSchema schema)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void GetViews (SQLCallback Callback)
+ {
+ Thread eThread = null;
+ lock (ThreadSync) {
+ ThreadedSQLCallback = Callback;
+ eThread = new Thread (new ThreadStart (GetViewsThreadStart));
+ eThread.Start ();
+ }
+ }
+
+ public virtual ViewSchema[] GetViews ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void GetViewColumns (SQLCallback Callback, ViewSchema schema)
+ {
+ Thread eThread = null;
+ lock (ThreadSync) {
+ ThreadedSQLCallback = Callback;
+ ThreadedViewSchema = schema;
+ eThread = new Thread (new ThreadStart (GetViewColumnsThreadStart));
+ eThread.Start ();
+ }
+ }
+
+ public virtual ColumnSchema[] GetViewColumns (ViewSchema schema)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void GetProcedures (SQLCallback Callback)
+ {
+ Thread eThread = null;
+ lock (ThreadSync) {
+ ThreadedSQLCallback = Callback;
+ eThread = new Thread (new ThreadStart (GetProceduresThreadStart));
+ eThread.Start ();
+ }
+ }
+
+ public virtual ProcedureSchema[] GetProcedures ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void GetProcedureColumns (SQLCallback Callback, ProcedureSchema schema)
+ {
+ Thread eThread = null;
+ lock (ThreadSync) {
+ ThreadedSQLCallback = Callback;
+ ThreadedProcedureSchema = schema;
+ eThread = new Thread (new ThreadStart (
+ GetProcedureColumnsThreadStart));
+ eThread.Start ();
+ }
+ }
+
+ public virtual ColumnSchema[] GetProcedureColumns (ProcedureSchema schema)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void GetUsers (SQLCallback Callback)
+ {
+ Thread eThread = null;
+ lock (ThreadSync) {
+ ThreadedSQLCallback = Callback;
+ eThread = new Thread (new ThreadStart (GetUsersThreadStart));
+ eThread.Start ();
+ }
+ }
+
+ public virtual UserSchema[] GetUsers ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected virtual void OnOpen ()
+ {
+ if (StateChanged != null)
+ StateChanged (this, new DbProviderChangedArgs (this));
+ }
+
+ protected virtual void OnClose ()
+ {
+ if (StateChanged != null)
+ StateChanged (this, new DbProviderChangedArgs (this));
+ }
+
+ protected virtual void ExecuteSQLThreadStart ()
+ {
+ string SQLText = ThreadedSQLText;
+ SQLCallback Callback = ThreadedSQLCallback;
+ Callback (this, ExecuteSQL (SQLText));
+ }
+
+ protected virtual void GetTablesThreadStart ()
+ {
+ SQLCallback Callback = ThreadedSQLCallback;
+ Callback (this, GetTables ());
+ }
+
+ protected virtual void GetTableColumnsThreadStart ()
+ {
+ SQLCallback Callback = ThreadedSQLCallback;
+ TableSchema Table = ThreadedTableSchema;
+ Callback (this, GetTableColumns (Table));
+ }
+
+ protected virtual void GetTableConstraintsThreadStart ()
+ {
+ SQLCallback Callback = ThreadedSQLCallback;
+ TableSchema Table = ThreadedTableSchema;
+ Callback (this, GetTableConstraints (Table));
+ }
+
+ protected virtual void GetViewsThreadStart ()
+ {
+ SQLCallback Callback = ThreadedSQLCallback;
+ Callback (this, GetViews ());
+ }
+
+ protected virtual void GetViewColumnsThreadStart ()
+ {
+ SQLCallback Callback = ThreadedSQLCallback;
+ ViewSchema view = ThreadedViewSchema;
+ Callback (this, GetViewColumns (view));
+ }
+
+ protected virtual void GetProceduresThreadStart ()
+ {
+ SQLCallback Callback = ThreadedSQLCallback;
+ Callback (this, GetProcedures ());
+ }
+
+ protected virtual void GetProcedureColumnsThreadStart ()
+ {
+ SQLCallback Callback = ThreadedSQLCallback;
+ ProcedureSchema schema = ThreadedProcedureSchema;
+ Callback (this, GetProcedureColumns (schema));
+ }
+
+ protected virtual void GetUsersThreadStart ()
+ {
+ SQLCallback Callback = ThreadedSQLCallback;
+ Callback (this, GetUsers ());
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/MySqlDbProvider.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/MySqlDbProvider.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/MySqlDbProvider.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,277 @@
+//
+// Providers/MySqlDbProvider.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.Data;
+
+using ByteFX.Data.MySqlClient;
+
+namespace Mono.Data.Sql
+{
+ [Serializable]
+ public class MySqlDbProvider : DbProviderBase
+ {
+ protected MySqlConnection connection = null;
+ protected MySqlDataAdapter adapter = new MySqlDataAdapter ();
+ protected bool isConnectionStringWrong = false;
+
+ public override string ProviderName {
+ get {
+ return "MySQL Database (Incomplete)";
+ }
+ }
+
+ public override IDbConnection Connection {
+ get {
+ if (connection == null)
+ connection = new MySqlConnection ();
+
+ return (IDbConnection) connection;
+ }
+ }
+
+ public override string ConnectionString {
+ get {
+ return Connection.ConnectionString;
+ }
+ set {
+ if (IsOpen)
+ Close ();
+
+ Connection.ConnectionString = value;
+ isConnectionStringWrong = false;
+ }
+ }
+
+ public override bool IsOpen {
+ get {
+ return Connection.State == ConnectionState.Open;
+ }
+ }
+
+ public override bool IsConnectionStringWrong {
+ get {
+ return isConnectionStringWrong;
+ }
+ }
+
+ public override bool Open ()
+ {
+ try {
+ Connection.Open ();
+ OnOpen ();
+ } catch (Exception e) {
+ isConnectionStringWrong = true;
+ }
+
+ return IsOpen;
+ }
+
+ public override void Close ()
+ {
+ Connection.Close ();
+ OnClose ();
+ }
+
+ public override bool SupportsSchemaType(Type type)
+ {
+ // FIXME: Need to check what mysql actually supports.
+ if (type == typeof(TableSchema))
+ return true;
+ else if (type == typeof(ViewSchema))
+ return true;
+ else if (type == typeof(ProcedureSchema))
+ return true;
+ else if (type == typeof(AggregateSchema))
+ return true;
+ else if (type == typeof(GroupSchema))
+ return true;
+ else if (type == typeof(UserSchema))
+ return true;
+ else if (type == typeof(LanguageSchema))
+ return true;
+ else if (type == typeof(OperatorSchema))
+ return true;
+ else if (type == typeof(RoleSchema))
+ return true;
+ else if (type == typeof(SequenceSchema))
+ return true;
+ else if (type == typeof(DataTypeSchema))
+ return true;
+ else if (type == typeof(TriggerSchema))
+ return true;
+ else if (type == typeof(RuleSchema))
+ return true;
+ else
+ return false;
+ }
+
+ public override DataTable ExecuteSQL (string SQLText)
+ {
+ MySqlCommand command = new MySqlCommand ();
+ command.Connection = Connection;
+ command.CommandText = SQLText;
+
+ DataSet resultSet = null;
+
+ lock (adapter) {
+ adapter.SelectCommand = command;
+ adapter.Fill (resultSet);
+ }
+
+ return resultSet.Tables[0];
+ }
+
+ public override TableSchema[] GetTables ()
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ MySqlCommand command = new MySqlCommand ();
+ command.Connection = Connection;
+ command.CommandText =
+ "";
+ MySqlDataReader r = command.ExecuteReader ();
+
+ while (r.Read ()) {
+ TableSchema table = new TableSchema ();
+ table.Provider = this;
+
+ // TODO: Implement
+
+ collection.Add (table);
+ }
+
+ return (TableSchema[]) collection.ToArray (typeof (TableSchema));
+ }
+
+ public override ViewSchema[] GetViews ()
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ MySqlCommand command = new MySqlCommand ();
+ command.Connection = Connection;
+ command.CommandText =
+ "";
+ MySqlDataReader r = command.ExecuteReader ();
+
+ while (r.Read ()) {
+ ViewSchema view = new ViewSchema ();
+ view.Provider = this;
+
+ // TODO: Implement
+
+ collection.Add (view);
+ }
+
+ return (ViewSchema[]) collection.ToArray (typeof (ViewSchema));
+ }
+
+ public override ColumnSchema[] GetTableColumns (TableSchema table)
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ MySqlCommand command = new MySqlCommand ();
+ command.Connection = Connection;
+ command.CommandText =
+ "";
+ MySqlDataReader r = command.ExecuteReader ();
+
+ while (r.Read ()) {
+ ColumnSchema column = new ColumnSchema ();
+ column.Provider = this;
+
+ // TODO: Implement
+
+ collection.Add (column);
+ }
+
+ return (ColumnSchema[]) collection.ToArray (typeof (ColumnSchema));
+ }
+
+ public override ColumnSchema[] GetViewColumns (ViewSchema table)
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ MySqlCommand command = new MySqlCommand ();
+ command.Connection = Connection;
+ command.CommandText =
+ "";
+ MySqlDataReader r = command.ExecuteReader ();
+
+ while (r.Read ()) {
+ ColumnSchema column = new ColumnSchema ();
+ column.Provider = this;
+
+ // TODO: Implement
+
+ collection.Add (column);
+ }
+
+ return (ColumnSchema[]) collection.ToArray (typeof (ColumnSchema));
+ }
+
+ public override ConstraintSchema[] GetTableConstraints (TableSchema table)
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ MySqlCommand command = new MySqlCommand ();
+ command.Connection = Connection;
+ command.CommandText =
+ "";
+ MySqlDataReader r = command.ExecuteReader ();
+
+ while (r.Read ()) {
+ ConstraintSchema constraint = new ConstraintSchema ();
+ constraint.Provider = this;
+
+ // TODO: Implement
+
+ collection.Add (constraint);
+ }
+
+ return (ConstraintSchema[]) collection.ToArray (
+ typeof (ConstraintSchema));
+ }
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/NpgsqlDbProvider.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/NpgsqlDbProvider.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/NpgsqlDbProvider.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,595 @@
+//
+// Provider/NpgsqlDbProvider.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.Data;
+using System.Text;
+using System.Text.RegularExpressions;
+
+using Npgsql;
+
+namespace Mono.Data.Sql
+{
+ /// <summary>
+ /// Mono.Data.Sql provider for PostgreSQL databases.
+ /// </summary>
+ [Serializable]
+ public class NpgsqlDbProvider : DbProviderBase
+ {
+ protected NpgsqlConnection connection = null;
+ protected NpgsqlDataAdapter adapter = new NpgsqlDataAdapter();
+ protected bool isConnectionStringWrong = false;
+
+ /// <summary>
+ /// Default Constructor
+ /// </summary>
+ public NpgsqlDbProvider () : base ()
+ {
+ }
+
+ public override string ProviderName {
+ get {
+ return "PostgreSQL Database";
+ }
+ }
+
+ /// <summary>
+ /// Constructor with ADO.NET Npgsql connection.
+ /// </summary>
+ public NpgsqlDbProvider (NpgsqlConnection conn)
+ {
+ connection = conn;
+ }
+
+ /// <summary>
+ /// ADO.NET Connection
+ /// </summary>
+ public override IDbConnection Connection {
+ get {
+ if (connection == null)
+ connection = new NpgsqlConnection();
+
+ return (IDbConnection) connection;
+ }
+ }
+
+ /// <summary>
+ /// Connection String
+ /// </summary>
+ public override string ConnectionString {
+ get {
+ return Connection.ConnectionString;
+ }
+ set {
+ if (IsOpen == true)
+ Close();
+
+ Connection.ConnectionString = value;
+ isConnectionStringWrong = false;
+ }
+ }
+
+ /// <summary>
+ /// Is the connection open
+ /// </summary>
+ public override bool IsOpen {
+ get {
+ return Connection.State == ConnectionState.Open;
+ }
+ }
+
+ /// <summary>
+ /// Is the last used connection string wrong
+ /// </summary>
+ public override bool IsConnectionStringWrong {
+ get {
+ return isConnectionStringWrong;
+ }
+ }
+
+ /// <summary>
+ /// Last system OID used in postgres to monitor system vs user
+ /// objects. This varies based on the connections Server Version.
+ /// </summary>
+ protected int LastSystemOID {
+ get {
+ int major = connection.ServerVersion.Major;
+ int minor = connection.ServerVersion.Minor;
+
+ if (major == 8)
+ return 17137;
+ else if (major == 7 && minor == 1)
+ return 18539;
+ else if (major == 7 && minor == 2)
+ return 16554;
+ else if (major == 7 && minor == 3)
+ return 16974;
+ else if (major == 7 && minor == 4)
+ return 17137;
+ else
+ return 17137;
+ }
+ }
+
+ /// <summary>
+ /// Open the connection. Returns true on success.
+ /// </summary>
+ public override bool Open()
+ {
+ try {
+ Connection.Open();
+ } catch {
+ isConnectionStringWrong = true;
+ }
+ OnOpen ();
+ return IsOpen;
+ }
+
+ /// <summary>
+ /// Close the database connection.
+ /// </summary>
+ public override void Close()
+ {
+ Connection.Close();
+ OnClose();
+ }
+
+ /// <summary>
+ /// Do we support the passed schema type
+ /// </summary>
+ public override bool SupportsSchemaType(Type type)
+ {
+ if (type == typeof(TableSchema))
+ return true;
+ else if (type == typeof(ViewSchema))
+ return true;
+ else if (type == typeof(ProcedureSchema))
+ return true;
+ else if (type == typeof(AggregateSchema))
+ return true;
+ else if (type == typeof(GroupSchema))
+ return true;
+ else if (type == typeof(UserSchema))
+ return true;
+ else if (type == typeof(LanguageSchema))
+ return true;
+ else if (type == typeof(OperatorSchema))
+ return true;
+ else if (type == typeof(RoleSchema))
+ return true;
+ else if (type == typeof(SequenceSchema))
+ return true;
+ else if (type == typeof(DataTypeSchema))
+ return true;
+ else if (type == typeof(TriggerSchema))
+ return true;
+ else if (type == typeof(RuleSchema))
+ return true;
+ else
+ return false;
+ }
+
+ /// <summary>
+ /// Thread safe SQL execution.
+ /// </summary>
+ public override DataTable ExecuteSQL(string SQLText)
+ {
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = connection;
+ command.CommandText = SQLText;
+
+ DataSet resultSet = new DataSet ();
+
+ lock(adapter) {
+ adapter.SelectCommand = command;
+ adapter.Fill(resultSet);
+ }
+
+ return resultSet.Tables[0];
+ }
+
+ /// <summary>
+ /// Get a list of tables in the system.
+ /// </summary>
+ public override TableSchema[] GetTables()
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = connection;
+ command.CommandText =
+ "SELECT c.relname, n.nspname, u.usename, d.description "
+ + "FROM pg_class c "
+ + " LEFT JOIN pg_description d ON c.oid = d.objoid, "
+ + "pg_namespace n, pg_user u "
+ + "WHERE c.relnamespace = n.oid "
+ + "AND c.relowner = u.usesysid "
+ + "AND c.relkind='r' AND NOT EXISTS "
+ + " (SELECT 1 FROM pg_rewrite r "
+ + " WHERE r.ev_class = c.oid AND r.ev_type = '1') "
+ + "ORDER BY relname;";
+ NpgsqlDataReader r = command.ExecuteReader();
+
+ while (r.Read()) {
+ TableSchema table = new TableSchema();
+ table.Provider = this;
+ table.Name = r.GetString(0);
+
+ if (table.Name.Substring(0, 3) == "pg_" ||
+ table.Name.Substring(0, 4) == "sql_")
+ {
+ table.IsSystemTable = true;
+ }
+
+ try { table.SchemaName = r.GetString(1); } catch {}
+ try { table.OwnerName = r.GetString(2); } catch {}
+ try { table.Comment = r.GetString(3); } catch {}
+
+ StringBuilder sb = new StringBuilder();
+ sb.AppendFormat ("-- Table: {0}\n", table.Name);
+ sb.AppendFormat ("-- DROP TABLE {0};\n\n", table.Name);
+ sb.AppendFormat ("CREATE TABLE {0} (\n", table.Name);
+
+ ColumnSchema[] columns = table.Columns;
+ string[] parts = new string[columns.Length];
+ for (int i = 0; i < parts.Length; i++) {
+ parts[i] = "\t" + columns[i].Definition;
+ }
+ sb.Append (String.Join (",\n", parts));
+
+ ConstraintSchema[] cons = table.Constraints;
+ parts = new string[cons.Length];
+ if (cons.Length > 0)
+ sb.Append (",\n");
+ for (int i = 0; i < parts.Length; i++) {
+ parts[i] = "\t" + cons[i].Definition;
+ }
+ sb.Append (String.Join (",\n", parts));
+
+ sb.Append ("\n);\n");
+ sb.AppendFormat ("COMMENT ON TABLE {0} IS '{1}';", table.Name, table.Comment);
+ table.Definition = sb.ToString();
+ collection.Add (table);
+ }
+
+ return (TableSchema[]) collection.ToArray (typeof (TableSchema));
+ }
+
+ /// <summary>
+ /// Get columns for a table.
+ /// </summary>
+ public override ColumnSchema[] GetTableColumns(TableSchema table)
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList();
+
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = connection;
+ command.CommandText = "SELECT a.attname, a.attnotnull, a.attlen, "
+ + "typ.typname, adef.adsrc "
+ + "FROM "
+ + " pg_catalog.pg_attribute a LEFT JOIN "
+ + " pg_catalog.pg_attrdef adef "
+ + " ON a.attrelid=adef.adrelid "
+ + " AND a.attnum=adef.adnum "
+ + " LEFT JOIN pg_catalog.pg_type t ON a.atttypid=t.oid, "
+ + " pg_catalog.pg_type typ "
+ + "WHERE "
+ + " a.attrelid = (SELECT oid FROM pg_catalog.pg_class "
+ + " WHERE relname='" + table.Name + "') "
+ + "AND a.attnum > 0 AND NOT a.attisdropped "
+ + "AND a.atttypid = typ.oid "
+ + "ORDER BY a.attnum;";
+ NpgsqlDataReader r = command.ExecuteReader();
+
+ while (r.Read()) {
+ ColumnSchema column = new ColumnSchema();
+
+ try { column.Name = r.GetString(0); } catch {}
+ column.Provider = this;
+ try { column.DataTypeName = r.GetString(3); } catch {}
+ try { column.Default = r.GetString(4); } catch {}
+ column.Comment = "";
+ column.OwnerName = "";
+ column.SchemaName = table.SchemaName;
+ try { column.NotNull = r.GetBoolean(1); } catch {}
+ try { column.Length = r.GetInt32(2); } catch {}
+
+ StringBuilder sb = new StringBuilder();
+ sb.AppendFormat("{0} {1}{2}",
+ column.Name,
+ column.DataTypeName,
+ (column.Length > 0) ? ("(" + column.Length + ")") : "");
+ sb.AppendFormat(" {0}", column.NotNull ? "NOT NULL" : "NULL");
+ if (column.Default.Length > 0)
+ sb.AppendFormat(" DEFAULT {0}", column.Default);
+ column.Definition = sb.ToString();
+
+ collection.Add(column);
+ }
+
+ return (ColumnSchema[]) collection.ToArray(typeof(ColumnSchema));
+ }
+
+ /// <summary>
+ /// Get a collection of views from the system.
+ /// </summary>
+ public override ViewSchema[] GetViews()
+ {
+ ArrayList collection = new ArrayList();
+
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = connection;
+ command.CommandText =
+ "SELECT v.schemaname, v.viewname, v.viewowner, v.definition,"
+ + " (c.oid <= " + LastSystemOID + "), "
+ + "(SELECT description from pg_description pd, "
+ + " pg_class pc WHERE pc.oid=pd.objoid AND pc.relname="
+ + " v.viewname) "
+ + "FROM pg_views v, pg_class c "
+ + "WHERE v.viewname = c.relname "
+ + "ORDER BY viewname";
+ NpgsqlDataReader r = command.ExecuteReader();
+
+ while (r.Read()) {
+ ViewSchema view = new ViewSchema();
+ view.Provider = this;
+
+ try {
+ view.Name = r.GetString(1);
+ view.SchemaName = r.GetString(0);
+ view.OwnerName = r.GetString(2);
+
+ StringBuilder sb = new StringBuilder();
+ sb.AppendFormat ("-- View: {0}\n", view.Name);
+ sb.AppendFormat ("-- DROP VIEW {0};\n\n", view.Name);
+ sb.AppendFormat ("CREATE VIEW {0} AS (\n", view.Name);
+ string core = r.GetString(3);
+ sb.AppendFormat (" {0}\n);", core.Substring (0, core.Length-1));
+ view.Definition = sb.ToString ();
+
+ view.IsSystemView = (r.GetBoolean(4));
+ view.Comment = r.GetString(5);
+ } catch (Exception e) {
+ }
+
+
+
+ collection.Add(view);
+ }
+
+ return (ViewSchema[]) collection.ToArray (typeof (ViewSchema));
+ }
+
+ /// <summary>
+ /// Get a collection of columns within a view
+ /// </summary>
+ public override ColumnSchema[] GetViewColumns(ViewSchema view)
+ {
+ if (IsOpen == false && Open() == false)
+ throw new Exception ("No connection to database");
+
+ ArrayList collection = new ArrayList();
+
+ NpgsqlCommand command = new NpgsqlCommand ();
+ command.Connection = connection;
+ command.CommandText =
+ "SELECT attname, typname, attlen, attnotnull "
+ + "FROM "
+ + " pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_attrdef adef "
+ + " ON a.attrelid=adef.adrelid "
+ + " AND a.attnum=adef.adnum "
+ + " LEFT JOIN pg_catalog.pg_type t ON a.atttypid=t.oid "
+ + "WHERE "
+ + " a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='"
+ + view.Name + "') "
+ + " AND a.attnum > 0 AND NOT a.attisdropped "
+ + " ORDER BY a.attnum;";
+ NpgsqlDataReader r = command.ExecuteReader();
+
+ while (r.Read()) {
+ ColumnSchema column = new ColumnSchema();
+
+ try {
+ column.Name = r.GetString(0);
+ column.Provider = this;
+ column.DataTypeName = r.GetString(1);
+ column.Default = "";
+ column.SchemaName = view.SchemaName;
+ column.Definition = "";
+ column.NotNull = r.GetBoolean(3);
+ column.Length = r.GetInt32(2);
+ } catch {
+ } finally {
+ collection.Add(column);
+ }
+ }
+
+ return (ColumnSchema[]) collection.ToArray (typeof(ColumnSchema));
+ }
+
+ /// <summary>
+ /// Get a collection of constraints within a a table.
+ /// </summary>
+ public override ConstraintSchema[] GetTableConstraints (TableSchema table)
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ NpgsqlCommand command = new NpgsqlCommand ();
+ command.Connection = connection;
+ command.CommandText = String.Format (
+ "SELECT "
+ + "pc.conname, "
+ + "pg_catalog.pg_get_constraintdef(pc.oid, true) AS consrc, "
+ + "pc.contype, "
+ + "CASE WHEN pc.contype='u' OR pc.contype='p' THEN ( "
+ + " SELECT "
+ + " indisclustered "
+ + " FROM "
+ + " pg_catalog.pg_depend pd, "
+ + " pg_catalog.pg_class pl, "
+ + " pg_catalog.pg_index pi "
+ + " WHERE "
+ + " pd.refclassid=pc.tableoid "
+ + " AND pd.refobjid=pc.oid "
+ + " AND pd.objid=pl.oid "
+ + " AND pl.oid=pi.indexrelid "
+ + ") ELSE "
+ + " NULL "
+ + "END AS indisclustered "
+ + "FROM "
+ + "pg_catalog.pg_constraint pc "
+ + "WHERE "
+ + "pc.conrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{0}' "
+ + " AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace "
+ + " WHERE nspname='{1}')) "
+ + "ORDER BY "
+ + "1;", table.Name, table.SchemaName);
+ NpgsqlDataReader r = command.ExecuteReader ();
+
+ while (r.Read ()) {
+ ConstraintSchema constraint = null;
+ switch (r.GetString(2)) {
+ case "p":
+ default:
+ constraint = new PrimaryKeyConstraintSchema();
+ break;
+ }
+
+ constraint.Name = r.GetString (0);
+ constraint.Definition = r.GetString (1);
+
+ collection.Add (constraint);
+ }
+
+ return (ConstraintSchema[]) collection.ToArray (typeof(ConstraintSchema));
+ }
+
+ public override UserSchema[] GetUsers ()
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ // TODO: Implement
+
+ return (UserSchema[]) collection.ToArray (typeof (UserSchema));
+ }
+
+ public override ProcedureSchema[] GetProcedures ()
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ NpgsqlCommand command = new NpgsqlCommand ();
+ command.Connection = connection;
+ command.CommandText =
+ "SELECT pc.proname, pc.oid::integer, pl.lanname, pc.prosrc "
+ + "FROM "
+ + " pg_proc pc, "
+ + " pg_user pu, "
+ + " pg_type pt, "
+ + " pg_language pl "
+ + "WHERE pc.proowner = pu.usesysid "
+ + "AND pc.prorettype = pt.oid "
+ + "AND pc.prolang = pl.oid "
+ + "UNION "
+ + "SELECT pc.proname, pt.oid::integer, pl.lanname, pc.prosrc "
+ + "FROM "
+ + " pg_proc pc, "
+ + " pg_user pu, "
+ + " pg_type pt, "
+ + " pg_language pl "
+ + "WHERE pc.proowner = pu.usesysid "
+ + "AND pc.prorettype = 0 "
+ + "AND pc.prolang = pl.oid;";
+ NpgsqlDataReader r = command.ExecuteReader ();
+
+ while (r.Read ()) {
+ ProcedureSchema procedure = new ProcedureSchema ();
+
+ procedure.Provider = this;
+ procedure.Name = r.GetString (0);
+ procedure.Definition = r.GetString (3);
+ procedure.LanguageName = r.GetString (2);
+
+ try {
+ if (r.GetInt32 (1) <= LastSystemOID)
+ procedure.IsSystemProcedure = true;
+ } catch {}
+
+ collection.Add (procedure);
+ }
+
+
+ return (ProcedureSchema[]) collection.ToArray (typeof (ProcedureSchema));
+ }
+
+ public override ColumnSchema[] GetProcedureColumns (ProcedureSchema schema)
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ // FIXME: Won't work properly with overload functions.
+ NpgsqlCommand command = new NpgsqlCommand ();
+ command.Connection = connection;
+ command.CommandText = String.Format (
+ "SELECT format_type (prorettype, NULL) "
+ + "FROM pg_proc pc, pg_language pl "
+ + "WHERE pc.prolang = pl.oid "
+ + "AND pc.proname = '{0}';", schema.Name);
+ NpgsqlDataReader r = command.ExecuteReader ();
+
+ while (r.Read ()) {
+ ColumnSchema column = new ColumnSchema ();
+ column.Provider = this;
+
+ column.DataTypeName = r.GetString (0);
+ column.Name = r.GetString (0);
+
+ collection.Add (column);
+ }
+
+ return (ColumnSchema[]) collection.ToArray (typeof (ColumnSchema));
+ }
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/OracleDbProvider.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/OracleDbProvider.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/OracleDbProvider.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,432 @@
+//
+// Provider/OracleDbProvider.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+// Daniel Morgan <danielmorgan at verizon.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+// Copyright (C) 2005 Daniel Morgan
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.Data;
+using System.Text;
+using System.Text.RegularExpressions;
+
+using System.Data.OracleClient;
+
+namespace Mono.Data.Sql
+{
+ /// <summary>
+ /// Mono.Data.Sql provider for Orace databases.
+ /// </summary>
+ [Serializable]
+ public class OracleDbProvider : DbProviderBase
+ {
+ protected OracleConnection connection = null;
+ protected OracleDataAdapter adapter = new OracleDataAdapter();
+ protected bool isConnectionStringWrong = false;
+
+ public override string ProviderName {
+ get {
+ return "Oracle 8i/9i/10g";
+ }
+ }
+
+ /// <summary>
+ /// ADO.NET Connection
+ /// </summary>
+ public override IDbConnection Connection {
+ get {
+ if (connection == null) {
+ connection = new OracleConnection();
+ }
+
+ return (IDbConnection) connection;
+ }
+ }
+
+ /// <summary>
+ /// Connection String
+ /// </summary>
+ public override string ConnectionString {
+ get {
+ return Connection.ConnectionString;
+ }
+ set {
+ if (IsOpen == true)
+ Close();
+
+ Connection.ConnectionString = value;
+ isConnectionStringWrong = false;
+ }
+ }
+
+ /// <summary>
+ /// Is the connection open
+ /// </summary>
+ public override bool IsOpen {
+ get {
+ return Connection.State == ConnectionState.Open;
+ }
+ }
+
+ /// <summary>
+ /// Is the last used connection string wrong
+ /// </summary>
+ public override bool IsConnectionStringWrong {
+ get {
+ return isConnectionStringWrong;
+ }
+ }
+
+ /// <summary>
+ /// Open the connection. Returns true on success.
+ /// </summary>
+ public override bool Open()
+ {
+ try {
+ Connection.Open();
+ } catch {
+ isConnectionStringWrong = true;
+ }
+ OnOpen();
+ return IsOpen;
+ }
+
+ /// <summary>
+ /// Close the database connection.
+ /// </summary>
+ public override void Close()
+ {
+ Connection.Close();
+ OnClose();
+ }
+
+ /// <summary>
+ /// Do we support the passed schema type
+ /// </summary>
+ public override bool SupportsSchemaType(Type type)
+ {
+ if (type == typeof(TableSchema))
+ return true;
+ else if (type == typeof(ViewSchema))
+ return true;
+ else if (type == typeof(ProcedureSchema))
+ return true;
+ else if (type == typeof(AggregateSchema))
+ return true;
+ else if (type == typeof(GroupSchema))
+ return true;
+ else if (type == typeof(UserSchema))
+ return true;
+ else if (type == typeof(LanguageSchema))
+ return true;
+ else if (type == typeof(OperatorSchema))
+ return true;
+ else if (type == typeof(RoleSchema))
+ return true;
+ else if (type == typeof(SequenceSchema))
+ return true;
+ else if (type == typeof(DataTypeSchema))
+ return true;
+ else if (type == typeof(TriggerSchema))
+ return true;
+ else if (type == typeof(RuleSchema))
+ return true;
+ else
+ return false;
+ }
+
+ /// <summary>
+ /// Thread safe SQL execution.
+ /// </summary>
+ public override DataTable ExecuteSQL(string SQLText)
+ {
+ OracleCommand command = new OracleCommand();
+ command.Connection = connection;
+ command.CommandText = SQLText;
+
+ DataSet resultSet = null;
+
+ lock(adapter) {
+ adapter.SelectCommand = command;
+ adapter.Fill(resultSet);
+ }
+
+ return resultSet.Tables[0];
+ }
+
+ private bool IsSystem(string owner)
+ {
+ switch(owner) {
+ case "SYSTEM":
+ case "SYS":
+ case "DRSYS":
+ case "CTXSYS":
+ case "MDSYS":
+ case "WKSYS":
+ return true;
+ }
+
+ return false;
+ }
+
+
+ /// <summary>
+ /// Get a list of tables in the system.
+ /// </summary>
+ public override TableSchema[] GetTables()
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection.");
+
+ ArrayList collection = new ArrayList();
+
+ OracleCommand command = new OracleCommand();
+ command.Connection = connection;
+ command.CommandText =
+ "SELECT OWNER, TABLE_NAME, TABLESPACE_NAME " +
+ "FROM ALL_TABLES " +
+ "ORDER BY OWNER, TABLE_NAME";
+ OracleDataReader r = command.ExecuteReader();
+
+ while (r.Read()) {
+ TableSchema table = new TableSchema();
+ table.Provider = this;
+ table.OwnerName = r.GetValue(0).ToString();
+ table.SchemaName = r.GetValue(0).ToString();
+ table.Name = r.GetString(1).ToString();
+ table.IsSystemTable = IsSystem(table.OwnerName);
+ table.TableSpaceName = r.GetValue(2).ToString();
+
+ StringBuilder sb = new StringBuilder();
+ sb.AppendFormat ("-- Table: {0}\n", table.Name);
+ sb.AppendFormat ("-- DROP TABLE {0};\n\n", table.Name);
+ sb.AppendFormat ("CREATE TABLE {0} (\n", table.Name);
+
+ ColumnSchema[] columns = table.Columns;
+ string[] parts = new string[columns.Length];
+ for (int i = 0; i < parts.Length; i++) {
+ parts[i] = "\t" + columns[i].Definition;
+ }
+ sb.Append (String.Join (",\n", parts));
+
+ ConstraintSchema[] cons = table.Constraints;
+ parts = new string[cons.Length];
+ if (cons.Length > 0)
+ sb.Append (",\n");
+ for (int i = 0; i < parts.Length; i++) {
+ parts[i] = "\t" + cons[i].Definition;
+ }
+ sb.Append (String.Join (",\n", parts));
+
+ //sb.AppendFormat ("\n) COMMENT '{0}';", table.Comment);
+ table.Definition = "";
+ collection.Add (table);
+ }
+
+ return (TableSchema[]) collection.ToArray(typeof(TableSchema));
+ }
+
+ private int GetInt (IDataReader reader, int field)
+ {
+ if (reader.IsDBNull(field) == true)
+ return 0;
+
+ object v = reader.GetValue(field);
+ string ds = v.ToString();
+ int iss = Int32.Parse(ds);
+ return iss;
+ }
+
+ /// <summary>
+ /// Get columns for a table.
+ /// </summary>
+ public override ColumnSchema[] GetTableColumns(TableSchema table)
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection.");
+
+ ArrayList collection = new ArrayList();
+
+ OracleCommand command = new OracleCommand();
+ command.Connection = connection;
+ command.CommandText =
+ "SELECT OWNER, TABLE_NAME, COLUMN_NAME, " +
+ " DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, " +
+ " NULLABLE, COLUMN_ID, DEFAULT_LENGTH, DATA_DEFAULT " +
+ "FROM ALL_TAB_COLUMNS " +
+ "WHERE OWNER = '" + table.OwnerName + "' " +
+ "AND TABLE_NAME = '" + table.Name + "' " +
+ "ORDER BY OWNER, TABLE_NAME, COLUMN_ID";
+ OracleDataReader r = command.ExecuteReader();
+
+ while (r.Read()) {
+ ColumnSchema column = new ColumnSchema();
+
+ try { column.Name = r.GetValue(2).ToString(); } catch {}
+ column.Provider = this;
+ try { column.DataTypeName = r.GetValue(3).ToString(); } catch {}
+ column.Default = "";
+ column.Comment = "";
+ column.OwnerName = table.OwnerName;
+ column.SchemaName = table.OwnerName;
+
+ try { column.NotNull = r.GetValue(7).ToString() == "Y" ? true : false; } catch {}
+
+ try { column.Length = GetInt(r, 4); } catch {}
+ try { column.Precision = GetInt(r, 5); } catch {}
+ try { column.Scale = GetInt(r, 6); } catch {}
+
+ try { column.ColumnID = GetInt(r, 8); } catch {}
+
+ StringBuilder sb = new StringBuilder();
+ sb.AppendFormat("{0} {1}{2}",
+ column.Name,
+ column.DataTypeName,
+ (column.Length > 0) ? ("(" + column.Length + ")") : "");
+ sb.AppendFormat(" {0}", column.NotNull ? "NOT NULL" : "NULL");
+ //if (column.Default.Length > 0)
+ // sb.AppendFormat(" DEFAULT {0}", column.Default);
+ column.Definition = sb.ToString();
+
+ collection.Add(column);
+ }
+
+ return (ColumnSchema[]) collection.ToArray(typeof(ColumnSchema));
+ }
+
+ /// <summary>
+ /// Get a collection of views from the system.
+ /// </summary>
+ public override ViewSchema[] GetViews()
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection.");
+
+ ArrayList collection = new ArrayList();
+
+ OracleCommand command = new OracleCommand();
+ command.Connection = connection;
+ command.CommandText =
+ "SELECT OWNER, VIEW_NAME, TEXT " +
+ "FROM ALL_VIEWS " +
+ "ORDER BY OWNER, VIEW_NAME";
+ OracleDataReader r = command.ExecuteReader();
+
+ while (r.Read()) {
+ ViewSchema view = new ViewSchema();
+ view.Provider = this;
+
+ try {
+ view.Name = r.GetString(1);
+ view.SchemaName = r.GetString(0);
+ view.OwnerName = r.GetString(0);
+ view.Definition = r.GetString(2);
+ view.IsSystemView = IsSystem(view.OwnerName);
+ view.Comment = "";
+ } catch (Exception e) {
+ }
+
+ collection.Add(view);
+ }
+
+ return (ViewSchema[]) collection.ToArray (typeof(ViewSchema));
+ }
+
+ /// <summary>
+ /// Get a collection of columns within a view
+ /// </summary>
+ public override ColumnSchema[] GetViewColumns(ViewSchema view)
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection.");
+
+ ArrayList collection = new ArrayList();
+
+ OracleCommand command = new OracleCommand ();
+ command.Connection = connection;
+ command.CommandText =
+ "SELECT * " +
+ " FROM " + view.Name +
+ " WHERE 1 = 0";
+ OracleDataReader r = command.ExecuteReader();
+
+ for (int i = 0; i < r.FieldCount; i++) {
+ ColumnSchema column = new ColumnSchema();
+
+ column.Name = r.GetName(i);
+ column.DataTypeName = r.GetDataTypeName(i);
+ column.Default = "";
+ column.Definition = "";
+ column.OwnerName = view.OwnerName;
+ column.SchemaName = view.OwnerName;
+
+ collection.Add(column);
+ }
+
+ return (ColumnSchema[]) collection.ToArray (typeof(ColumnSchema));
+ }
+
+ /// <summary>
+ /// Get a collection of constraints within a a table.
+ /// </summary>
+ public override ConstraintSchema[] GetTableConstraints (TableSchema table)
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection.");
+
+ ArrayList collection = new ArrayList ();
+
+ OracleCommand command = new OracleCommand ();
+ command.Connection = connection;
+ command.CommandText =
+ "SELECT k.owner, k.table_name, k.constraint_name, " +
+ " k.constraint_type, k.status, k.validated " +
+ "FROM all_constraints k " +
+ "WHERE k.owner = '" + table.OwnerName + "' " +
+ "AND k.table_name = '" + table.Name + "' " +
+ "and k.constraint_type = 'P'";
+ OracleDataReader r = command.ExecuteReader ();
+
+ while (r.Read ()) {
+ ConstraintSchema constraint = null;
+ switch (r.GetString(4)) {
+ case "P":
+ default:
+ constraint = new PrimaryKeyConstraintSchema();
+ break;
+ }
+
+ constraint.Name = r.GetString (3);
+ constraint.Definition = "";
+
+ collection.Add (constraint);
+ }
+
+ return (ConstraintSchema[]) collection.ToArray (typeof(ConstraintSchema));
+ }
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/SqlDbProvider.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/SqlDbProvider.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/SqlDbProvider.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,533 @@
+//
+// Provider/SqlDbProvider.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+// Daniel Morgan <danielmorgan at verizon.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.Data;
+using System.Text;
+using System.Text.RegularExpressions;
+
+using System.Data.SqlClient;
+
+namespace Mono.Data.Sql
+{
+ /// <summary>
+ /// Mono.Data.Sql provider for PostgreSQL databases.
+ /// </summary>
+ [Serializable]
+ public class SqlDbProvider : DbProviderBase
+ {
+ protected SqlConnection connection = null;
+ protected SqlDataAdapter adapter = new SqlDataAdapter();
+ protected bool isConnectionStringWrong = false;
+
+ /// <summary>
+ /// Default Constructor
+ /// </summary>
+ public SqlDbProvider () : base ()
+ {
+ }
+
+ public override string ProviderName {
+ get {
+ return "SQL Server Database";
+ }
+ }
+
+ /// <summary>
+ /// Constructor with ADO.NET Sql connection.
+ /// </summary>
+ public SqlDbProvider (SqlConnection conn)
+ {
+ connection = conn;
+ }
+
+ /// <summary>
+ /// ADO.NET Connection
+ /// </summary>
+ public override IDbConnection Connection {
+ get {
+ if (connection == null)
+ connection = new SqlConnection();
+
+ return (IDbConnection) connection;
+ }
+ }
+
+ /// <summary>
+ /// Connection String
+ /// </summary>
+ public override string ConnectionString {
+ get {
+ return Connection.ConnectionString;
+ }
+ set {
+ if (IsOpen == true)
+ Close();
+
+ Connection.ConnectionString = value;
+ isConnectionStringWrong = false;
+ }
+ }
+
+ /// <summary>
+ /// Is the connection open
+ /// </summary>
+ public override bool IsOpen {
+ get {
+ return Connection.State == ConnectionState.Open;
+ }
+ }
+
+ /// <summary>
+ /// Is the last used connection string wrong
+ /// </summary>
+ public override bool IsConnectionStringWrong {
+ get {
+ return isConnectionStringWrong;
+ }
+ }
+
+ /// <summary>
+ /// Open the connection. Returns true on success.
+ /// </summary>
+ public override bool Open()
+ {
+ try {
+ Connection.Open();
+ } catch {
+ isConnectionStringWrong = true;
+ }
+ OnOpen ();
+ return IsOpen;
+ }
+
+ /// <summary>
+ /// Close the database connection.
+ /// </summary>
+ public override void Close()
+ {
+ Connection.Close();
+ OnClose();
+ }
+
+ /// <summary>
+ /// Do we support the passed schema type
+ /// </summary>
+ public override bool SupportsSchemaType(Type type)
+ {
+ if (type == typeof(TableSchema))
+ return true;
+ else if (type == typeof(ViewSchema))
+ return true;
+ else if (type == typeof(ProcedureSchema))
+ return true;
+ else if (type == typeof(AggregateSchema))
+ return true;
+ else if (type == typeof(GroupSchema))
+ return true;
+ else if (type == typeof(UserSchema))
+ return true;
+ else if (type == typeof(LanguageSchema))
+ return true;
+ else if (type == typeof(OperatorSchema))
+ return true;
+ else if (type == typeof(RoleSchema))
+ return true;
+ else if (type == typeof(SequenceSchema))
+ return true;
+ else if (type == typeof(DataTypeSchema))
+ return true;
+ else if (type == typeof(TriggerSchema))
+ return true;
+ else if (type == typeof(RuleSchema))
+ return true;
+ else
+ return false;
+ }
+
+ /// <summary>
+ /// Thread safe SQL execution.
+ /// </summary>
+ public override DataTable ExecuteSQL(string SQLText)
+ {
+ SqlCommand command = new SqlCommand();
+ command.Connection = connection;
+ command.CommandText = SQLText;
+
+ DataSet resultSet = new DataSet ();
+
+ lock(adapter) {
+ adapter.SelectCommand = command;
+ adapter.Fill(resultSet);
+ }
+
+ return resultSet.Tables[0];
+ }
+
+ /// <summary>
+ /// Get a list of tables in the system.
+ /// </summary>
+ public override TableSchema[] GetTables()
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ SqlCommand command = new SqlCommand();
+ command.Connection = connection;
+ command.CommandText =
+ "SELECT su.name AS owner, so.name as table_name, so.id as table_id, " +
+ " so.crdate as created_date, so.xtype as table_type " +
+ " FROM dbo.sysobjects so, dbo.sysusers su " +
+ "WHERE xtype IN ('S','U') " +
+ "AND su.uid = so.uid " +
+ "ORDER BY 1, 2";
+ SqlDataReader r = command.ExecuteReader();
+
+ while (r.Read()) {
+ TableSchema table = new TableSchema();
+ table.Provider = this;
+ table.Name = r.GetString(1);
+
+ table.IsSystemTable = r.GetString(4) == "S" ? true : false;
+
+ table.SchemaName = r.GetString(0);
+ table.OwnerName = r.GetString(0);
+ table.Comment = "";
+
+ StringBuilder sb = new StringBuilder();
+ sb.AppendFormat ("-- Table: {0}\n", table.Name);
+ sb.AppendFormat ("-- DROP TABLE {0};\n\n", table.Name);
+ sb.AppendFormat ("CREATE TABLE {0} (\n", table.Name);
+
+ ColumnSchema[] columns = table.Columns;
+ string[] parts = new string[columns.Length];
+ for (int i = 0; i < parts.Length; i++) {
+ parts[i] = "\t" + columns[i].Definition;
+ }
+ sb.Append (String.Join (",\n", parts));
+
+ ConstraintSchema[] cons = table.Constraints;
+ parts = new string[cons.Length];
+ if (cons.Length > 0)
+ sb.Append (",\n");
+ for (int i = 0; i < parts.Length; i++) {
+ parts[i] = "\t" + cons[i].Definition;
+ }
+ sb.Append (String.Join (",\n", parts));
+
+ sb.Append ("\n);\n");
+ //sb.AppendFormat ("COMMENT ON TABLE {0} IS '{1}';", table.Name, table.Comment);
+ table.Definition = sb.ToString();
+ collection.Add (table);
+ }
+ r.Close ();
+ r = null;
+ command.Dispose ();
+ command = null;
+
+ return (TableSchema[]) collection.ToArray (typeof (TableSchema));
+ }
+
+ /// <summary>
+ /// Get columns for a table.
+ /// </summary>
+ public override ColumnSchema[] GetTableColumns(TableSchema table)
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList();
+ SqlConnection con2 = (SqlConnection) (((ICloneable) connection).Clone ());
+ if (con2.State == ConnectionState.Closed)
+ con2.Open();
+ SqlCommand command = con2.CreateCommand ();
+
+ command.CommandText =
+ "SELECT su.name as owner, so.name as table_name, " +
+ " sc.name as column_name, " +
+ " st.name as date_type, sc.length as column_length, " +
+ " sc.xprec as data_preceision, sc.xscale as data_scale, " +
+ " sc.isnullable, sc.colid as column_id " +
+ "FROM dbo.syscolumns sc, dbo.sysobjects so, " +
+ " dbo.systypes st, dbo.sysusers su " +
+ "WHERE sc.id = so.id " +
+ "AND so.xtype in ('U','S') " +
+ "AND so.name = 'employee' " +
+ "AND su.name = 'dbo' " +
+ "AND sc.xusertype = st.xusertype " +
+ "AND su.uid = so.uid " +
+ "ORDER BY sc.colid";
+ SqlDataReader r = command.ExecuteReader();
+
+ while (r.Read()) {
+ ColumnSchema column = new ColumnSchema();
+
+ try { column.Name = r.GetString(2); } catch {}
+ column.Provider = this;
+ try { column.DataTypeName = r.GetString(3); } catch {}
+ try { column.Default = ""; } catch {}
+ column.Comment = "";
+ column.OwnerName = table.OwnerName;
+ column.SchemaName = table.OwnerName;
+ try { column.NotNull = r.GetValue(7).ToString() == "0" ? true : false; } catch {}
+ try { column.Length = r.GetInt32(4); } catch {}
+ //try { column.Precision = GetInt(r, 5)); } catch {}
+ //try { column.Scale = GetIn(r, 6); } catch {}
+
+ StringBuilder sb = new StringBuilder();
+ sb.AppendFormat("{0} {1}{2}",
+ column.Name,
+ column.DataTypeName,
+ (column.Length > 0) ? ("(" + column.Length + ")") : "");
+ sb.AppendFormat(" {0}", column.NotNull ? "NOT NULL" : "NULL");
+ //if (column.Default.Length > 0)
+ // sb.AppendFormat(" DEFAULT {0}", column.Default);
+ column.Definition = sb.ToString();
+
+ collection.Add(column);
+ }
+ r.Close ();
+ r = null;
+ command.Dispose ();
+ command = null;
+ con2.Close ();
+ con2 = null;
+
+ return (ColumnSchema[]) collection.ToArray(typeof(ColumnSchema));
+ }
+
+ private string GetSource (string objectName)
+ {
+ string sql = String.Format ("EXEC [master].[dbo].[sp_helptext] '{0}', null", objectName);
+ SqlConnection con2 = (SqlConnection) (((ICloneable) connection).Clone ());
+ if (con2.State == ConnectionState.Closed)
+ con2.Open();
+ SqlCommand cmd = con2.CreateCommand ();
+ cmd.CommandText = sql;
+ IDataReader reader = cmd.ExecuteReader ();
+
+ StringBuilder sb = new StringBuilder ();
+
+ while (reader.Read ()) {
+ string text = reader.GetString (0);
+ sb.Append (text);
+ }
+
+ reader.Close ();
+ reader = null;
+ cmd.Dispose ();
+ cmd = null;
+ con2.Close ();
+ con2 = null;
+
+ return sb.ToString ();
+ }
+
+ /// <summary>
+ /// Get a collection of views from the system.
+ /// </summary>
+ public override ViewSchema[] GetViews()
+ {
+ ArrayList collection = new ArrayList();
+
+ SqlCommand command = new SqlCommand();
+ command.Connection = connection;
+ command.CommandText =
+ "SELECT su.name AS owner, so.name as table_name, so.id as table_id, " +
+ " so.crdate as created_date, so.xtype as table_type " +
+ "FROM dbo.sysobjects so, dbo.sysusers su " +
+ "WHERE xtype = 'V' " +
+ "AND su.uid = so.uid " +
+ "ORDER BY 1, 2";
+ SqlDataReader r = command.ExecuteReader();
+
+ while (r.Read()) {
+ ViewSchema view = new ViewSchema();
+ view.Provider = this;
+
+ try {
+ view.Name = r.GetString(1);
+ view.SchemaName = r.GetString(0);
+ view.OwnerName = r.GetString(0);
+
+ StringBuilder sb = new StringBuilder();
+ sb.AppendFormat ("-- View: {0}\n", view.Name);
+ sb.AppendFormat ("-- DROP VIEW {0};\n\n", view.Name);
+ string source = GetSource(view.Owner + "." + view.Name);
+ sb.AppendFormat (" {0}\n);", source);
+ view.Definition = sb.ToString ();
+ //view.Comment = r.GetString(5);
+ } catch (Exception e) {
+ }
+
+ collection.Add(view);
+ }
+ r.Close ();
+ r = null;
+ command.Dispose();
+ command = null;
+
+ return (ViewSchema[]) collection.ToArray (typeof (ViewSchema));
+ }
+
+ /// <summary>
+ /// Get a collection of columns within a view
+ /// </summary>
+ public override ColumnSchema[] GetViewColumns(ViewSchema view)
+ {
+ if (IsOpen == false && Open() == false)
+ throw new Exception ("No connection to database");
+
+ ArrayList collection = new ArrayList();
+
+ SqlConnection con2 = (SqlConnection) (((ICloneable) connection).Clone ());
+ if (con2.State == ConnectionState.Closed)
+ con2.Open();
+ SqlCommand command = con2.CreateCommand ();
+ command.CommandText =
+ "SELECT * " +
+ " FROM " + view.Name +
+ " WHERE 1 = 0";
+ SqlDataReader r = command.ExecuteReader();
+
+ for (int i = 0; i < r.FieldCount; i++) {
+ ColumnSchema column = new ColumnSchema();
+
+ column.Name = r.GetName(i);
+ column.DataTypeName = r.GetDataTypeName(i);
+ column.Default = "";
+ column.Definition = "";
+ column.OwnerName = view.OwnerName;
+ column.SchemaName = view.OwnerName;
+
+ collection.Add(column);
+ }
+
+ command.Dispose ();
+ command = null;
+ con2.Close ();
+ con2 = null;
+
+ return (ColumnSchema[]) collection.ToArray (typeof(ColumnSchema));
+ }
+
+ /// <summary>
+ /// Get a collection of constraints within a a table.
+ /// </summary>
+ public override ConstraintSchema[] GetTableConstraints (TableSchema table)
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+ SqlConnection con2 = (SqlConnection) (((ICloneable) connection).Clone ());
+ if (con2.State == ConnectionState.Closed)
+ con2.Open();
+ SqlCommand command = con2.CreateCommand ();
+ command.CommandText =
+ String.Format (
+ "select sox.name, sox.xtype, " +
+ " so.name as table_name, sc.name as column_name, " +
+ " sx.constid as constid, sx.id, sx.colid " +
+ "from dbo.sysconstraints sx, dbo.sysobjects so, dbo.syscolumns sc, " +
+ " dbo.sysobjects sox " +
+ "where so.id = sx.id " +
+ "and sc.id = so.id " +
+ "and sc.colid = sx.colid " +
+ "and sox.id = sx.constid " +
+ "union " +
+ "select si.name, so.xtype, " +
+ " sot.name as table_name, sc.name as column_name, " +
+ " si.indid as constraintid, si.id as tableid, sc.colid as columnid " +
+ "from sysindexes si, sysindexkeys sk, syscolumns sc, sysobjects so, " +
+ " sysobjects sot " +
+ "where si.id = 405576483 " +
+ "and sot.id = so.parent_obj " +
+ "and sk.id = si.id " +
+ "and sc.id = si.id " +
+ "and sk.id = sc.id " +
+ "and sk.indid = si.indid " +
+ "and sk.colid = sc.colid " +
+ "and so.name = si.name " +
+ "order by 3, 1, 7",
+ table.Name, table.OwnerName);
+ SqlDataReader r = command.ExecuteReader ();
+
+ while (r.Read ()) {
+ ConstraintSchema constraint = null;
+ switch (r.GetString(1)) {
+ case "D": // default constraint
+ break;
+ case "C": // check constraint
+ break;
+ case "PK": // Primary Key
+ constraint = new PrimaryKeyConstraintSchema();
+ constraint.Name = r.GetString (0);
+ break;
+ case "F": // Foreign key
+ break;
+ case "UQ": // Unique constraint
+ break;
+ default:
+ break;
+ }
+
+
+ //constraint.Definition = r.GetString (1);
+
+ if (constraint != null)
+ collection.Add (constraint);
+ }
+ r.Close ();
+ r = null;
+ command.Dispose ();
+ command = null;
+ con2.Close ();
+ con2 = null;
+
+ return (ConstraintSchema[]) collection.ToArray (typeof(ConstraintSchema));
+ }
+
+ public override UserSchema[] GetUsers ()
+ {
+ if (IsOpen == false && Open () == false)
+ throw new InvalidOperationException ("Invalid connection");
+
+ ArrayList collection = new ArrayList ();
+
+
+
+ return (UserSchema[]) collection.ToArray (typeof (UserSchema));
+ }
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/SqliteDbProvider.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/SqliteDbProvider.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Providers/SqliteDbProvider.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,127 @@
+//
+// Providers/SqliteDbProvider.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.Data;
+
+using Mono.Data.SqliteClient;
+
+namespace Mono.Data.Sql
+{
+ [Serializable]
+ public class SqliteDbProvider : DbProviderBase
+ {
+ protected SqliteConnection connection = null;
+ protected SqliteDataAdapter adapter = new SqliteDataAdapter ();
+ protected bool isConnectionStringWrong = false;
+
+ public override string ProviderName {
+ get {
+ return "SQLite Database (Incomplete)";
+ }
+ }
+
+ public override IDbConnection Connection {
+ get {
+ if (connection == null)
+ connection = new SqliteConnection ();
+
+ return (IDbConnection) connection;
+ }
+ }
+
+ public override string ConnectionString {
+ get {
+ return Connection.ConnectionString;
+ }
+ set {
+ if (IsOpen)
+ Close ();
+
+ Connection.ConnectionString = value;
+ isConnectionStringWrong = false;
+ }
+ }
+
+ public override bool IsOpen {
+ get {
+ return Connection.State == ConnectionState.Open;
+ }
+ }
+
+ public override bool IsConnectionStringWrong {
+ get {
+ return isConnectionStringWrong;
+ }
+ }
+
+ public override bool Open ()
+ {
+ try {
+ Connection.Open ();
+ OnOpen ();
+ } catch (Exception e) {
+ isConnectionStringWrong = true;
+ }
+
+ return IsOpen;
+ }
+
+ public override void Close ()
+ {
+ Connection.Close ();
+ OnClose ();
+ }
+
+ public override ViewSchema[] GetViews ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override TableSchema[] GetTables ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override ColumnSchema[] GetTableColumns (TableSchema table)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override ColumnSchema[] GetViewColumns (ViewSchema view)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override ConstraintSchema[] GetTableConstraints (TableSchema table)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/AbstractSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/AbstractSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/AbstractSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,148 @@
+//
+// Schema/AbstractSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public abstract class AbstractSchema : ISchema
+ {
+ public event EventHandler Changed;
+
+ protected string name = String.Empty;
+ protected string ownerName = String.Empty;
+ protected string comment = String.Empty;
+ protected string definition = String.Empty;
+ protected string schema = String.Empty;
+ protected DbProviderBase provider = null;
+
+ public virtual string Name {
+ get {
+ return name;
+ }
+ set {
+ name = value;
+ OnChanged();
+ }
+ }
+
+ public virtual string FullName {
+ get {
+ if (schema.Length > 0)
+ return schema + "." + name;
+ else
+ return name;
+ }
+ }
+
+ public virtual string SchemaName {
+ get {
+ return schema;
+ }
+ set {
+ schema = value;
+ OnChanged();
+ }
+ }
+
+ public virtual SchemaSchema Schema {
+ get {
+ throw new NotImplementedException();
+ }
+ set {
+ if (value != null)
+ schema = value.Name;
+ else
+ schema = String.Empty;
+ }
+ }
+
+ public virtual string Comment {
+ get {
+ return comment;
+ }
+ set {
+ comment = value;
+ OnChanged();
+ }
+ }
+
+ public virtual string Definition {
+ get {
+ return definition;
+ }
+ set {
+ definition = value;
+ OnChanged();
+ }
+ }
+
+ public DbProviderBase Provider {
+ get {
+ return provider;
+ }
+ set {
+ provider = value;
+ OnChanged();
+ }
+ }
+
+ public virtual string OwnerName {
+ get {
+ return ownerName;
+ }
+ set {
+ ownerName = value;
+ OnChanged();
+ }
+ }
+
+ public virtual UserSchema Owner {
+ get {
+ throw new NotImplementedException();
+ }
+ }
+
+ public virtual PrivilegeSchema [] Privileges {
+ get {
+ throw new NotImplementedException();
+ }
+ }
+
+ public virtual void OnChanged()
+ {
+ if (Changed != null) {
+ Changed(this, null);
+ }
+ }
+
+ public virtual void Refresh()
+ {
+ }
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/AggregateSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/AggregateSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/AggregateSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,40 @@
+//
+// Schema/AggregateSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class AggregateSchema : AbstractSchema
+ {
+ public override string ToString()
+ {
+ return Name + "()";
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/CheckConstraintSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/CheckConstraintSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/CheckConstraintSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,36 @@
+//
+// Schema/CheckConstraintSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class CheckConstraintSchema : ConstraintSchema
+ {
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ColumnSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ColumnSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ColumnSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,120 @@
+//
+// Schema/ColumnSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class ColumnSchema : AbstractSchema
+ {
+ protected string dataType = String.Empty;
+ protected string defaultValue = String.Empty;
+ protected bool notNull = false;
+ protected int length = 0;
+ protected int precision = 0;
+ protected int scale = 0;
+ protected int columnID = 0;
+
+ public DataTypeSchema DataType {
+ get {
+ // TODO: Load the datatype based on its name.
+ throw new NotImplementedException();
+ }
+ }
+
+ public string DataTypeName {
+ get {
+ return dataType;
+ }
+ set {
+ dataType = value;
+ OnChanged ();
+ }
+ }
+
+ public virtual string Default {
+ get {
+ return defaultValue;
+ }
+ set {
+ defaultValue = value;
+ OnChanged();
+ }
+ }
+
+ public virtual bool NotNull {
+ get {
+ return notNull;
+ }
+ set {
+ notNull = value;
+ OnChanged();
+ }
+ }
+
+ public virtual int Length {
+ get {
+ return length;
+ }
+ set {
+ length = value;
+ OnChanged();
+ }
+ }
+
+ public virtual int Precision {
+ get {
+ return precision;
+ }
+ set {
+ precision = value;
+ OnChanged ();
+ }
+ }
+
+ public virtual int Scale {
+ get {
+ return scale;
+ }
+ set {
+ scale = value;
+ OnChanged ();
+ }
+ }
+
+ public virtual int ColumnID {
+ get {
+ return columnID;
+ }
+ set {
+ columnID = value;
+ OnChanged ();
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ConstraintSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ConstraintSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ConstraintSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,41 @@
+//
+// Schema/ConstraintSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class ConstraintSchema : AbstractSchema
+ {
+ public ColumnSchema[] Columns {
+ get {
+ return (ColumnSchema[]) null;
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/DataTypeSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/DataTypeSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/DataTypeSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,64 @@
+//
+// Schema/DataTypeSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class DataTypeSchema : AbstractSchema
+ {
+ protected bool isComplex = false;
+
+ public DataTypeSchema (string name, bool isComplex)
+ {
+ this.isComplex = isComplex;
+ this.name = name;
+ }
+
+ public bool IsComplex {
+ get {
+ return isComplex;
+ }
+ set {
+ isComplex = value;
+ OnChanged();
+ }
+ }
+
+ public ColumnSchema [] Columns {
+ get {
+ if (isComplex == false) {
+ return new ColumnSchema[0];
+ } else {
+ // TODO: Get complex columns from the provider
+ throw new NotImplementedException();
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ForeignKeyConstraintSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ForeignKeyConstraintSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ForeignKeyConstraintSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,53 @@
+//
+// Schema/ForeignKeyConstraintSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class ForeignKeyConstraintSchema : ConstraintSchema
+ {
+ protected string referenceTable = String.Empty;
+
+ public TableSchema ReferenceTable {
+ get {
+ throw new NotImplementedException();
+ }
+ set {
+ referenceTable = value.FullName;
+ OnChanged();
+ }
+ }
+
+ public ColumnSchema[] ReferenceColumns {
+ get {
+ return (ColumnSchema[]) null;
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/GroupSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/GroupSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/GroupSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,47 @@
+//
+// Schema/ParameterSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class GroupSchema : AbstractSchema
+ {
+ public UserSchema Users {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public RoleSchema[] Roles {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ISchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ISchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ISchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,96 @@
+//
+// Schema/ISchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public interface ISchema
+ {
+ /// <summary>
+ /// Event fired when the object is changed.
+ /// </summary>
+ event EventHandler Changed;
+
+ /// <summary>
+ /// SQL object name.
+ /// </summary>
+ string Name { get; set; }
+
+ /// <summary>
+ /// Full name of the object. This is typically `schema.objectname'.
+ /// </summary>
+ string FullName { get; }
+
+ /// <summary>
+ /// SQL Comment associated with this object.
+ /// </summary>
+ string Comment { get; set; }
+
+ /// <summary>
+ /// SQL Syntax Definition of this object.
+ /// </summary>
+ string Definition { get; set; }
+
+ /// <summary>
+ /// Name of schema
+ /// </summary>
+ string SchemaName { get; set; }
+
+ /// <summary>
+ /// Schema object representing the schema this object is part of.
+ /// </summary>
+ SchemaSchema Schema { get; set; }
+
+ /// <summary>
+ /// Set the owners name in the database by the literal string name
+ /// of the user.
+ /// </summary>
+ string OwnerName { get; set; }
+
+ /// <summary>
+ /// Owner of this sql object.
+ /// </summary>
+ UserSchema Owner { get; }
+
+ /// <summary>
+ /// Privileges (sometimes known as ACL's) associated with this object.
+ /// </summary>
+ PrivilegeSchema [] Privileges { get; }
+
+ /// <summary>
+ /// The connection provider associated with this SQL object.
+ /// </summary>
+ DbProviderBase Provider { get; set; }
+
+ /// <summary>
+ /// Refresh the object from the database.
+ /// </summary>
+ void Refresh();
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/IndexConstraintSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/IndexConstraintSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/IndexConstraintSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,36 @@
+//
+// Schema/IndexConstraintSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class IndexConstraintSchema : ConstraintSchema
+ {
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/LanguageSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/LanguageSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/LanguageSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,47 @@
+//
+// Schema/PrimaryKeyConstraintSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class LanguageSchema : AbstractSchema
+ {
+ protected string handler = String.Empty;
+
+ public ProcedureSchema Handler {
+ get {
+ // TODO: Get procedure
+ throw new NotImplementedException();
+ }
+ set {
+ handler = value.FullName;
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/OperatorSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/OperatorSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/OperatorSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,56 @@
+//
+// Schema/OperatorSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class OperatorSchema : AbstractSchema
+ {
+ protected string leftDataType = String.Empty;
+ protected string rightDataType = String.Empty;
+
+ public override string Name {
+ get {
+ return name;
+ }
+ }
+
+ public DataTypeSchema LeftDataType {
+ get {
+ throw new NotImplementedException();
+ }
+ set {
+ if (value != null)
+ leftDataType = value.Name;
+ else
+ leftDataType = String.Empty;
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ParameterSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ParameterSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ParameterSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,46 @@
+//
+// Schema/ParameterSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class ParameterSchema : AbstractSchema
+ {
+ protected string dataType = String.Empty;
+
+ public DataTypeSchema DataType {
+ get {
+ throw new NotImplementedException();
+ }
+ set {
+ dataType = value.FullName;
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/PrimaryKeyConstraintSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/PrimaryKeyConstraintSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/PrimaryKeyConstraintSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,36 @@
+//
+// Schema/PrimaryKeyConstraintSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class PrimaryKeyConstraintSchema : ConstraintSchema
+ {
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/PrivilegeSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/PrivilegeSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/PrivilegeSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,47 @@
+//
+// Schema/PrivilegeSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class PrivilegeSchema : AbstractSchema
+ {
+ protected bool canGrant = false;
+
+ public bool CanGrant {
+ get {
+ return canGrant;
+ }
+ set {
+ canGrant = value;
+ OnChanged();
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ProcedureSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ProcedureSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ProcedureSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,81 @@
+//
+// Schema/ProcedureSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class ProcedureSchema : AbstractSchema
+ {
+ protected ParameterSchema[] parameters;
+ protected ColumnSchema[] columns;
+ protected string language = String.Empty;
+ protected bool isSystemProcedure = false;
+
+ public ParameterSchema[] Parameters {
+ get {
+ return parameters;
+ }
+ }
+
+ public ColumnSchema[] Columns {
+ get {
+ return columns;
+ }
+ }
+
+ public LanguageSchema Language {
+ get {
+ throw new NotImplementedException();
+ }
+ set {
+ language = value.FullName;
+ }
+ }
+
+ public string LanguageName {
+ get {
+ return language;
+ }
+ set {
+ language = value;
+ OnChanged ();
+ }
+ }
+
+ public bool IsSystemProcedure {
+ get {
+ return isSystemProcedure;
+ }
+ set {
+ isSystemProcedure = value;
+ OnChanged ();
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/RoleSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/RoleSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/RoleSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,39 @@
+//
+// Schema/RoleSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class RoleSchema : AbstractSchema
+ {
+// TODO: Should include a list of Privileges to object mappings. Also
+// needs to include what Identity this Role is connected to. IE: Group
+// or user.
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/RuleSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/RuleSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/RuleSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,36 @@
+//
+// Schema/RuleSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class RuleSchema : AbstractSchema
+ {
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/SchemaSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/SchemaSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/SchemaSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,43 @@
+//
+// Schema/SchemaSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class SchemaSchema : AbstractSchema
+ {
+ public override SchemaSchema Schema {
+ get {
+ return null;
+ }
+ set {
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/SequenceSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/SequenceSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/SequenceSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,80 @@
+//
+// Schema/SequenceSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class SequenceSchema : AbstractSchema
+ {
+ protected string minValue = String.Empty;
+ protected string maxValue = String.Empty;
+ protected string currentValue = String.Empty;
+ protected string increment = String.Empty;
+
+ public string MinValue {
+ get {
+ return minValue;
+ }
+ set {
+ minValue = value;
+ OnChanged();
+ }
+ }
+
+ public string MaxValue {
+ get {
+ return maxValue;
+ }
+ set {
+ maxValue = value;
+ OnChanged();
+ }
+ }
+
+ public string CurrentValue {
+ get {
+ return currentValue;
+ }
+ set {
+ currentValue = value;
+ OnChanged();
+ }
+ }
+
+ public string Increment {
+ get {
+ return increment;
+ }
+ set {
+ increment = value;
+ OnChanged();
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/TableSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/TableSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/TableSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,102 @@
+//
+// Schema/TableSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+
+namespace Mono.Data.Sql
+{
+ /// <summary>
+ /// SQL schema object representing a table
+ /// </summary>
+ public class TableSchema : AbstractSchema
+ {
+ protected bool isSystemTable = false;
+ protected string tableSpaceName = String.Empty;
+
+ /// <summary>
+ /// Is this table part of the database core
+ /// </summary>
+ public bool IsSystemTable {
+ get {
+ return isSystemTable;
+ }
+ set {
+ isSystemTable = value;
+ OnChanged ();
+ }
+ }
+
+ public string TableSpaceName {
+ get {
+ return tableSpaceName;
+ }
+ set {
+ tableSpaceName = value;
+ OnChanged ();
+ }
+ }
+
+ /// <summary>
+ /// Override ToString() to show the tables FullName
+ /// <remarks>
+ /// Returns 'schema.tablename'
+ /// </remarks>
+ /// </summary>
+ public override string ToString ()
+ {
+ return FullName;
+ }
+
+ /// <summary>
+ /// Collection of columns associated with this table.
+ /// </summary>
+ public ColumnSchema[] Columns {
+ get {
+ return (Provider.GetTableColumns(this));
+ }
+ }
+
+ /// <summary>
+ /// Collection of constraints associated with this table.
+ /// </summary>
+ public ConstraintSchema[] Constraints {
+ get {
+ return (Provider.GetTableConstraints(this));
+ }
+ }
+
+ /// <summary>
+ /// Refresh the information associated with this table.
+ /// </summary>
+ public override void Refresh()
+ {
+ // Update Name, etc.
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/TriggerSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/TriggerSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/TriggerSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,37 @@
+//
+// Schema/TriggerSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class TriggerSchema : AbstractSchema
+ {
+
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/UniqueConstraintSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/UniqueConstraintSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/UniqueConstraintSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,36 @@
+//
+// Schema/UniqueConstraintSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class UniqueConstraintSchema : ConstraintSchema
+ {
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/UserSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/UserSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/UserSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,41 @@
+//
+// Schema/UserSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class UserSchema : AbstractSchema
+ {
+ public RoleSchema [] Roles {
+ get {
+ throw new NotImplementedException();
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ViewSchema.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ViewSchema.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql/Schema/ViewSchema.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,47 @@
+//
+// Schema/ViewSchema.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Mosaix Communications, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Mono.Data.Sql
+{
+ public class ViewSchema : AbstractSchema
+ {
+ protected bool isSystemView = false;
+
+ public bool IsSystemView {
+ get {
+ return isSystemView;
+ }
+ set {
+ isSystemView = value;
+ OnChanged();
+ }
+ }
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql.mds
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql.mds 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/Mono.Data.Sql.mds 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,24 @@
+<Combine name="Mono.Data.Sql" fileversion="2.0">
+ <Configurations active="Debug">
+ <Configuration name="Debug" ctype="CombineConfiguration">
+ <Entry configuration="Debug" build="False" name="Mono.Data.Sql" />
+ <Entry configuration="Debug" build="True" name="Mono.Data.Sql.Tests" />
+ <Entry configuration="Debug" build="True" name="MonoQuery" />
+ </Configuration>
+ <Configuration name="Release" ctype="CombineConfiguration">
+ <Entry configuration="Release" build="False" name="Mono.Data.Sql" />
+ <Entry configuration="Release" build="True" name="Mono.Data.Sql.Tests" />
+ <Entry configuration="Release" build="True" name="MonoQuery" />
+ </Configuration>
+ </Configurations>
+ <StartMode startupentry="Mono.Data.Sql" single="True">
+ <Execute type="None" entry="Mono.Data.Sql" />
+ <Execute type="None" entry="Mono.Data.Sql.Tests" />
+ <Execute type="None" entry="MonoQuery" />
+ </StartMode>
+ <Entries>
+ <Entry filename="./Mono.Data.Sql/Mono.Data.Sql.mdp" />
+ <Entry filename="./tests/Mono.Data.Sql.Tests.mdp" />
+ <Entry filename="./MonoQuery/MonoQuery.mdp" />
+ </Entries>
+</Combine>
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/AssemblyInfo.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/AssemblyInfo.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/AssemblyInfo.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,32 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes specify the key for the sign of your assembly. See the
+// .NET Framework documentation for more information about signing.
+// This is not required, if you don't want signing let these attributes like they're.
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Commands/Commands.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Commands/Commands.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Commands/Commands.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,117 @@
+//
+// AddConnectionCommand.cs
+//
+// Author:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+
+using MonoDevelop.Gui;
+using MonoDevelop.Gui.Pads;
+using MonoDevelop.Commands;
+using MonoDevelop.Core.Services;
+
+using Gtk;
+
+using Mono.Data.Sql;
+using MonoQuery;
+
+namespace MonoQuery.Commands
+{
+ public enum MonoQueryCommands {
+ AddConnection,
+ RemoveConnection,
+ DisconnectConnection,
+ RefreshProviderList,
+ RefreshConnection
+ }
+
+ public class AddConnection : CommandHandler
+ {
+ protected override void Run ()
+ {
+ ConnectionDialog dialog = new ConnectionDialog ();
+ int retval = dialog.Run ();
+ if (retval == (int) Gtk.ResponseType.Ok) {
+ Assembly asm = Assembly.GetAssembly (typeof (Mono.Data.Sql.DbProviderBase));
+ DbProviderBase provider = (DbProviderBase) asm.CreateInstance (dialog.ConnectionType.FullName);
+ if (provider == null)
+ return;
+ provider.Name = dialog.ConnectionName;
+ provider.ConnectionString = dialog.ConnectionString;
+
+ MonoQueryService service = (MonoQueryService)
+ ServiceManager.GetService (typeof (MonoQueryService));
+ service.Providers.Add ( (DbProviderBase) provider);
+ }
+ dialog.Destroy ();
+ }
+ }
+
+ public class RemoveConnection : CommandHandler
+ {
+ protected override void Run ()
+ {
+ DatabasePad pad = (DatabasePad) MonoDevelop.Gui.WorkbenchSingleton.Workbench.GetPad (typeof (DatabasePad));
+ MonoQueryService service = (MonoQueryService) ServiceManager.GetService (typeof (MonoQueryService));
+
+ object obj = pad.GetSelectedNode ().DataItem;
+ if (obj as DbProviderBase != null)
+ service.Providers.Remove ((DbProviderBase) obj);
+ }
+ }
+
+ public class RefreshProviderList : CommandHandler
+ {
+ protected override void Run ()
+ {
+ DatabasePad pad = (DatabasePad) MonoDevelop.Gui.WorkbenchSingleton.Workbench.GetPad (typeof (DatabasePad));
+ pad.Refresh ();
+ }
+ }
+
+ public class RefreshConnection : CommandHandler
+ {
+ protected override void Run ()
+ {
+ DatabasePad pad = (DatabasePad) MonoDevelop.Gui.WorkbenchSingleton.Workbench.GetPad (typeof (DatabasePad));
+ object obj = pad.GetSelectedNode ().DataItem;
+ if (obj as DbProviderBase != null)
+ (obj as DbProviderBase).Refresh ();
+ }
+ }
+
+ public class DisconnectConnection : CommandHandler
+ {
+ protected override void Run ()
+ {
+ DatabasePad pad = (DatabasePad) MonoDevelop.Gui.WorkbenchSingleton.Workbench.GetPad (typeof (DatabasePad));
+ DbProviderBase provider = (pad.GetSelectedNode ().DataItem as DbProviderBase);
+ if (provider != null)
+ provider.Close ();
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/ConnectionDialog.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/ConnectionDialog.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/ConnectionDialog.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,135 @@
+//
+// ConnectionDialog.cs
+//
+// Author:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+
+using Gtk;
+using Glade;
+
+using Mono.Data.Sql;
+
+using MonoDevelop.Gui;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
+
+namespace MonoQuery
+{
+ public class ConnectionDialog
+ {
+ [Glade.Widget]
+ protected Dialog newConnectionDialog;
+ [Glade.Widget]
+ protected ComboBox providersCombo;
+ [Glade.Widget]
+ protected Entry nameEntry;
+ [Glade.Widget]
+ protected Entry serverEntry;
+ [Glade.Widget]
+ protected Entry databaseEntry;
+ [Glade.Widget]
+ protected Entry useridEntry;
+ [Glade.Widget]
+ protected Entry passwordEntry;
+ [Glade.Widget]
+ protected Entry otherEntry;
+ [Glade.Widget]
+ protected TextView connectionStringTextView;
+
+ public ConnectionDialog () : base ()
+ {
+ Glade.XML gxml = new Glade.XML (null, "monoquery.glade", "newConnectionDialog", null);
+ gxml.Autoconnect (this);
+
+ ListStore store = new ListStore (typeof (string), typeof (Type));
+
+ MonoQueryService service = (MonoQueryService) ServiceManager.GetService (typeof (MonoQueryService));
+ foreach (Type type in service.ProviderTypes) {
+ Assembly asm = Assembly.GetAssembly (typeof (Mono.Data.Sql.DbProviderBase));
+ DbProviderBase provider = (DbProviderBase) asm.CreateInstance (type.FullName);
+ store.AppendValues (provider.ProviderName, type);
+ }
+
+ providersCombo.Clear ();
+
+ CellRendererText ctext = new CellRendererText ();
+ providersCombo.PackStart (ctext, false);
+ providersCombo.AddAttribute (ctext, "text", 0);
+ providersCombo.Model = store;
+ providersCombo.Active = 0;
+ }
+
+ public virtual string ConnectionString {
+ get {
+ return connectionStringTextView.Buffer.Text;
+ }
+ }
+
+ public virtual string ConnectionName {
+ get {
+ return nameEntry.Text;
+ }
+ }
+
+ public virtual Type ConnectionType {
+ get {
+ TreeIter iter;
+ providersCombo.GetActiveIter (out iter);
+ return (Type) providersCombo.Model.GetValue (iter, 1);
+ }
+ }
+
+ public int Run ()
+ {
+ return newConnectionDialog.Run ();
+ }
+
+ public void Destroy ()
+ {
+ newConnectionDialog.Destroy ();
+ }
+
+ protected void OnChanged (object sender, EventArgs args)
+ {
+ string connString = String.Empty;
+
+ if (serverEntry.Text != String.Empty)
+ connString += String.Format ("Server={0};", serverEntry.Text);
+ if (databaseEntry.Text != String.Empty)
+ connString += String.Format ("Database={0};", databaseEntry.Text);
+ if (useridEntry.Text != String.Empty)
+ connString += String.Format ("User ID={0};", useridEntry.Text);
+ if (passwordEntry.Text != String.Empty)
+ connString += String.Format ("Secret={0};", passwordEntry.Text);
+ if (otherEntry.Text != String.Empty)
+ connString += otherEntry.Text;
+
+ connectionStringTextView.Buffer.Text = connString;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DataGridView.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DataGridView.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DataGridView.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,86 @@
+//
+// DataGridView.cs: View information in a data table.
+//
+// Author:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Data;
+
+using Gtk;
+
+using Mono.Data.Sql;
+
+using MonoDevelop.Gui;
+using MonoDevelop.Gui.Widgets;
+
+namespace MonoQuery
+{
+ public class DataGridView : AbstractViewContent
+ {
+ protected Frame frame;
+ protected DataGrid grid;
+
+ public DataGridView () : base ()
+ {
+ frame = new Gtk.Frame ();
+ grid = new DataGrid ();
+ frame.Add (grid);
+ frame.ShowAll ();
+ }
+
+ public DataGridView (DataTable table) : this ()
+ {
+ LoadDataTable (table);
+ }
+
+ public override string UntitledName {
+ get {
+ return "UntitledResult";
+ }
+ }
+
+ public override void Dispose ()
+ {
+ Control.Dispose ();
+ }
+
+ public override void Load (string filename)
+ {
+ }
+
+ public void LoadDataTable (DataTable table)
+ {
+ grid.DataSource = table;
+ grid.DataBind ();
+ }
+
+ public override Gtk.Widget Control {
+ get {
+ return frame;
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DatabasePad.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DatabasePad.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DatabasePad.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,67 @@
+//
+// DatabasePad.cs
+//
+// Author:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Resources;
+
+using MonoDevelop.Services;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Gui.Pads;
+
+using Mono.Data.Sql;
+
+namespace MonoQuery
+{
+ public class DatabasePad : TreeViewPad
+ {
+ public DatabasePad () : base ()
+ {
+ MonoQueryService service = (MonoQueryService) ServiceManager.GetService (typeof (MonoQueryService));
+ service.Providers.Changed += new EventHandler (OnProvidersChanged);
+ }
+
+ public override void Initialize (string label, string icon, NodeBuilder[] builders, TreePadOption[] options)
+ {
+ base.Initialize (label, icon, builders, options);
+ OnProvidersChanged (this, null);
+ }
+
+ public void Refresh ()
+ {
+ OnProvidersChanged (this, null);
+ }
+
+ protected virtual void OnProvidersChanged (object sender, EventArgs args)
+ {
+ MonoQueryService service = (MonoQueryService) ServiceManager.GetService (typeof (MonoQueryService));
+ Clear ();
+ LoadTree (service.Providers);
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DbProviderCollection.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DbProviderCollection.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/DbProviderCollection.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,94 @@
+//
+// Providers/DbProviderCollection.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Xml.Serialization;
+using System.Collections;
+
+using Mono.Data.Sql;
+
+namespace MonoQuery
+{
+ [Serializable]
+ [XmlInclude (typeof (MySqlDbProvider))]
+ [XmlInclude (typeof (NpgsqlDbProvider))]
+ [XmlInclude (typeof (SqliteDbProvider))]
+ public class DbProviderCollection : CollectionBase
+ {
+ public DbProviderCollection () : base ()
+ {
+ }
+
+ public event EventHandler Changed;
+
+ public DbProviderBase this[int index] {
+ get {
+ return ((DbProviderBase) List[index]);
+ }
+ set {
+ List[index] = value;
+ }
+ }
+
+ public int Add (DbProviderBase item)
+ {
+ int retval = List.Add (item);
+
+ if( Changed != null )
+ Changed (this, new EventArgs ());
+
+ return( retval );
+ }
+
+ public int IndexOf (DbProviderBase item)
+ {
+ return (List.IndexOf (item));
+ }
+
+ public void Insert (int index, DbProviderBase item)
+ {
+ List.Insert (index, item);
+
+ if (Changed != null)
+ Changed (this, new EventArgs ());
+ }
+
+ public void Remove (DbProviderBase item)
+ {
+ List.Remove (item);
+
+ if( Changed != null )
+ Changed (this, new EventArgs ());
+ }
+
+ public bool Contains(DbProviderBase item)
+ {
+ return (List.Contains (item));
+ }
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/FakeNodes.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/FakeNodes.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/FakeNodes.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,198 @@
+//
+// FakeNodes.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+
+namespace MonoQuery
+{
+ public class TablesNode
+ {
+ public DbProviderBase Provider = null;
+
+ public TablesNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class ViewsNode
+ {
+ public DbProviderBase Provider = null;
+
+ public ViewsNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class ProceduresNode
+ {
+ public DbProviderBase Provider = null;
+
+ public ProceduresNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class AggregatesNode
+ {
+ public DbProviderBase Provider = null;
+
+ public AggregatesNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class GroupsNode
+ {
+ public DbProviderBase Provider = null;
+
+ public GroupsNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class LanguagesNode
+ {
+ public DbProviderBase Provider = null;
+
+ public LanguagesNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class OperatorsNode
+ {
+ public DbProviderBase Provider = null;
+
+ public OperatorsNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class RulesNode
+ {
+ public DbProviderBase Provider = null;
+
+ public RulesNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class RolesNode
+ {
+ public DbProviderBase Provider = null;
+
+ public RolesNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class SequencesNode
+ {
+ public DbProviderBase Provider = null;
+
+ public SequencesNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class UsersNode
+ {
+ public DbProviderBase Provider = null;
+
+ public UsersNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class TypesNode
+ {
+ public DbProviderBase Provider = null;
+
+ public TypesNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class ColumnsNode
+ {
+ public DbProviderBase Provider = null;
+ public ISchema Parent = null;
+
+ public ColumnsNode (DbProviderBase provider, ISchema parent)
+ {
+ Provider = provider;
+ Parent = parent;
+ }
+ }
+
+ public class ConstraintsNode
+ {
+ public DbProviderBase Provider = null;
+ public TableSchema Table = null;
+
+ public ConstraintsNode (DbProviderBase provider, TableSchema table)
+ {
+ Provider = provider;
+ Table = table;
+ }
+ }
+
+ public class TriggersNode
+ {
+ public DbProviderBase Provider = null;
+
+ public TriggersNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+
+ public class ParametersNode
+ {
+ public DbProviderBase Provider = null;
+
+ public ParametersNode (DbProviderBase provider)
+ {
+ Provider = provider;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/AggregatesNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/AggregatesNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/AggregatesNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,76 @@
+//
+// AggregatesNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class AggregatesNodeBuilder : TypeNodeBuilder
+ {
+ public AggregatesNodeBuilder ()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof (AggregatesNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Aggregates");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Aggregates");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ AggregatesNode node = (AggregatesNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, AggregatesNode node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ColumnNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ColumnNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ColumnNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,75 @@
+//
+// ColumnNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class ColumnNodeBuilder : TypeNodeBuilder
+ {
+ public ColumnNodeBuilder()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(ColumnSchema);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Column");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ ColumnSchema schema = (ColumnSchema) dataObject;
+ label = schema.Name;
+ string iconName = "md-mono-query-column";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, ColumnSchema node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return false;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ColumnsNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ColumnsNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ColumnsNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,86 @@
+//
+// ColumnsNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class ColumnsNodeBuilder : TypeNodeBuilder
+ {
+ public ColumnsNodeBuilder ()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof (ColumnsNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Columns");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Columns");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ ColumnsNode node = (ColumnsNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, ColumnsNode node)
+ {
+ if (node.Parent is TableSchema) {
+ foreach (ColumnSchema col in node.Provider.GetTableColumns ((TableSchema)node.Parent))
+ builder.AddChild (col);
+ } else if (node.Parent is ViewSchema) {
+ foreach (ColumnSchema col in node.Provider.GetViewColumns ((ViewSchema)node.Parent))
+ builder.AddChild (col);
+ } else if (node.Parent is ProcedureSchema) {
+ foreach (ColumnSchema col in node.Provider.GetProcedureColumns ((ProcedureSchema)node.Parent))
+ builder.AddChild (col);
+ }
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ConstraintNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ConstraintNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ConstraintNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,81 @@
+//
+// ConstraintNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class ConstraintNodeBuilder : TypeNodeBuilder
+ {
+ public ConstraintNodeBuilder ()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof (ConstraintSchema);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Constraint");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ ConstraintSchema schema = (ConstraintSchema) dataObject;
+ label = schema.Name;
+ string iconName = "md-mono-query-column";
+ if (schema as ForeignKeyConstraintSchema != null)
+ iconName = "md-mono-query-column-f-k";
+ else if (schema as PrimaryKeyConstraintSchema != null)
+ iconName = "md-mono-query-column-p-k";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ ConstraintSchema node = (ConstraintSchema) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, ConstraintSchema node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return false;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ConstraintsNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ConstraintsNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ConstraintsNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,88 @@
+//
+// ConstraintsNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class ConstraintsNodeBuilder : TypeNodeBuilder
+ {
+ public ConstraintsNodeBuilder ()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(ConstraintsNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Constraints");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Constraints");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ ConstraintsNode node = (ConstraintsNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, ConstraintsNode node)
+ {
+ if (node.Provider.IsOpen == false) {
+ try {
+ if (node.Provider.Open() == false) return;
+ } catch {
+ Runtime.MessageService.ShowMessage (GettextCatalog.GetString ("There was an error connecting to the database server."));
+ return;
+ }
+ }
+
+ foreach (ConstraintSchema con in node.Provider.GetTableConstraints(node.Table)) {
+ builder.AddChild (con);
+ }
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/DatabaseNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/DatabaseNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/DatabaseNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,201 @@
+//
+// DatabaseNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Threading;
+using System.Runtime.Remoting.Messaging;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class DatabaseNodeBuilder : TypeNodeBuilder
+ {
+ DbProviderChangedEventHandler providerNameChanged;
+ DbProviderChangedEventHandler connectionStateChanged;
+ DbProviderChangedEventHandler providerRefreshed;
+
+ object ThreadSync = new Object ();
+ ITreeBuilder threadedBuilder;
+ DbProviderBase threadedProvider;
+
+ private delegate void ExpandToNodeHandler (ITreeBuilder builder);
+ private event ExpandToNodeHandler ExpandToNode;
+ private delegate void AddChildHandler (ITreeBuilder builder, object child);
+ private event AddChildHandler AddChildEvent;
+
+ public DatabaseNodeBuilder ()
+ {
+ providerNameChanged = (DbProviderChangedEventHandler) Runtime.DispatchService.GuiDispatch (new DbProviderChangedEventHandler (OnProviderNameChanged));
+ connectionStateChanged = (DbProviderChangedEventHandler) Runtime.DispatchService.GuiDispatch (new DbProviderChangedEventHandler (OnProviderStateChanged));
+ providerRefreshed = (DbProviderChangedEventHandler) Runtime.DispatchService.GuiDispatch (new DbProviderChangedEventHandler (OnProviderRefreshed));
+
+ ExpandToNode += (ExpandToNodeHandler) Runtime.DispatchService.GuiDispatch (new ExpandToNodeHandler (OnExpandToNode));
+ AddChildEvent += (AddChildHandler) Runtime.DispatchService.GuiDispatch (new AddChildHandler (OnAddChild));
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof (DbProviderBase);
+ }
+ }
+
+ public override string ContextMenuAddinPath {
+ get {
+ return "/SharpDevelop/Views/DatabasePad/ContextMenu/ConnectionBrowserNode";
+ }
+ }
+
+ public override void OnNodeAdded (object dataObject)
+ {
+ DbProviderBase provider = (DbProviderBase) dataObject;
+ provider.NameChanged += providerNameChanged;
+ provider.StateChanged += connectionStateChanged;
+ provider.Refreshed += providerRefreshed;
+ }
+
+ public override void OnNodeRemoved (object dataObject)
+ {
+ DbProviderBase provider = (DbProviderBase) dataObject;
+ provider.NameChanged -= providerNameChanged;
+ provider.StateChanged -= connectionStateChanged;
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return ( (DbProviderBase)dataObject).Name;
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ DbProviderBase p = dataObject as DbProviderBase;
+ label = p.Name;
+ string iconName = p.IsOpen ? "md-mono-query-connect" : "md-mono-query-disconnect";
+ if (p.IsConnectionStringWrong) iconName = "md-warning";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ DbProviderBase provider = (DbProviderBase) dataObject;
+ BuildChildNodes (builder, provider);
+ }
+
+ public void BuildChildNodes (ITreeBuilder builder, DbProviderBase provider)
+ {
+ lock (ThreadSync) {
+ threadedBuilder = builder;
+ threadedProvider = provider;
+ Thread thread = new Thread (new ThreadStart (BuildChildNodesThreadStart));
+ thread.Start ();
+ }
+ }
+
+ private void BuildChildNodesThreadStart ()
+ {
+ ITreeBuilder builder = threadedBuilder;
+ DbProviderBase provider = threadedProvider;
+
+ if (provider.IsOpen == false && provider.Open () == false)
+ return;
+
+ if (provider.SupportsSchemaType (typeof (TableSchema)))
+ AddChildEvent (builder, new TablesNode (provider));
+
+ if (provider.SupportsSchemaType (typeof (ViewSchema)))
+ AddChildEvent (builder, new ViewsNode (provider));
+
+ if (provider.SupportsSchemaType (typeof (ProcedureSchema)))
+ AddChildEvent (builder, new ProceduresNode (provider));
+
+ if (provider.SupportsSchemaType (typeof (AggregateSchema)))
+ AddChildEvent (builder, new AggregatesNode (provider));
+
+ if (provider.SupportsSchemaType (typeof (GroupSchema)))
+ AddChildEvent (builder, new GroupsNode (provider));
+
+ if (provider.SupportsSchemaType (typeof (LanguageSchema)))
+ AddChildEvent (builder, new LanguagesNode (provider));
+
+ if (provider.SupportsSchemaType (typeof (OperatorSchema)))
+ AddChildEvent (builder, new OperatorsNode (provider));
+
+ if (provider.SupportsSchemaType (typeof (RoleSchema)))
+ AddChildEvent (builder, new RolesNode (provider));
+
+ if (provider.SupportsSchemaType (typeof (SequenceSchema)))
+ AddChildEvent (builder, new SequencesNode (provider));
+
+ if (provider.SupportsSchemaType (typeof (UserSchema)))
+ AddChildEvent (builder, new UsersNode (provider));
+
+ if (provider.SupportsSchemaType (typeof (DataTypeSchema)))
+ AddChildEvent (builder, new TypesNode (provider));
+
+ ExpandToNode (builder);
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+
+ protected void OnProviderNameChanged (object sender, DbProviderChangedArgs args)
+ {
+ ITreeBuilder tb = Context.GetTreeBuilder (args.Provider);
+ if (tb != null)
+ tb.Update ();
+ }
+
+ protected void OnProviderStateChanged (object sender, DbProviderChangedArgs args)
+ {
+ ITreeBuilder tb = Context.GetTreeBuilder (args.Provider);
+ if (tb != null)
+ tb.Update ();
+ }
+
+ protected void OnProviderRefreshed (object sender, DbProviderChangedArgs args)
+ {
+ ITreeBuilder tb = Context.GetTreeBuilder (args.Provider);
+ if (tb != null)
+ tb.UpdateAll ();
+ }
+
+ protected void OnExpandToNode (ITreeBuilder builder)
+ {
+ builder.Expanded = true;
+ }
+
+ protected void OnAddChild (ITreeBuilder builder, object child)
+ {
+ builder.AddChild (child);
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/GroupsNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/GroupsNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/GroupsNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,76 @@
+//
+// GroupsNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class GroupsNodeBuilder : TypeNodeBuilder
+ {
+ public GroupsNodeBuilder()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(GroupsNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Groups");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Groups");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ GroupsNode node = (GroupsNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, GroupsNode node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/LanguagesNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/LanguagesNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/LanguagesNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,76 @@
+//
+// LanguagesNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class LanguagesNodeBuilder : TypeNodeBuilder
+ {
+ public LanguagesNodeBuilder()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(LanguagesNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Languages");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Languages");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ LanguagesNode node = (LanguagesNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, LanguagesNode node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/OperatorsNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/OperatorsNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/OperatorsNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,76 @@
+//
+// OperatorsNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class OperatorsNodeBuilder : TypeNodeBuilder
+ {
+ public OperatorsNodeBuilder()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(OperatorsNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Operators");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Operators");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ OperatorsNode node = (OperatorsNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, OperatorsNode node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ParametersNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ParametersNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ParametersNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,76 @@
+//
+// ParametersNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class ParametersNodeBuilder : TypeNodeBuilder
+ {
+ public ParametersNodeBuilder()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(ParametersNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Parameters");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Parameters");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ ParametersNode node = (ParametersNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, ParametersNode node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProcedureNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProcedureNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProcedureNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,110 @@
+//
+// ProcedureNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Data;
+
+using Mono.Data.Sql;
+
+using MonoDevelop.Core.Services;
+using MonoDevelop.Gui;
+using MonoDevelop.Gui.Pads;
+using MonoDevelop.Gui.Widgets;
+using MonoDevelop.Services;
+
+namespace MonoQuery
+{
+ public class ProcedureNodeBuilder : TypeNodeBuilder
+ {
+ public ProcedureNodeBuilder ()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof (ProcedureSchema);
+ }
+ }
+
+ public override Type CommandHandlerType {
+ get {
+ return typeof (ProcedureNodeCommandHandler);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Procedure");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = (dataObject as ProcedureSchema).Name;
+ string iconName = "md-mono-query-table";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ ProcedureSchema node = (ProcedureSchema) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, ProcedureSchema node)
+ {
+ builder.AddChild (new ColumnsNode (node.Provider, node));
+ builder.AddChild (new ParametersNode (node.Provider));
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+
+ public class ProcedureNodeCommandHandler : NodeCommandHandler
+ {
+ public override DragOperation CanDragNode ()
+ {
+ return DragOperation.None;
+ }
+
+ public override void OnItemSelected ()
+ {
+ ProcedureSchema table = CurrentNode.DataItem as ProcedureSchema;
+ MonoQueryService service = (MonoQueryService) ServiceManager.GetService (typeof (MonoQueryService));
+
+ if (service.SqlDefinitionPad != null)
+ service.SqlDefinitionPad.SetText (table.Definition);
+ }
+
+ public override void ActivateItem ()
+ {
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProceduresNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProceduresNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProceduresNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,106 @@
+//
+// ProceduresNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Threading;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class ProceduresNodeBuilder : TypeNodeBuilder
+ {
+ private delegate void AddProcedureHandler (ITreeBuilder builder, ProcedureSchema schema);
+ private event AddProcedureHandler AddProcedure;
+
+ private object ThreadSync = new Object ();
+ private ITreeBuilder threadedBuilder;
+ private ProceduresNode threadedNode;
+
+ public ProceduresNodeBuilder()
+ {
+ AddProcedure += (AddProcedureHandler) Runtime.DispatchService.GuiDispatch (new AddProcedureHandler (OnProcedureAdd));
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(ProceduresNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Procedures");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Procedures");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ ProceduresNode node = (ProceduresNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public void BuildChildNodes (ITreeBuilder builder, ProceduresNode node)
+ {
+ lock (ThreadSync) {
+ threadedBuilder = builder;
+ threadedNode = node;
+ Thread thread = new Thread (new ThreadStart (BuildChildNodesThreadStart));
+ thread.Start ();
+ }
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+
+ private void OnProcedureAdd (ITreeBuilder builder, ProcedureSchema schema)
+ {
+ if (((bool)builder.Options["ShowSystemObjects"]) == true || schema.IsSystemProcedure == false)
+ builder.AddChild (schema);
+ builder.Expanded = true;
+ }
+
+ private void BuildChildNodesThreadStart ()
+ {
+ ITreeBuilder builder = threadedBuilder;
+ foreach (ProcedureSchema proc in threadedNode.Provider.GetProcedures ()) {
+ AddProcedure (builder, proc);
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProviderCollectionNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProviderCollectionNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ProviderCollectionNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,84 @@
+//
+// ProviderCollectionNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class ProviderCollectionNodeBuilder : TypeNodeBuilder
+ {
+ public ProviderCollectionNodeBuilder() : base()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(DbProviderCollection);
+ }
+ }
+
+ public override string ContextMenuAddinPath {
+ get {
+ return "/SharpDevelop/Views/DatabasePad/ContextMenu/ConnectionsBrowserNode";
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Database Connections");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Database Connections");
+ string iconName = "md-mono-query-database";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ DbProviderCollection collection = (DbProviderCollection) dataObject;
+ BuildChildNodes (builder, collection);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, DbProviderCollection collection)
+ {
+ foreach (DbProviderBase provider in collection)
+ builder.AddChild (provider);
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/RolesNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/RolesNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/RolesNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,76 @@
+//
+// RolesNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class RolesNodeBuilder : TypeNodeBuilder
+ {
+ public RolesNodeBuilder()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(RolesNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Roles");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Roles");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ RolesNode node = (RolesNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, RolesNode node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/RulesNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/RulesNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/RulesNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,76 @@
+//
+// RulesNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class RulesNodeBuilder : TypeNodeBuilder
+ {
+ public RulesNodeBuilder()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(RulesNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Rules");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Rules");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ RulesNode node = (RulesNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, RulesNode node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/SequencesNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/SequencesNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/SequencesNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,76 @@
+//
+// NodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class SequencesNodeBuilder : TypeNodeBuilder
+ {
+ public SequencesNodeBuilder()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(SequencesNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Sequences");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Sequences");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ SequencesNode node = (SequencesNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, SequencesNode node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TableNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TableNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TableNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,123 @@
+//
+// TableNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Data;
+
+using Mono.Data.Sql;
+
+using MonoDevelop.Core.Services;
+using MonoDevelop.Gui;
+using MonoDevelop.Gui.Pads;
+using MonoDevelop.Gui.Widgets;
+using MonoDevelop.Services;
+
+namespace MonoQuery
+{
+ public class TableNodeBuilder : TypeNodeBuilder
+ {
+ public TableNodeBuilder ()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof (TableSchema);
+ }
+ }
+
+ public override Type CommandHandlerType {
+ get {
+ return typeof (TableNodeCommandHandler);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Table");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = (dataObject as TableSchema).Name;
+ string iconName = "md-mono-query-table";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ TableSchema node = (TableSchema) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, TableSchema node)
+ {
+ builder.AddChild (new ColumnsNode (node.Provider, node));
+ builder.AddChild (new RulesNode (node.Provider));
+ builder.AddChild (new ConstraintsNode (node.Provider, node));
+ builder.AddChild (new TriggersNode (node.Provider));
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+
+ public class TableNodeCommandHandler : NodeCommandHandler
+ {
+ public override DragOperation CanDragNode ()
+ {
+ return DragOperation.None;
+ }
+
+ public override void OnItemSelected ()
+ {
+ TableSchema table = CurrentNode.DataItem as TableSchema;
+ MonoQueryService service = (MonoQueryService) ServiceManager.GetService (typeof (MonoQueryService));
+
+ if (service.SqlDefinitionPad != null)
+ service.SqlDefinitionPad.SetText (table.Definition);
+ }
+
+ public override void ActivateItem ()
+ {
+ TableSchema table = CurrentNode.DataItem as TableSchema;
+ string query = String.Format ("SELECT * FROM {0};", table.Name);
+ table.Provider.ExecuteSQL (query, (SQLCallback) Runtime.DispatchService.GuiDispatch (new SQLCallback (ActivateSQLCallback)));
+ }
+
+ protected void ActivateSQLCallback (object sender, object res)
+ {
+ DataTable results = (res as DataTable);
+
+ DataGridView dataView = new DataGridView (results);
+ Runtime.Gui.Workbench.ShowView (dataView, true);
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TablesNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TablesNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TablesNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,109 @@
+//
+// TablesNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Threading;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class TablesNodeBuilder : TypeNodeBuilder
+ {
+ private delegate void AddTableHandler (ITreeBuilder builder, TableSchema schema);
+ private event AddTableHandler AddTable;
+
+ private object ThreadSync = new Object ();
+ private ITreeBuilder threadedBuilder;
+ private TablesNode threadedNode;
+
+ public TablesNodeBuilder()
+ {
+ AddTable += (AddTableHandler) Runtime.DispatchService.GuiDispatch (new AddTableHandler (OnTableAdd));
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(TablesNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Tables");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Tables");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ TablesNode node = (TablesNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public void BuildChildNodes (ITreeBuilder builder, TablesNode node)
+ {
+ if (node.Provider.IsOpen == false && node.Provider.Open () == false)
+ return;
+
+ lock (ThreadSync) {
+ threadedBuilder = builder;
+ threadedNode = node;
+ Thread thread = new Thread (new ThreadStart (BuildChildNodesThreadStart));
+ thread.Start ();
+ }
+ }
+
+ private void BuildChildNodesThreadStart ()
+ {
+ ITreeBuilder builder = threadedBuilder;
+ foreach (TableSchema schema in threadedNode.Provider.GetTables ()) {
+ AddTable (builder, schema);
+ }
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+
+ private void OnTableAdd (ITreeBuilder builder, TableSchema schema)
+ {
+ if (((bool)builder.Options["ShowSystemObjects"]) == true || schema.IsSystemTable == false)
+ builder.AddChild (schema);
+ builder.Expanded = true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TriggersNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TriggersNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TriggersNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,76 @@
+//
+// TriggersNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class TriggersNodeBuilder : TypeNodeBuilder
+ {
+ public TriggersNodeBuilder()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(TriggersNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Triggers");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Triggers");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ TriggersNode node = (TriggersNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, TriggersNode node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TypesNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TypesNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/TypesNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,76 @@
+//
+// TypesNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class TypesNodeBuilder : TypeNodeBuilder
+ {
+ public TypesNodeBuilder ()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(TypesNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Types");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Types");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ TypesNode node = (TypesNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, TypesNode node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/UsersNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/UsersNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/UsersNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,76 @@
+//
+// UsersNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class UsersNodeBuilder : TypeNodeBuilder
+ {
+ public UsersNodeBuilder()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(UsersNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Users");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Users");
+ string iconName = "md-mono-query-user";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ UsersNode node = (UsersNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, UsersNode node)
+ {
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ViewNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ViewNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ViewNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,102 @@
+//
+// ViewNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class ViewNodeBuilder : TypeNodeBuilder
+ {
+ public ViewNodeBuilder ()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof (ViewSchema);
+ }
+ }
+
+ public override Type CommandHandlerType {
+ get {
+ return typeof (ViewNodeCommandHandler);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("View");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ ViewSchema schema = (ViewSchema) dataObject;
+ label = schema.Name;
+ string iconName = "md-mono-query-table";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ ViewSchema node = (ViewSchema) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, ViewSchema node)
+ {
+ builder.AddChild(new ColumnsNode(node.Provider, node));
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+
+ public class ViewNodeCommandHandler : NodeCommandHandler
+ {
+ public override DragOperation CanDragNode ()
+ {
+ return DragOperation.None;
+ }
+
+ public override void OnItemSelected ()
+ {
+ ViewSchema view = CurrentNode.DataItem as ViewSchema;
+ MonoQueryService service = (MonoQueryService) ServiceManager.GetService (typeof (MonoQueryService));
+
+ if (service.SqlDefinitionPad != null)
+ service.SqlDefinitionPad.SetText(view.Definition);
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ViewsNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ViewsNodeBuilder.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/NodeBuilders/ViewsNodeBuilder.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,89 @@
+//
+// ViewsNodeBuilder.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using MonoDevelop.Services;
+using MonoDevelop.Gui.Pads;
+
+namespace MonoQuery
+{
+ public class ViewsNodeBuilder : TypeNodeBuilder
+ {
+ public ViewsNodeBuilder()
+ {
+ }
+
+ public override Type NodeDataType {
+ get {
+ return typeof(ViewsNode);
+ }
+ }
+
+ public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
+ {
+ return GettextCatalog.GetString ("Views");
+ }
+
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
+ {
+ label = GettextCatalog.GetString ("Views");
+ string iconName = "md-mono-query-tables";
+ icon = Context.GetIcon (iconName);
+ }
+
+ public override void BuildChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ ViewsNode node = (ViewsNode) dataObject;
+ BuildChildNodes (builder, node);
+ }
+
+ public static void BuildChildNodes (ITreeBuilder builder, ViewsNode node)
+ {
+ if (node.Provider.IsOpen == false) {
+ try {
+ if (node.Provider.Open() == false) return;
+ } catch {
+ Runtime.MessageService.ShowMessage (GettextCatalog.GetString ("There was an error connecting to the database server."));
+ return;
+ }
+ }
+
+ foreach(ViewSchema schema in node.Provider.GetViews()) {
+ if ((bool)builder.Options["ShowSystemObjects"] == true || schema.IsSystemView == false)
+ builder.AddChild(schema);
+ }
+ }
+
+ public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/SqlDefinitionPad.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/SqlDefinitionPad.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Gui/SqlDefinitionPad.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,84 @@
+//
+// SqlDefinitionPad.cs: Displays definition of a sql object.
+//
+// Author:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (C) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Resources;
+
+using MonoDevelop.Services;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Gui.Pads;
+using MonoDevelop.Gui;
+
+using Gtk;
+using GtkSourceView;
+
+using Mono.Data.Sql;
+
+namespace MonoQuery
+{
+ public class SqlDefinitionPad : AbstractPadContent
+ {
+ MonoQueryService service = (MonoQueryService)ServiceManager.GetService (typeof (MonoQueryService));
+
+ Gtk.Frame frame;
+ Gtk.ScrolledWindow sw;
+ GtkSourceView.SourceView textView;
+ GtkSourceView.SourceBuffer textBuffer;
+
+ public SqlDefinitionPad () : base ("SQL Definition", "md-mono-query-view")
+ {
+ frame = new Gtk.Frame ();
+ sw = new Gtk.ScrolledWindow ();
+ frame.Add (sw);
+ SourceLanguagesManager lm = new SourceLanguagesManager ();
+ textBuffer = new SourceBuffer(lm.GetLanguageFromMimeType("text/x-sql"));
+ textBuffer.Highlight = true;
+ textView = new SourceView (textBuffer);
+ textView.ShowLineNumbers = false;
+ textView.ShowMargin = false;
+ textView.TabsWidth = 2;
+ textView.Editable = false;
+ sw.Add (textView);
+ frame.ShowAll ();
+
+ service.SqlDefinitionPad = this;
+ }
+
+ public override Gtk.Widget Control {
+ get {
+ return frame;
+ }
+ }
+
+ public void SetText (string text)
+ {
+ this.textBuffer.Text = text;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,475 @@
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
+# Extras/MonoQuery/MonoQuery/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+srcdir = .
+top_srcdir = ../../..
+
+pkgdatadir = $(datadir)/monodevelop
+pkglibdir = $(libdir)/monodevelop
+pkgincludedir = $(includedir)/monodevelop
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = Extras/MonoQuery/MonoQuery
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(monoquerydir)"
+monoqueryDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(monoquery_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/chris/Projects/stuff/MonoDevelop/missing --run aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE =
+AMTAR = ${SHELL} /home/chris/Projects/stuff/MonoDevelop/missing --run tar
+ASSEMBLY_VERSION = 0.7.0.0
+AUTOCONF = ${SHELL} /home/chris/Projects/stuff/MonoDevelop/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/chris/Projects/stuff/MonoDevelop/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/chris/Projects/stuff/MonoDevelop/missing --run automake-1.9
+AWK = gawk
+BOOC =
+BOO_CFLAGS =
+BOO_LIBS =
+CATALOGS = cs.gmo da.gmo de.gmo es.gmo fr.gmo ja_JP.gmo pt_BR.gmo tr.gmo pl.gmo
+CATOBJEXT = .gmo
+CC = gcc
+CCDEPMODE = depmode=none
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS =
+CSC = /usr/bin/mcs
+CSC_FLAGS = -langversion:ISO-1
+CYGPATH_W = echo
+DATADIRNAME = share
+DEFS = -DPACKAGE_NAME=\"monodevelop\" -DPACKAGE_TARNAME=\"monodevelop\" -DPACKAGE_VERSION=\"0.7\" -DPACKAGE_STRING=\"monodevelop\ 0.7\" -DPACKAGE_BUGREPORT=\"monodevelop-list at lists.ximian.com\" -DPACKAGE=\"monodevelop\" -DVERSION=\"0.7\" -DGETTEXT_PACKAGE=\"monodevelop\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1
+DEPDIR = .deps
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = grep -E
+ENABLE_BOO_FALSE =
+ENABLE_BOO_TRUE = #
+ENABLE_DEBUGGER_FALSE =
+ENABLE_DEBUGGER_TRUE = #
+ENABLE_JAVA_FALSE =
+ENABLE_JAVA_TRUE = #
+ENABLE_MONOEXTENSIONS_FALSE =
+ENABLE_MONOEXTENSIONS_TRUE = #
+ENABLE_NUNIT_FALSE =
+ENABLE_NUNIT_TRUE = #
+ENABLE_UPDATE_DESKTOPDB_FALSE = #
+ENABLE_UPDATE_DESKTOPDB_TRUE =
+ENABLE_UPDATE_MIMEDB_FALSE = #
+ENABLE_UPDATE_MIMEDB_TRUE =
+EXEEXT =
+GCONF_SHARP_CFLAGS = -I:/usr/share/gapi-2.0/gnome-api.xml -I:/usr/share/gapi-2.0/pango-api.xml -I:/usr/share/gapi-2.0/atk-api.xml -I:/usr/share/gapi-2.0/gdk-api.xml -I:/usr/share/gapi-2.0/gtk-api.xml -I:/usr/share/gapi-2.0/art-api.xml -I:/usr/share/gapi-2.0/gnome-vfs-api.xml
+GCONF_SHARP_LIBS = -r:/usr/lib/mono/gtk-sharp-2.0/gconf-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gconf-sharp-peditors.dll -r:/usr/lib/mono/gtk-sharp-2.0/gnome-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/art-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gnome-vfs-sharp.dll
+GECKO_SHARP_CFLAGS = -I:/usr/share/gapi-2.0/pango-api.xml -I:/usr/share/gapi-2.0/atk-api.xml -I:/usr/share/gapi-2.0/gdk-api.xml -I:/usr/share/gapi-2.0/gtk-api.xml
+GECKO_SHARP_LIBS = -r:/usr/lib/mono/gecko-sharp-2.0/gecko-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll
+GETTEXT_PACKAGE = monodevelop
+GLADE_SHARP_CFLAGS = -I:/usr/share/gapi-2.0/glade-api.xml -I:/usr/share/gapi-2.0/pango-api.xml -I:/usr/share/gapi-2.0/atk-api.xml -I:/usr/share/gapi-2.0/gdk-api.xml -I:/usr/share/gapi-2.0/gtk-api.xml
+GLADE_SHARP_LIBS = -r:/usr/lib/mono/gtk-sharp-2.0/glade-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll
+GMOFILES = cs.gmo da.gmo de.gmo es.gmo fr.gmo ja_JP.gmo pt_BR.gmo tr.gmo pl.gmo
+GMSGFMT = /usr/bin/msgfmt
+GNOME_SHARP_CFLAGS = -I:/usr/share/gapi-2.0/gnome-api.xml -I:/usr/share/gapi-2.0/pango-api.xml -I:/usr/share/gapi-2.0/atk-api.xml -I:/usr/share/gapi-2.0/gdk-api.xml -I:/usr/share/gapi-2.0/gtk-api.xml -I:/usr/share/gapi-2.0/art-api.xml -I:/usr/share/gapi-2.0/gnome-vfs-api.xml
+GNOME_SHARP_LIBS = -r:/usr/lib/mono/gtk-sharp-2.0/gnome-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/art-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gnome-vfs-sharp.dll
+GNOME_VFS_SHARP_CFLAGS = -I:/usr/share/gapi-2.0/gnome-vfs-api.xml
+GNOME_VFS_SHARP_LIBS = -r:/usr/lib/mono/gtk-sharp-2.0/gnome-vfs-sharp.dll
+GTKHTML_SHARP_CFLAGS = -I:/usr/share/gapi-2.0/gtkhtml-api.xml -I:/usr/share/gapi-2.0/gnome-api.xml -I:/usr/share/gapi-2.0/pango-api.xml -I:/usr/share/gapi-2.0/atk-api.xml -I:/usr/share/gapi-2.0/gdk-api.xml -I:/usr/share/gapi-2.0/gtk-api.xml -I:/usr/share/gapi-2.0/art-api.xml -I:/usr/share/gapi-2.0/gnome-vfs-api.xml
+GTKHTML_SHARP_LIBS = -r:/usr/lib/mono/gtk-sharp-2.0/gtkhtml-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gnome-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/art-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gnome-vfs-sharp.dll
+GTKSOURCEVIEW_SHARP_CFLAGS = -I:/usr/share/gapi-2.0/gnome-api.xml -I:/usr/share/gapi-2.0/pango-api.xml -I:/usr/share/gapi-2.0/atk-api.xml -I:/usr/share/gapi-2.0/gdk-api.xml -I:/usr/share/gapi-2.0/gtk-api.xml -I:/usr/share/gapi-2.0/art-api.xml -I:/usr/share/gapi-2.0/gnome-vfs-api.xml
+GTKSOURCEVIEW_SHARP_LIBS = -r:/usr/lib/mono/gtksourceview-sharp-2.0/gtksourceview-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gnome-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/art-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gnome-vfs-sharp.dll
+GTK_SHARP_CFLAGS = -I:/usr/share/gapi-2.0/pango-api.xml -I:/usr/share/gapi-2.0/atk-api.xml -I:/usr/share/gapi-2.0/gdk-api.xml -I:/usr/share/gapi-2.0/gtk-api.xml
+GTK_SHARP_LIBS = -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll
+IKVM_CFLAGS =
+IKVM_LIBS =
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+INSTOBJEXT = .mo
+INTLLIBS =
+INTLTOOL_CAVES_RULE = %.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DESKTOP_RULE = %.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DIRECTORY_RULE = %.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_EXTRACT = $(top_builddir)/intltool-extract
+INTLTOOL_ICONV = /usr/bin/iconv
+INTLTOOL_KBD_RULE = %.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_KEYS_RULE = %.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_MERGE = $(top_builddir)/intltool-merge
+INTLTOOL_MSGFMT = /usr/bin/msgfmt
+INTLTOOL_MSGMERGE = /usr/bin/msgmerge
+INTLTOOL_OAF_RULE = %.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@
+INTLTOOL_PERL = /usr/bin/perl
+INTLTOOL_PONG_RULE = %.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_PROP_RULE = %.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SCHEMAS_RULE = %.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SERVER_RULE = %.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SHEET_RULE = %.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SOUNDLIST_RULE = %.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_THEME_RULE = %.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UI_RULE = %.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UPDATE = $(top_builddir)/intltool-update
+INTLTOOL_XAM_RULE = %.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_XGETTEXT = /usr/bin/xgettext
+INTLTOOL_XML_NOMERGE_RULE = %.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@
+INTLTOOL_XML_RULE = %.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+LDFLAGS =
+LD_LIBRARY_PATH =
+LIBOBJS =
+LIBS =
+LIB_PREFIX = .so
+LIB_SUFFIX =
+LTLIBOBJS =
+MAINT =
+MAINTAINER_MODE_FALSE = #
+MAINTAINER_MODE_TRUE =
+MAKEINFO = ${SHELL} /home/chris/Projects/stuff/MonoDevelop/missing --run makeinfo
+MCS = /usr/bin/mcs
+MD_ADDIN_DIR = $(prefix)/lib/monodevelop/AddIns
+MD_ASSEMBLY_DIR = $(prefix)/lib/monodevelop/bin
+MD_DIR = $(prefix)/lib/monodevelop
+MINT =
+MKINSTALLDIRS = ./mkinstalldirs
+MONO = /usr/bin/mono
+MONODOC_CFLAGS =
+MONODOC_LIBS = /r:/usr/lib/mono/monodoc/monodoc.dll
+MONO_DEBUGGER_CFLAGS =
+MONO_DEBUGGER_LIBS =
+MONO_NUNIT_CFLAGS =
+MONO_NUNIT_LIBS =
+MOZILLA_HOME = /usr/lib/mozilla
+MSGFMT = /usr/bin/msgfmt
+OBJEXT = o
+PACKAGE = monodevelop
+PACKAGE_BUGREPORT = monodevelop-list at lists.ximian.com
+PACKAGE_NAME = monodevelop
+PACKAGE_STRING = monodevelop 0.7
+PACKAGE_TARNAME = monodevelop
+PACKAGE_VERSION = 0.7
+PATH = /usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/games
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+POFILES = cs.po da.po de.po es.po fr.po ja_JP.po pt_BR.po tr.po pl.po
+POSUB = po
+PO_IN_DATADIR_FALSE =
+PO_IN_DATADIR_TRUE =
+RUNTIME = /usr/bin/mono
+SET_MAKE =
+SHELL = /bin/sh
+SQLITE_XML =
+STRIP =
+UNMANAGED_DEPENDENCIES_MINT_CFLAGS = -D_REENTRANT -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
+UNMANAGED_DEPENDENCIES_MINT_LIBS = @ICU_LIBS@ -Wl,--export-dynamic -pthread -lmint -lpthread -lm -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0
+UNMANAGED_DEPENDENCIES_MONO_CFLAGS = -D_REENTRANT -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
+UNMANAGED_DEPENDENCIES_MONO_LIBS = -Wl,--export-dynamic -pthread -lmono -lpthread -lm -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0
+UPDATE_DESKTOP_DB = /usr/bin/update-desktop-database
+UPDATE_MIME_DB = /usr/bin/update-mime-database
+USE_NLS = yes
+VERSION = 0.7
+XGETTEXT = /usr/bin/xgettext
+ac_ct_CC = gcc
+ac_ct_STRIP =
+am__fastdepCC_FALSE =
+am__fastdepCC_TRUE = #
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = tar --format=ustar -chf - "$$tardir"
+am__untar = tar -xf -
+bindir = ${exec_prefix}/bin
+build_alias =
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+gtksharp_prefix = /usr
+host_alias =
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /home/chris/Projects/stuff/MonoDevelop/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+mkdir_p = mkdir -p -- .
+oldincludedir = /usr/include
+prefix = /usr
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias =
+FILES = \
+Commands/Commands.cs \
+Gui/NodeBuilders/DatabaseNodeBuilder.cs \
+Gui/NodeBuilders/UsersNodeBuilder.cs \
+Gui/NodeBuilders/LanguagesNodeBuilder.cs \
+Gui/NodeBuilders/TypesNodeBuilder.cs \
+Gui/NodeBuilders/ProviderCollectionNodeBuilder.cs \
+Gui/NodeBuilders/ConstraintsNodeBuilder.cs \
+Gui/NodeBuilders/AggregatesNodeBuilder.cs \
+Gui/NodeBuilders/TablesNodeBuilder.cs \
+Gui/NodeBuilders/ViewNodeBuilder.cs \
+Gui/NodeBuilders/ProceduresNodeBuilder.cs \
+Gui/NodeBuilders/ProcedureNodeBuilder.cs \
+Gui/NodeBuilders/OperatorsNodeBuilder.cs \
+Gui/NodeBuilders/GroupsNodeBuilder.cs \
+Gui/NodeBuilders/ColumnsNodeBuilder.cs \
+Gui/NodeBuilders/RolesNodeBuilder.cs \
+Gui/NodeBuilders/ConstraintNodeBuilder.cs \
+Gui/NodeBuilders/TriggersNodeBuilder.cs \
+Gui/NodeBuilders/TableNodeBuilder.cs \
+Gui/NodeBuilders/RulesNodeBuilder.cs \
+Gui/NodeBuilders/SequencesNodeBuilder.cs \
+Gui/NodeBuilders/ColumnNodeBuilder.cs \
+Gui/NodeBuilders/ViewsNodeBuilder.cs \
+Gui/NodeBuilders/ParametersNodeBuilder.cs \
+Gui/SqlDefinitionPad.cs \
+Gui/FakeNodes.cs \
+Gui/DatabasePad.cs \
+Gui/ConnectionDialog.cs \
+Gui/DataGridView.cs \
+Gui/DbProviderCollection.cs \
+MonoQueryService.cs \
+AssemblyInfo.cs
+
+build_sources = $(addprefix $(srcdir)/, $(FILES))
+DLL = $(ADDIN_BUILD)/MonoQuery.dll
+ADDIN = MonoQuery.addin.xml
+GLADE = monoquery.glade
+ADDIN_BUILD = $(top_builddir)/build/AddIns/MonoQuery
+REFS = /r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
+ /r:$(top_builddir)/build/bin/MonoDevelop.Base.dll \
+ /r:$(top_builddir)/build/bin/MonoDevelop.Gui.Widgets.dll \
+ /r:$(top_builddir)/build/AddIns/MonoQuery/Mono.Data.Sql.dll \
+ /r:System.Data.dll \
+ $(GTK_SHARP_LIBS) \
+ $(GLADE_SHARP_LIBS) \
+ $(GTKSOURCEVIEW_SHARP_LIBS)
+
+CLEANFILES = $(DLL) $(DLL).mdb $(ADDIN_BUILD)/$(ADDIN)
+EXTRA_DIST = $(FILES) $(ADDIN)
+monoquerydir = $(MD_ADDIN_DIR)/MonoQuery
+monoquery_DATA = $(DLL) $(ADDIN_BUILD)/$(ADDIN)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Extras/MonoQuery/MonoQuery/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Extras/MonoQuery/MonoQuery/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+install-monoqueryDATA: $(monoquery_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(monoquerydir)" || $(mkdir_p) "$(DESTDIR)$(monoquerydir)"
+ @list='$(monoquery_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(monoqueryDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(monoquerydir)/$$f'"; \
+ $(monoqueryDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(monoquerydir)/$$f"; \
+ done
+
+uninstall-monoqueryDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(monoquery_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(monoquerydir)/$$f'"; \
+ rm -f "$(DESTDIR)$(monoquerydir)/$$f"; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ $(mkdir_p) $(distdir)/Commands $(distdir)/Gui $(distdir)/Gui/NodeBuilders
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(monoquerydir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-monoqueryDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-monoqueryDATA
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-monoqueryDATA install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
+ uninstall-monoqueryDATA
+
+
+all: $(ADDIN_BUILD)/$(ADDIN) $(DLL)
+
+$(ADDIN_BUILD)/$(ADDIN): $(srcdir)/$(ADDIN)
+ mkdir -p $(ADDIN_BUILD)
+ cp $(srcdir)/$(ADDIN) $(ADDIN_BUILD)/$(ADDIN)
+
+$(DLL): $(build_sources) $(srcdir)/$(GLADEFILE)
+ mkdir -p $(ADDIN_BUILD)
+ $(CSC) $(CSC_FLAGS) -target:library -out:$@ $(build_sources) $(REFS) \
+ -resource:$(srcdir)/$(GLADE)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile.am
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile.am 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile.am 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,68 @@
+FILES = \
+Commands/Commands.cs \
+Gui/NodeBuilders/DatabaseNodeBuilder.cs \
+Gui/NodeBuilders/UsersNodeBuilder.cs \
+Gui/NodeBuilders/LanguagesNodeBuilder.cs \
+Gui/NodeBuilders/TypesNodeBuilder.cs \
+Gui/NodeBuilders/ProviderCollectionNodeBuilder.cs \
+Gui/NodeBuilders/ConstraintsNodeBuilder.cs \
+Gui/NodeBuilders/AggregatesNodeBuilder.cs \
+Gui/NodeBuilders/TablesNodeBuilder.cs \
+Gui/NodeBuilders/ViewNodeBuilder.cs \
+Gui/NodeBuilders/ProceduresNodeBuilder.cs \
+Gui/NodeBuilders/ProcedureNodeBuilder.cs \
+Gui/NodeBuilders/OperatorsNodeBuilder.cs \
+Gui/NodeBuilders/GroupsNodeBuilder.cs \
+Gui/NodeBuilders/ColumnsNodeBuilder.cs \
+Gui/NodeBuilders/RolesNodeBuilder.cs \
+Gui/NodeBuilders/ConstraintNodeBuilder.cs \
+Gui/NodeBuilders/TriggersNodeBuilder.cs \
+Gui/NodeBuilders/TableNodeBuilder.cs \
+Gui/NodeBuilders/RulesNodeBuilder.cs \
+Gui/NodeBuilders/SequencesNodeBuilder.cs \
+Gui/NodeBuilders/ColumnNodeBuilder.cs \
+Gui/NodeBuilders/ViewsNodeBuilder.cs \
+Gui/NodeBuilders/ParametersNodeBuilder.cs \
+Gui/SqlDefinitionPad.cs \
+Gui/FakeNodes.cs \
+Gui/DatabasePad.cs \
+Gui/ConnectionDialog.cs \
+Gui/DataGridView.cs \
+Gui/DbProviderCollection.cs \
+MonoQueryService.cs \
+AssemblyInfo.cs
+
+build_sources = $(addprefix $(srcdir)/, $(FILES))
+
+DLL = $(ADDIN_BUILD)/MonoQuery.dll
+ADDIN = MonoQuery.addin.xml
+GLADE = monoquery.glade
+ADDIN_BUILD = $(top_builddir)/build/AddIns/MonoQuery
+
+REFS = /r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
+ /r:$(top_builddir)/build/bin/MonoDevelop.Base.dll \
+ /r:$(top_builddir)/build/bin/MonoDevelop.Gui.Widgets.dll \
+ /r:$(top_builddir)/build/AddIns/MonoQuery/Mono.Data.Sql.dll \
+ /r:System.Data.dll \
+ $(GTK_SHARP_LIBS) \
+ $(GLADE_SHARP_LIBS) \
+ $(GTKSOURCEVIEW_SHARP_LIBS)
+
+all: $(ADDIN_BUILD)/$(ADDIN) $(DLL)
+
+$(ADDIN_BUILD)/$(ADDIN): $(srcdir)/$(ADDIN)
+ mkdir -p $(ADDIN_BUILD)
+ cp $(srcdir)/$(ADDIN) $(ADDIN_BUILD)/$(ADDIN)
+
+$(DLL): $(build_sources) $(srcdir)/$(GLADEFILE)
+ mkdir -p $(ADDIN_BUILD)
+ $(CSC) $(CSC_FLAGS) -target:library -out:$@ $(build_sources) $(REFS) \
+ -resource:$(srcdir)/$(GLADE)
+
+CLEANFILES = $(DLL) $(DLL).mdb $(ADDIN_BUILD)/$(ADDIN)
+
+EXTRA_DIST = $(FILES) $(ADDIN)
+
+monoquerydir = $(MD_ADDIN_DIR)/MonoQuery
+monoquery_DATA = $(DLL) $(ADDIN_BUILD)/$(ADDIN)
+
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile.in
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile.in 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/Makefile.in 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,475 @@
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = Extras/MonoQuery/MonoQuery
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(monoquerydir)"
+monoqueryDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(monoquery_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+ASSEMBLY_VERSION = @ASSEMBLY_VERSION@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOC = @BOOC@
+BOO_CFLAGS = @BOO_CFLAGS@
+BOO_LIBS = @BOO_LIBS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSC = @CSC@
+CSC_FLAGS = @CSC_FLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_BOO_FALSE = @ENABLE_BOO_FALSE@
+ENABLE_BOO_TRUE = @ENABLE_BOO_TRUE@
+ENABLE_DEBUGGER_FALSE = @ENABLE_DEBUGGER_FALSE@
+ENABLE_DEBUGGER_TRUE = @ENABLE_DEBUGGER_TRUE@
+ENABLE_JAVA_FALSE = @ENABLE_JAVA_FALSE@
+ENABLE_JAVA_TRUE = @ENABLE_JAVA_TRUE@
+ENABLE_MONOEXTENSIONS_FALSE = @ENABLE_MONOEXTENSIONS_FALSE@
+ENABLE_MONOEXTENSIONS_TRUE = @ENABLE_MONOEXTENSIONS_TRUE@
+ENABLE_NUNIT_FALSE = @ENABLE_NUNIT_FALSE@
+ENABLE_NUNIT_TRUE = @ENABLE_NUNIT_TRUE@
+ENABLE_UPDATE_DESKTOPDB_FALSE = @ENABLE_UPDATE_DESKTOPDB_FALSE@
+ENABLE_UPDATE_DESKTOPDB_TRUE = @ENABLE_UPDATE_DESKTOPDB_TRUE@
+ENABLE_UPDATE_MIMEDB_FALSE = @ENABLE_UPDATE_MIMEDB_FALSE@
+ENABLE_UPDATE_MIMEDB_TRUE = @ENABLE_UPDATE_MIMEDB_TRUE@
+EXEEXT = @EXEEXT@
+GCONF_SHARP_CFLAGS = @GCONF_SHARP_CFLAGS@
+GCONF_SHARP_LIBS = @GCONF_SHARP_LIBS@
+GECKO_SHARP_CFLAGS = @GECKO_SHARP_CFLAGS@
+GECKO_SHARP_LIBS = @GECKO_SHARP_LIBS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLADE_SHARP_CFLAGS = @GLADE_SHARP_CFLAGS@
+GLADE_SHARP_LIBS = @GLADE_SHARP_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNOME_SHARP_CFLAGS = @GNOME_SHARP_CFLAGS@
+GNOME_SHARP_LIBS = @GNOME_SHARP_LIBS@
+GNOME_VFS_SHARP_CFLAGS = @GNOME_VFS_SHARP_CFLAGS@
+GNOME_VFS_SHARP_LIBS = @GNOME_VFS_SHARP_LIBS@
+GTKHTML_SHARP_CFLAGS = @GTKHTML_SHARP_CFLAGS@
+GTKHTML_SHARP_LIBS = @GTKHTML_SHARP_LIBS@
+GTKSOURCEVIEW_SHARP_CFLAGS = @GTKSOURCEVIEW_SHARP_CFLAGS@
+GTKSOURCEVIEW_SHARP_LIBS = @GTKSOURCEVIEW_SHARP_LIBS@
+GTK_SHARP_CFLAGS = @GTK_SHARP_CFLAGS@
+GTK_SHARP_LIBS = @GTK_SHARP_LIBS@
+IKVM_CFLAGS = @IKVM_CFLAGS@
+IKVM_LIBS = @IKVM_LIBS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_ICONV = @INTLTOOL_ICONV@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
+INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LD_LIBRARY_PATH = @LD_LIBRARY_PATH@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_PREFIX = @LIB_PREFIX@
+LIB_SUFFIX = @LIB_SUFFIX@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MCS = @MCS@
+MD_ADDIN_DIR = @MD_ADDIN_DIR@
+MD_ASSEMBLY_DIR = @MD_ASSEMBLY_DIR@
+MD_DIR = @MD_DIR@
+MINT = @MINT@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MONO = @MONO@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_LIBS = @MONODOC_LIBS@
+MONO_DEBUGGER_CFLAGS = @MONO_DEBUGGER_CFLAGS@
+MONO_DEBUGGER_LIBS = @MONO_DEBUGGER_LIBS@
+MONO_NUNIT_CFLAGS = @MONO_NUNIT_CFLAGS@
+MONO_NUNIT_LIBS = @MONO_NUNIT_LIBS@
+MOZILLA_HOME = @MOZILLA_HOME@
+MSGFMT = @MSGFMT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH = @PATH@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RUNTIME = @RUNTIME@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SQLITE_XML = @SQLITE_XML@
+STRIP = @STRIP@
+UNMANAGED_DEPENDENCIES_MINT_CFLAGS = @UNMANAGED_DEPENDENCIES_MINT_CFLAGS@
+UNMANAGED_DEPENDENCIES_MINT_LIBS = @UNMANAGED_DEPENDENCIES_MINT_LIBS@
+UNMANAGED_DEPENDENCIES_MONO_CFLAGS = @UNMANAGED_DEPENDENCIES_MONO_CFLAGS@
+UNMANAGED_DEPENDENCIES_MONO_LIBS = @UNMANAGED_DEPENDENCIES_MONO_LIBS@
+UPDATE_DESKTOP_DB = @UPDATE_DESKTOP_DB@
+UPDATE_MIME_DB = @UPDATE_MIME_DB@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+gtksharp_prefix = @gtksharp_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+FILES = \
+Commands/Commands.cs \
+Gui/NodeBuilders/DatabaseNodeBuilder.cs \
+Gui/NodeBuilders/UsersNodeBuilder.cs \
+Gui/NodeBuilders/LanguagesNodeBuilder.cs \
+Gui/NodeBuilders/TypesNodeBuilder.cs \
+Gui/NodeBuilders/ProviderCollectionNodeBuilder.cs \
+Gui/NodeBuilders/ConstraintsNodeBuilder.cs \
+Gui/NodeBuilders/AggregatesNodeBuilder.cs \
+Gui/NodeBuilders/TablesNodeBuilder.cs \
+Gui/NodeBuilders/ViewNodeBuilder.cs \
+Gui/NodeBuilders/ProceduresNodeBuilder.cs \
+Gui/NodeBuilders/ProcedureNodeBuilder.cs \
+Gui/NodeBuilders/OperatorsNodeBuilder.cs \
+Gui/NodeBuilders/GroupsNodeBuilder.cs \
+Gui/NodeBuilders/ColumnsNodeBuilder.cs \
+Gui/NodeBuilders/RolesNodeBuilder.cs \
+Gui/NodeBuilders/ConstraintNodeBuilder.cs \
+Gui/NodeBuilders/TriggersNodeBuilder.cs \
+Gui/NodeBuilders/TableNodeBuilder.cs \
+Gui/NodeBuilders/RulesNodeBuilder.cs \
+Gui/NodeBuilders/SequencesNodeBuilder.cs \
+Gui/NodeBuilders/ColumnNodeBuilder.cs \
+Gui/NodeBuilders/ViewsNodeBuilder.cs \
+Gui/NodeBuilders/ParametersNodeBuilder.cs \
+Gui/SqlDefinitionPad.cs \
+Gui/FakeNodes.cs \
+Gui/DatabasePad.cs \
+Gui/ConnectionDialog.cs \
+Gui/DataGridView.cs \
+Gui/DbProviderCollection.cs \
+MonoQueryService.cs \
+AssemblyInfo.cs
+
+build_sources = $(addprefix $(srcdir)/, $(FILES))
+DLL = $(ADDIN_BUILD)/MonoQuery.dll
+ADDIN = MonoQuery.addin.xml
+GLADE = monoquery.glade
+ADDIN_BUILD = $(top_builddir)/build/AddIns/MonoQuery
+REFS = /r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
+ /r:$(top_builddir)/build/bin/MonoDevelop.Base.dll \
+ /r:$(top_builddir)/build/bin/MonoDevelop.Gui.Widgets.dll \
+ /r:$(top_builddir)/build/AddIns/MonoQuery/Mono.Data.Sql.dll \
+ /r:System.Data.dll \
+ $(GTK_SHARP_LIBS) \
+ $(GLADE_SHARP_LIBS) \
+ $(GTKSOURCEVIEW_SHARP_LIBS)
+
+CLEANFILES = $(DLL) $(DLL).mdb $(ADDIN_BUILD)/$(ADDIN)
+EXTRA_DIST = $(FILES) $(ADDIN)
+monoquerydir = $(MD_ADDIN_DIR)/MonoQuery
+monoquery_DATA = $(DLL) $(ADDIN_BUILD)/$(ADDIN)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Extras/MonoQuery/MonoQuery/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Extras/MonoQuery/MonoQuery/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+install-monoqueryDATA: $(monoquery_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(monoquerydir)" || $(mkdir_p) "$(DESTDIR)$(monoquerydir)"
+ @list='$(monoquery_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(monoqueryDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(monoquerydir)/$$f'"; \
+ $(monoqueryDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(monoquerydir)/$$f"; \
+ done
+
+uninstall-monoqueryDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(monoquery_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(monoquerydir)/$$f'"; \
+ rm -f "$(DESTDIR)$(monoquerydir)/$$f"; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ $(mkdir_p) $(distdir)/Commands $(distdir)/Gui $(distdir)/Gui/NodeBuilders
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(monoquerydir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-monoqueryDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-monoqueryDATA
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-monoqueryDATA install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
+ uninstall-monoqueryDATA
+
+
+all: $(ADDIN_BUILD)/$(ADDIN) $(DLL)
+
+$(ADDIN_BUILD)/$(ADDIN): $(srcdir)/$(ADDIN)
+ mkdir -p $(ADDIN_BUILD)
+ cp $(srcdir)/$(ADDIN) $(ADDIN_BUILD)/$(ADDIN)
+
+$(DLL): $(build_sources) $(srcdir)/$(GLADEFILE)
+ mkdir -p $(ADDIN_BUILD)
+ $(CSC) $(CSC_FLAGS) -target:library -out:$@ $(build_sources) $(REFS) \
+ -resource:$(srcdir)/$(GLADE)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.addin.xml
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.addin.xml 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.addin.xml 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,89 @@
+<AddIn
+ name = "MonoQuery Database Management"
+ author = "Christian Hergert"
+ copyright = "MIT X11"
+ url = "http://www.dronestudios.com"
+ description = "Database Management Module"
+ version = "0.2.0">
+
+ <Runtime>
+ <Import assembly="MonoQuery.dll"/>
+ </Runtime>
+
+ <Extension path = "/Workspace/Services">
+ <Class id = "MonoQueryService"
+ class = "MonoQuery.MonoQueryService"/>
+ </Extension>
+
+ <Extension path = "/SharpDevelop/Workbench/Pads">
+ <SolutionPad id = "MonoQuery.DatabasePad" class = "MonoQuery.DatabasePad" defaultPlacement = "Left" _label = "Database Browser" icon = "md-mono-query-view">
+ <PadOption id = "ShowSystemObjects" _label = "Show System Objects" defaultValue = "False"/>
+ <NodeBuilder id = "ProviderCollectionNodeBuilder" class = "MonoQuery.ProviderCollectionNodeBuilder"/>
+ <NodeBuilder id = "DatabaseNodeBuilder" class = "MonoQuery.DatabaseNodeBuilder"/>
+ <NodeBuilder id = "TablesNodeBuilder" class = "MonoQuery.TablesNodeBuilder"/>
+ <NodeBuilder id = "ViewsNodeBuilder" class = "MonoQuery.ViewsNodeBuilder"/>
+ <NodeBuilder id = "ProceduresNodeBuilder" class = "MonoQuery.ProceduresNodeBuilder"/>
+ <NodeBuilder id = "AggregatesNodeBuilder" class = "MonoQuery.AggregatesNodeBuilder"/>
+ <NodeBuilder id = "GroupsNodeBuilder" class = "MonoQuery.GroupsNodeBuilder"/>
+ <NodeBuilder id = "LanguagesNodeBuilder" class = "MonoQuery.LanguagesNodeBuilder"/>
+ <NodeBuilder id = "OperatorsNodeBuilder" class = "MonoQuery.OperatorsNodeBuilder"/>
+ <NodeBuilder id = "RolesNodeBuilder" class = "MonoQuery.RolesNodeBuilder"/>
+ <NodeBuilder id = "SequencesNodeBuilder" class = "MonoQuery.SequencesNodeBuilder"/>
+ <NodeBuilder id = "UsersNodeBuilder" class = "MonoQuery.UsersNodeBuilder"/>
+ <NodeBuilder id = "TypesNodeBuilder" class = "MonoQuery.TypesNodeBuilder"/>
+ <NodeBuilder id = "ColumnsNodeBuilder" class = "MonoQuery.ColumnsNodeBuilder"/>
+ <NodeBuilder id = "RulesNodeBuilder" class = "MonoQuery.RulesNodeBuilder"/>
+ <NodeBuilder id = "TriggersNodeBuilder" class = "MonoQuery.TriggersNodeBuilder"/>
+ <NodeBuilder id = "ConstraintsNodeBuilder" class = "MonoQuery.ConstraintsNodeBuilder"/>
+ <NodeBuilder id = "TableNodeBuilder" class = "MonoQuery.TableNodeBuilder"/>
+ <NodeBuilder id = "ViewNodeBuilder" class = "MonoQuery.ViewNodeBuilder"/>
+ <NodeBuilder id = "ColumnNodeBuilder" class = "MonoQuery.ColumnNodeBuilder"/>
+ <NodeBuilder id = "ConstraintNodeBuilder" class = "MonoQuery.ConstraintNodeBuilder"/>
+ <NodeBuilder id = "ProcedureNodeBuilder" class = "MonoQuery.ProcedureNodeBuilder"/>
+ <NodeBuilder id = "ParametersNodeBuilder" class = "MonoQuery.ParametersNodeBuilder"/>
+ </SolutionPad>
+
+ <Pad id = "MonoQuery.SqlDefinitionPad" class = "MonoQuery.SqlDefinitionPad" defaultPlacement = "Bottom"/>
+ </Extension>
+
+ <Extension path = "/SharpDevelop/Workbench/Contexts/Edit">
+ <ContextPad id = "MonoQuery.DatabasePad"/>
+ <ContextPad id = "MonoQuery.SqlDefinitionPad"/>
+ </Extension>
+
+ <Extension path = "/SharpDevelop/Commands">
+ <Command id = "MonoQuery.Commands.MonoQueryCommands.AddConnection"
+ defaultHandler = "MonoQuery.Commands.AddConnection"
+ _label = "Add connection"
+ icon = "md-mono-query-addconnection"/>
+ <Command id = "MonoQuery.Commands.MonoQueryCommands.RemoveConnection"
+ defaultHandler = "MonoQuery.Commands.RemoveConnection"
+ _label = "Remove"/>
+ <Command id = "MonoQuery.Commands.MonoQueryCommands.RefreshProviderList"
+ defaultHandler = "MonoQuery.Commands.RefreshProviderList"
+ _label = "Refresh"
+ icon = "md-browser-refresh"/>
+ <Command id = "MonoQuery.Commands.MonoQueryCommands.RefreshConnection"
+ defaultHandler = "MonoQuery.Commands.RefreshConnection"
+ _label = "Refresh"
+ icon = "md-browser-refresh"/>
+ <Command id = "MonoQuery.Commands.MonoQueryCommands.DisconnectConnection"
+ defaultHandler = "MonoQuery.Commands.DisconnectConnection"
+ _label = "Disconnect"
+ icon = "md-mono-query-disconnect"/>
+ </Extension>
+
+ <Extension path = "/SharpDevelop/Views/DatabasePad/ContextMenu/ConnectionsBrowserNode">
+ <CommandItem id = "MonoQuery.Commands.MonoQueryCommands.AddConnection"/>
+ <SeparatorItem id = "ConnectionSeparator"/>
+ <CommandItem id = "MonoQuery.Commands.MonoQueryCommands.RefreshProviderList"/>
+ </Extension>
+
+ <Extension path = "/SharpDevelop/Views/DatabasePad/ContextMenu/ConnectionBrowserNode">
+ <CommandItem id = "MonoQuery.Commands.MonoQueryCommands.RemoveConnection"/>
+ <CommandItem id = "MonoQuery.Commands.MonoQueryCommands.DisconnectConnection"/>
+ <SeparatorItem id = "ConnectionSeparator"/>
+ <CommandItem id = "MonoQuery.Commands.MonoQueryCommands.RefreshConnection"/>
+ </Extension>
+
+</AddIn>
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.mdp
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.mdp 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.mdp 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,69 @@
+<Project name="MonoQuery" fileversion="2.0" language="C#" ctype="DotNetProject">
+ <Configurations>
+ <Configuration name="Debug" ctype="DotNetProjectConfiguration">
+ <Output directory="./bin/Debug" assembly="MonoQuery" />
+ <Build debugmode="True" target="Library" />
+ <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" />
+ <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
+ </Configuration>
+ <Configuration name="Release" ctype="DotNetProjectConfiguration">
+ <Output directory="./bin/Release" assembly="MonoQuery" />
+ <Build debugmode="False" target="Library" />
+ <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" />
+ <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
+ </Configuration>
+ </Configurations>
+ <References>
+ <ProjectReference type="Project" localcopy="True" refto="Mono.Data.Sql" />
+ <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.6.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.6.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="MonoDevelop.Base, Version=0.7.0.0, Culture=neutral" />
+ <ProjectReference type="Gac" localcopy="True" refto="MonoDevelop.Core, Version=0.7.0.0, Culture=neutral" />
+ <ProjectReference type="Gac" localcopy="True" refto="MonoDevelop.Gui.Widgets, Version=0.7.0.0, Culture=neutral" />
+ <ProjectReference type="Gac" localcopy="True" refto="gtksourceview-sharp, Version=1.0.0.2, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="glade-sharp, Version=2.6.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ </References>
+ <DeploymentInformation strategy="File">
+ <excludeFiles />
+ </DeploymentInformation>
+ <Contents>
+ <File name="./MonoQueryService.cs" subtype="Code" buildaction="Compile" />
+ <File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui" subtype="Directory" buildaction="Compile" />
+ <File name="./MonoQuery.addin.xml" subtype="Code" buildaction="Compile" />
+ <File name="./Commands" subtype="Directory" buildaction="Compile" />
+ <File name="./Gui/DatabasePad.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/SqlDefinitionPad.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/FakeNodes.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/AggregatesNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/ColumnNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/ColumnsNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/ConstraintNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/ConstraintsNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/DatabaseNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/GroupsNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/LanguagesNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/OperatorsNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/ProceduresNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/ProviderCollectionNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/RolesNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/RulesNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/SequencesNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/TableNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/TablesNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/TriggersNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/TypesNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/UsersNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/ViewNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/ViewsNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Commands/Commands.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/ConnectionDialog.cs" subtype="Code" buildaction="Compile" />
+ <File name="./monoquery.glade" subtype="Code" buildaction="EmbedAsResource" />
+ <File name="./Gui/DataGridView.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/ProcedureNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/DbProviderCollection.cs" subtype="Code" buildaction="Compile" />
+ <File name="./Gui/NodeBuilders/ParametersNodeBuilder.cs" subtype="Code" buildaction="Compile" />
+ </Contents>
+</Project>
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.mds
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.mds 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQuery.mds 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,16 @@
+<Combine name="MonoQuery" fileversion="2.0">
+ <Configurations>
+ <Configuration name="Debug" ctype="CombineConfiguration">
+ <Entry build="True" name="MonoQuery" />
+ </Configuration>
+ <Configuration name="Release" ctype="CombineConfiguration">
+ <Entry build="True" name="MonoQuery" />
+ </Configuration>
+ </Configurations>
+ <StartMode startupentry="MonoQuery" single="True">
+ <Execute type="None" entry="MonoQuery" />
+ </StartMode>
+ <Entries>
+ <Entry filename="./MonoQuery.mdp" />
+ </Entries>
+</Combine>
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQueryService.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQueryService.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/MonoQueryService.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,113 @@
+//
+// MonoQueryService.cs
+//
+// Authors:
+// Christian Hergert <chris at mosaix.net>
+//
+// Copyright (c) 2005 Christian Hergert
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.IO;
+using System.Reflection;
+using System.Xml.Serialization;
+
+using Mono.Data.Sql;
+
+using MonoDevelop.Services;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Gui.Pads;
+using MonoDevelop.Gui;
+
+namespace MonoQuery
+{
+ public class MonoQueryService : AbstractService
+ {
+ DbProviderCollection providers = null;
+ SqlDefinitionPad definitionPad = null;
+
+ static string serializedFile = Environment.GetFolderPath (
+ Environment.SpecialFolder.ApplicationData)
+ + System.IO.Path.DirectorySeparatorChar
+ + "MonoDevelop"
+ + System.IO.Path.DirectorySeparatorChar
+ + "MonoQuery-Providers.xml";
+
+ public MonoQueryService () : base () {}
+
+ public DbProviderCollection Providers {
+ get {
+ if (providers == null)
+ providers = new DbProviderCollection ();
+
+ return providers;
+ }
+ }
+
+ public Type[] ProviderTypes {
+ get {
+ ArrayList types = new ArrayList ();
+ Assembly asm = Assembly.GetAssembly (typeof (Mono.Data.Sql.DbProviderBase));
+ foreach (Type type in asm.GetTypes ()) {
+ if (type.IsSubclassOf (typeof (DbProviderBase)))
+ types.Add (type);
+ }
+ return (Type[]) types.ToArray (typeof (Type));
+ }
+ }
+
+ public SqlDefinitionPad SqlDefinitionPad {
+ get {
+ return definitionPad;
+ }
+ set {
+ definitionPad = value;
+ }
+ }
+
+ public override void InitializeService ()
+ {
+ if (File.Exists (serializedFile)) {
+ try {
+ using (FileStream fs = File.OpenRead (serializedFile)) {
+ XmlSerializer serializer
+ = new XmlSerializer (typeof (DbProviderCollection));
+ providers
+ = (DbProviderCollection) serializer.Deserialize (fs);
+ }
+ } catch (Exception e) {
+ Runtime.LoggingService.Error ("Invalid monoquery file.");
+ File.Delete (serializedFile);
+ }
+ }
+ }
+
+ public override void UnloadService ()
+ {
+ using (FileStream fs = new FileStream(serializedFile, FileMode.Create)) {
+ XmlSerializer serializer = new XmlSerializer (typeof (DbProviderCollection));
+ serializer.Serialize (fs, providers);
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/monoquery.glade
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/monoquery.glade 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery/monoquery.glade 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,591 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="newConnectionDialog">
+ <property name="border_width">6</property>
+ <property name="width_request">450</property>
+ <property name="height_request">400</property>
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">MonoDevelop</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="modal">True</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><span weight="bold" size="larger"><span size="larger">Create new connection</span></span></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">4</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">5</property>
+ <property name="left_padding">10</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkTable" id="table1">
+ <property name="border_width">5</property>
+ <property name="visible">True</property>
+ <property name="n_rows">7</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">3</property>
+ <property name="column_spacing">10</property>
+
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Provider</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Name</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Server</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Database</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">User ID</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Password</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="providersCombo">
+ <property name="visible">True</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="nameEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="serverEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="OnChanged" last_modification_time="Wed, 29 Jun 2005 00:24:28 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="databaseEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="OnChanged" last_modification_time="Wed, 29 Jun 2005 00:24:39 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="useridEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="OnChanged" last_modification_time="Wed, 29 Jun 2005 00:24:47 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="passwordEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="OnChanged" last_modification_time="Wed, 29 Jun 2005 00:24:53 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Other</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="otherEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="OnChanged" last_modification_time="Wed, 29 Jun 2005 00:25:02 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkExpander" id="expander1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="expanded">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">10</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Connection String</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">3</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="connectionStringTextView">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="overwrite">False</property>
+ <property name="accepts_tab">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_NONE</property>
+ <property name="cursor_visible">True</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Advanced</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
Deleted: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.addin.xml.in
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.addin.xml.in 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.addin.xml.in 2005-08-02 20:35:00 UTC (rev 2701)
@@ -1,254 +0,0 @@
-<AddIn name = "MonoQuery"
- author = "Christian Hergert, Denis ERCHOFF of SharpQuery"
- copyright = "GPL"
- url = "http://www.monodevelop.com"
- description = "MonoQuery"
- version = "0.0.1">
-
- <Runtime>
- <Import assembly="MonoQuery.dll"/>
- </Runtime>
-
- <Extension path = "/Workspace/Services">
- <Class id = "MonoQueryService"
- class = "MonoQuery.Services.MonoQueryService"/>
- </Extension>
-
- <Extension path = "/MonoQuery/Connection">
-
- <Class id = "NpgsqlConnectionWrapper"
- class = "MonoQuery.Connection.NpgsqlConnectionWrapper"/>
- <!--
- <Class id = "MysqlConnectionWrapper"
- class = "MonoQuery.Connection.MysqlConnectionWrapper"/>
- -->
- <Class id = "OledbConnectionWrapper"
- class = "MonoQuery.Connection.OLEDBConnectionWrapper"/>
-
- <MonoQueryConnection id ="Column"
- schema="MonoQuery.SchemaClass.MonoQueryColumn"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeColumn"
- showUnsuported = "False"/>
-
- <MonoQueryConnection id ="Parameter"
- schema="MonoQuery.SchemaClass.MonoQueryParameter"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeParameter"
- showUnsuported = "False"/>
-
- <MonoQueryConnection id ="Procedure"
- schema="MonoQuery.SchemaClass.MonoQueryProcedure"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeProcedure"
- showUnsuported = "False"/>
-
- <MonoQueryConnection id ="Table"
- schema="MonoQuery.SchemaClass.MonoQueryTable"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeTable"
- showUnsuported = "False"/>
-
- <MonoQueryConnection id ="View"
- schema="MonoQuery.SchemaClass.MonoQueryView"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeView"
- showUnsuported = "False"/>
-
- <MonoQueryConnection id ="NotSupported"
- schema="MonoQuery.SchemaClass.MonoQueryNotSupported"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeNotSupported"
- showUnsuported = "False"/>
-
- <MonoQueryConnection id ="Tables"
- schema="MonoQuery.SchemaClass.MonoQueryTables"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeTableRoot"
- showUnsuported = "False"/>
-
- <MonoQueryConnection id ="Views"
- schema="MonoQuery.SchemaClass.MonoQueryViews"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeViewRoot"
- showUnsuported = "False"/>
-
- <MonoQueryConnection id ="Procedures"
- schema="MonoQuery.SchemaClass.MonoQueryProcedures"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeProcedureRoot"
- showUnsuported = "False"/>
-
- <MonoQueryConnection id ="Schema"
- schema="MonoQuery.SchemaClass.MonoQuerySchema"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeSchema"
- showUnsuported = "False"/>
-
- <MonoQueryConnection id ="Catalog"
- schema="MonoQuery.SchemaClass.MonoQueryCatalog"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeCatalog"
- showUnsuported = "False"/>
-
- <MonoQueryConnection id ="Npgsql"
- schema="MonoQuery.Connection.NpgsqlConnectionWrapper"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeConnection"
- description = "PostgreSQL 7.x Database Server"
- showUnsuported = "False"/>
- <MonoQueryConnection id ="Mysql"
- schema="MonoQuery.Connection.MysqlConnectionWrapper"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeConnection"
- description = "MySQL Database Server"
- showUnsuported = "False"/>
- @SQLITE_XML@
-
-<!--
- <MonoQueryConnection id ="OLEDB"
- schema="MonoQuery.Connection.OLEDBConnectionWrapper"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeConnection"
- description = "OleDB Connection Provider"
- showUnsuported = "False"/>
- <MonoQueryConnection id ="ADO"
- schema="MonoQuery.Connection.ADOConnectionWrapper"
- node ="MonoQuery.Gui.TreeView.MonoQueryNodeConnection"
- showUnsuported = "False"/>
--->
- </Extension>
-
- <Extension path = "/SharpDevelop/Workbench/Views">
- <Class id = "MonoQuery"
- insertafter = "HelpBrowser"
- class = "MonoQuery.Pads.MonoQueryView"/>
- </Extension>
-
- <Extension path = "/MonoQuery/ContextMenu/DatabaseRoot">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
- <MenuItem id = "Separator1"
- _label = "-" />
- <MenuItem id = "AddConnection"
- _label = "Add Connection"
- icon = "MonoQuery.Addconnection"
- class = "MonoQuery.Commands.MonoQueryAddconnectionCommand"/>
-
- </Extension>
-
- <Extension path = "/MonoQuery/ContextMenu/DatabaseConnection">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
- <MenuItem id = "ShowSqlView"
- _label = "Show SQL View"
- class = "MonoQuery.Commands.MonoQueryShowSqlViewCommand"/>
- <MenuItem id = "Separator1"
- _label = "-" />
- <MenuItem id = "Supprimer"
- _label = "Remove"
- icon="Icons.16x16.Remove"
- class = "MonoQuery.Commands.MonoQueryRemoveConnectionCommand"/>
- <MenuItem id = "Separator2"
- _label = "-" />
-<!-- No Glade Druid made yet
- <MenuItem id = "ModifyConnection"
- _label = "Modify Connection"
- icon="Icons.16x16.Edit"
- class = "MonoQuery.Commands.MonoQueryModifyConnectionCommand"/>
--->
- <MenuItem id = "Disconnect"
- _label = "Disconnect"
- icon = "MonoQuery.Disconnect"
- class = "MonoQuery.Commands.MonoQueryDisconnectCommand"/>
- <MenuItem id = "Connect"
- _label = "Connect"
- icon = "MonoQuery.Connect"
- class = "MonoQuery.Commands.MonoQueryConnectCommand"/>
- </Extension>
-
- <Extension path = "/MonoQuery/ContextMenu/TablesRoot">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
- </Extension>
-
- <Extension path = "/MonoQuery/ContextMenu/ViewsRoot">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
- </Extension>
-
- <Extension path = "/MonoQuery/ContextMenu/ProceduresRoot">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
- </Extension>
-
-
- <Extension path = "/MonoQuery/ContextMenu/Table">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
- <MenuItem id = "ExtractData"
- _label = "Extract Data"
- icon = "Icons.16x16.PreView"
- class = "MonoQuery.Commands.MonoQueryExecuteCommand"/>
- </Extension>
-
- <Extension path = "/MonoQuery/ContextMenu/View">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
- <MenuItem id = "ExtractData"
- _label = "Extract Data"
- icon = "Icons.16x16.PreView"
- class = "MonoQuery.Commands.MonoQueryExecuteCommand"/>
- </Extension>
-
-
- <Extension path = "/MonoQuery/ContextMenu/Procedure">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
-<!--
- <MenuItem id = "ExecuteProcedure"
- _label = "Execute Procedure"
- class = "MonoQuery.Commands.MonoQueryExecuteCommand"/>
--->
- </Extension>
-
-
- <Extension path = "/MonoQuery/ContextMenu/Coulmn">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
- </Extension>
-
- <Extension path = "/MonoQuery/ContextMenu/Parameter">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
- </Extension>
-
- <Extension path = "/MonoQuery/ContextMenu/Catalog">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
- </Extension>
-
- <Extension path = "/MonoQuery/ContextMenu/Schema">
- <MenuItem id = "Refresh"
- _label = "Refresh"
- icon = "Icons.16x16.BrowserRefresh"
- class = "MonoQuery.Commands.MonoQueryRefreshCommand"/>
- </Extension>
-
- <Extension path = "/SharpDevelop/Workbench/Pads">
- <Pad id = "MonoQuery.Pads.MonoQueryView" class = "MonoQuery.Pads.MonoQueryView"/>
- </Extension>
-
- <Extension path = "/SharpDevelop/Workbench/Contexts/Edit">
- <ContextPad id = "MonoQuery.Pads.MonoQueryView" />
- </Extension>
-</AddIn>
-
Deleted: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.cmbx
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.cmbx 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.cmbx 2005-08-02 20:35:00 UTC (rev 2701)
@@ -1,16 +0,0 @@
-<Combine name="MonoQuery" fileversion="2.0" outputpath="./">
- <Configurations active="Debug">
- <Configuration name="Release" ctype="CombineConfiguration">
- <Entry name="MonoQuery" configurationname="Debug" build="False" />
- </Configuration>
- <Configuration name="Debug" ctype="CombineConfiguration">
- <Entry name="MonoQuery" configurationname="Debug" build="False" />
- </Configuration>
- </Configurations>
- <StartMode startupentry="MonoQuery" single="True">
- <Execute type="None" entry="MonoQuery" />
- </StartMode>
- <Entries>
- <Entry filename="./MonoQuery.prjx" />
- </Entries>
-</Combine>
\ No newline at end of file
Deleted: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.mdsx
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.mdsx 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.mdsx 2005-08-02 20:35:00 UTC (rev 2701)
@@ -1,3 +0,0 @@
-<MonoDevelopSolution fileversion="1.0">
- <RelativeOutputPath>./</RelativeOutputPath>
-</MonoDevelopSolution>
\ No newline at end of file
Deleted: trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.prjx
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.prjx 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQuery.prjx 2005-08-02 20:35:00 UTC (rev 2701)
@@ -1,87 +0,0 @@
-<Project name="MonoQuery" fileversion="2.0" language="C#" ctype="DotNetProject">
- <Configurations active="Debug">
- <Configuration name="Debug" ctype="DotNetProjectConfiguration">
- <Output directory="../bin/Debug" assembly="MonoQuery" />
- <Build executeBeforeBuild="./" executeAfterBuild="./" debugmode="True" target="Library" />
- <Execution executeScript="./" runwithwarnings="False" consolepause="True" runtime="MsNet" />
- <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" win32Icon="./" ctype="CSharpCompilerParameters" />
- </Configuration>
- <Configuration name="Release" ctype="DotNetProjectConfiguration">
- <Output directory="../bin/Release" assembly="MonoQuery" />
- <Build executeBeforeBuild="./" executeAfterBuild="./" debugmode="True" target="Library" />
- <Execution executeScript="./" runwithwarnings="False" consolepause="True" runtime="MsNet" />
- <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" win32Icon="./" ctype="CSharpCompilerParameters" />
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference type="Gac" localcopy="True" refto="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <ProjectReference type="Gac" localcopy="True" refto="Npgsql, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
- <ProjectReference type="Gac" localcopy="True" refto="glade-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <ProjectReference type="Gac" localcopy="True" refto="ByteFX.Data, Version=0.7.6.1, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
- <ProjectReference type="Gac" localcopy="True" refto="gtksourceview-sharp, Version=1.0.0.1, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <ProjectReference type="Assembly" localcopy="True" refto="../../build/bin/MonoDevelop.Base.dll" />
- <ProjectReference type="Assembly" localcopy="True" refto="../../build/bin/MonoDevelop.Core.dll" />
- <ProjectReference type="Assembly" localcopy="True" refto="../../build/bin/MonoDevelop.Gui.Widgets.dll" />
- <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <ProjectReference type="Gac" localcopy="True" refto="gtksourceview-sharp, Version=1.0.0.2, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- </References>
- <DeploymentInformation strategy="File">
- <excludeFiles />
- </DeploymentInformation>
- <Contents>
- <File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
- <File name="./MonoQueryView.cs" subtype="Code" buildaction="Compile" />
- <File name="./Gui" subtype="Directory" buildaction="Compile" />
- <File name="./Gui/MonoQueryPanel.cs" subtype="Code" buildaction="Compile" />
- <File name="./Gui/MonoQueryTree/MonoQueryTree.cs" subtype="Code" buildaction="Compile" />
- <File name="./Gui/MonoQueryTree" subtype="Directory" buildaction="Compile" />
- <File name="./Gui/MonoQueryTree/MonoQueryNodesRoot.cs" subtype="Code" buildaction="Compile" />
- <File name="./SchemaClass/MonoQuerySchemaClass.cs" subtype="Code" buildaction="Compile" />
- <File name="./Commands" subtype="Directory" buildaction="Compile" />
- <File name="./Commands/MonoQueryCommands.cs" subtype="Code" buildaction="Compile" />
- <File name="./Collection" subtype="Directory" buildaction="Compile" />
- <File name="./Gui/Interface/IMonoQueryNode.cs" subtype="Code" buildaction="Compile" />
- <File name="./Gui/Abstract/AbstractMonoQueryNode.cs" subtype="Code" buildaction="Compile" />
- <File name="./Gui/MonoQueryTree/MonoQueryDataNodes.cs" subtype="Code" buildaction="Compile" />
- <File name="./Gui/Interface" subtype="Directory" buildaction="Compile" />
- <File name="./Gui/DataView" subtype="Directory" buildaction="Compile" />
- <File name="./Gui/DataView/MonoQueryDataView.cs" subtype="Code" buildaction="Compile" />
- <File name="./Connection" subtype="Directory" buildaction="Compile" />
- <File name="./Collection/MonoQueryStringDictionary.cs" subtype="Code" buildaction="Compile" />
- <File name="./SchemaClass/Abstract/AbstractMonoQuerySchemaClass.cs" subtype="Code" buildaction="Compile" />
- <File name="./Connection/Abstract/AbstractMonoQueryConnectionWrapper.cs" subtype="Code" buildaction="Compile" />
- <File name="./Codons" subtype="Directory" buildaction="Compile" />
- <File name="./Codons/MonoQueryConnectionCodon.cs" subtype="Code" buildaction="Compile" />
- <File name="./MonoQuery.addin.xml" subtype="Code" buildaction="Nothing" />
- <File name="./Connection/Interface" subtype="Directory" buildaction="Compile" />
- <File name="./SchemaClass/Interface/ISchemaClass.cs" subtype="Code" buildaction="Compile" />
- <File name="./Collection/MonoQuerySchemaClassCollection.cs" subtype="Code" buildaction="Compile" />
- <File name="./Connection/Interface/IConnection.cs" subtype="Code" buildaction="Compile" />
- <File name="./Collection/MonoQueryListDictionary.cs" subtype="Code" buildaction="Compile" />
- <File name="./Commands/Abstract/AbstractMonoQueryCommand.cs" subtype="Code" buildaction="Compile" />
- <File name="./SchemaClass" subtype="Directory" buildaction="Compile" />
- <File name="./SchemaClass/Interface" subtype="Directory" buildaction="Compile" />
- <File name="./Gui/DataView/SQLParameterInput.cs" subtype="Code" buildaction="Compile" />
- <File name="./Exceptions" subtype="Directory" buildaction="Compile" />
- <File name="./Exceptions/ConnectionStringException.cs" subtype="Code" buildaction="Compile" />
- <File name="./Exceptions/OpenConnectionException.cs" subtype="Code" buildaction="Compile" />
- <File name="./Exceptions/ExecuteSQLException.cs" subtype="Code" buildaction="Compile" />
- <File name="./Exceptions/ExecuteProcedureException.cs" subtype="Code" buildaction="Compile" />
- <File name="./Exceptions/Abstract/MonoQueryAbstractException.cs" subtype="Code" buildaction="Compile" />
- <File name="./Collection/MonoQueryParameterCollection.cs" subtype="Code" buildaction="Compile" />
- <File name="./Gui/Forms" subtype="Directory" buildaction="Compile" />
- <File name="./Gui/Forms/CreateConnectionDruid.cs" subtype="Code" buildaction="Compile" />
- <File name="./Services" subtype="Directory" buildaction="Compile" />
- <File name="./Services/MonoQueryService.cs" subtype="Code" buildaction="Compile" />
- <File name="./Connection/Npgsql" subtype="Directory" buildaction="Compile" />
- <File name="./Connection/Npgsql/NpgsqlConnectionWrapper.cs" subtype="Code" buildaction="Compile" />
- <File name="./Gui/Forms/New Folder" subtype="Directory" buildaction="Compile" />
- <File name="./Gui/Forms/Glade/monoquery.glade" subtype="Code" buildaction="Nothing" />
- <File name="./Connection/Mysql/MysqlConnectionWrapper.cs" subtype="Code" buildaction="Compile" />
- <File name="./Collection/ConnectionProviderDescriptor.cs" subtype="Code" buildaction="Compile" />
- <File name="./Gui/SqlQueryView" subtype="Directory" buildaction="Compile" />
- <File name="./Gui/SqlQueryView/SqlQueryView.cs" subtype="Code" buildaction="Compile" />
- <File name="./Connection/Sqlite" subtype="Directory" buildaction="Compile" />
- <File name="./Connection/Sqlite/SqliteConnectionWrapper.cs" subtype="Code" buildaction="Nothing" />
- </Contents>
-</Project>
\ No newline at end of file
Deleted: trunk/MonoDevelop/Extras/MonoQuery/MonoQueryView.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/MonoQueryView.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/MonoQueryView.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -1,85 +0,0 @@
-
-using System;
-using System.Xml;
-using System.Xml.Serialization;
-using System.IO;
-
-using MonoDevelop.Gui;
-using MonoQuery.Gui;
-using MonoQuery.Gui.TreeView;
-using MonoQuery.Services;
-
-using MonoDevelop.Core.Services;
-using MonoDevelop.Services;
-using MonoDevelop.Core.AddIns;
-
-//TODO : dans les MonoQueryList faire correspondre les restrictions vec les objets ajoutés
-//TODO : dans les MonoQueryList faire correspondre les dataconnection avec les objets ajoutés
-//TODO : ajout statistiques.
-
-namespace MonoQuery.Pads
-{
- /// <summary>
- /// This Pad Show a tree where you can add/remove databases connections.
- /// You can administrate databases from this tree.
- /// </summary>
- public class MonoQueryView : AbstractPadContent
- {
- private static MonoQueryTree monoQueryTree = null;
- private static Gtk.ScrolledWindow scroller = null;
-#region AbstractPadContent requirements
- public override Gtk.Widget Control {
- get {
- return scroller;
- }
- }
-
- /// <summary>
- /// Creates a new MonoQueryView object
- /// </summary>
- public MonoQueryView()
- : base( GettextCatalog.GetString( "Database" ), "md-mono-query-database")
- {
- CreateDefaultMonoQuery();
-// monoQueryTree.Dock = DockStyle.Fill;
- }
-
- void CreateDefaultMonoQuery()
- {
- scroller = new Gtk.ScrolledWindow();
- scroller.ShadowType = Gtk.ShadowType.In;
- monoQueryTree = new MonoQueryTree();
- scroller.Add( monoQueryTree );
-
- MonoQueryService service = (MonoQueryService)ServiceManager.GetService(
- typeof(MonoQueryService));
- service.Tree = monoQueryTree;
- Control.ShowAll ();
- }
-
- public void SaveMonoQueryView()
- {
- }
-
- /// <summary>
- /// Refreshes the pad
- /// </summary>
- public override void RedrawContent()
- {
- OnTitleChanged(null);
- OnIconChanged(null);
-// monoQueryTree.Refresh();
- }
-
- /// <summary>
- /// Cleans up all used resources
- /// </summary>
- public override void Dispose()
- {
- this.SaveMonoQueryView();
- monoQueryTree.Dispose();
- }
-#endregion
- }
-
-}
Added: trunk/MonoDevelop/Extras/MonoQuery/tests/CreateProviderTests.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/tests/CreateProviderTests.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/tests/CreateProviderTests.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,53 @@
+//
+// This test aims to test as much of the NpgsqlDbProvider as possbile.
+// It requires a local setup of postgres with user and db chris and
+// the connection should be trusted via 127.0.0.1. A script may be
+// provided at some point to make these tests possible by others.
+//
+
+using System;
+
+using NUnit.Framework;
+using Mono.Data.Sql;
+
+namespace Mono.Data.Sql.Tests
+{
+ [TestFixture]
+ public class CreateProviderTests
+ {
+ public CreateProviderTests ()
+ {
+ }
+
+ [TestFixtureSetUp]
+ public void Initialize()
+ {
+ }
+
+ [TestFixtureTearDown]
+ public void Dispose()
+ {
+ }
+
+ [Test]
+ public void CreateNpgsqlProvider ()
+ {
+ NpgsqlDbProvider provider = new NpgsqlDbProvider ();
+ Assert.IsNotNull (provider);
+ }
+
+ [Test]
+ public void CreateMySqlProvider ()
+ {
+ MySqlDbProvider provider = new MySqlDbProvider ();
+ Assert.IsNotNull (provider);
+ }
+
+ [Test]
+ public void CreateSqliteProvider ()
+ {
+ SqliteDbProvider provider = new SqliteDbProvider ();
+ Assert.IsNotNull (provider);
+ }
+ }
+}
Added: trunk/MonoDevelop/Extras/MonoQuery/tests/Mono.Data.Sql.Tests.mdp
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/tests/Mono.Data.Sql.Tests.mdp 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/tests/Mono.Data.Sql.Tests.mdp 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,27 @@
+<Project name="Mono.Data.Sql.Tests" fileversion="2.0" language="C#" ctype="DotNetProject">
+ <Configurations active="Debug">
+ <Configuration name="Debug" ctype="DotNetProjectConfiguration">
+ <Output directory="./bin/Debug" assembly="Mono.Data.Sql.Tests" />
+ <Build debugmode="True" target="Library" />
+ <Execution runwithwarnings="False" consolepause="True" runtime="MsNet" />
+ <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
+ </Configuration>
+ <Configuration name="Release" ctype="DotNetProjectConfiguration">
+ <Output directory="./bin/Release" assembly="Mono.Data.Sql.Tests" />
+ <Build debugmode="False" target="Library" />
+ <Execution runwithwarnings="False" consolepause="True" runtime="MsNet" />
+ <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
+ </Configuration>
+ </Configurations>
+ <References>
+ <ProjectReference type="Project" localcopy="True" refto="Mono.Data.Sql" />
+ <ProjectReference type="Gac" localcopy="True" refto="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
+ </References>
+ <DeploymentInformation strategy="File">
+ <excludeFiles />
+ </DeploymentInformation>
+ <Contents>
+ <File name="./CreateProviderTests.cs" subtype="Code" buildaction="Compile" />
+ <File name="./NpgsqlTablesTest.cs" subtype="Code" buildaction="Compile" />
+ </Contents>
+</Project>
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/tests/NpgsqlTablesTest.cs
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/tests/NpgsqlTablesTest.cs 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/tests/NpgsqlTablesTest.cs 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,33 @@
+//
+// This test should try to load tables and check their contents for npgsql.
+//
+
+using System;
+
+using Mono.Data.Sql;
+using NUnit.Framework;
+
+namespace Mono.Data.Sql.Tests
+{
+ [TestFixture]
+ public class NpgsqlTablesTest
+ {
+ NpgsqlDbProvider provider = null;
+
+ [TestFixtureSetUp]
+ public void SetUp ()
+ {
+ provider = new NpgsqlDbProvider ();
+ provider.ConnectionString =
+ "Server=localhost;User ID=chris;Database=chris;";
+ provider.Open ();
+ }
+
+ [Test]
+ public void GetTablesTest ()
+ {
+ TableSchema[] tables = provider.GetTables ();
+ Assert.IsTrue (tables.Length > 0);
+ }
+ }
+}
\ No newline at end of file
Added: trunk/MonoDevelop/Extras/MonoQuery/tests/pgsql.sql
===================================================================
--- trunk/MonoDevelop/Extras/MonoQuery/tests/pgsql.sql 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/Extras/MonoQuery/tests/pgsql.sql 2005-08-02 20:35:00 UTC (rev 2701)
@@ -0,0 +1,15 @@
+--
+-- pgsql.sql: Database for Npgsql Tests on PostgreSQL.
+--
+-- Authors:
+-- Christian Hergert (christian.hergert at gmail.com)
+--
+
+CREATE TABLE users (
+ id serial NOT NULL PRIMARY KEY,
+ email varchar(100) NOT NULL UNIQUE,
+ password varchar(32) NOT NULL DEFAULT md5(''),
+ firstname varchar(30) NOT NULL,
+ lastname varchar(30),
+ created timestamp DEFAULT CURRENT_TIMESTAMP
+);
\ No newline at end of file
Modified: trunk/MonoDevelop/build/data/resources/icons/Makefile.am
===================================================================
--- trunk/MonoDevelop/build/data/resources/icons/Makefile.am 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/build/data/resources/icons/Makefile.am 2005-08-02 20:35:00 UTC (rev 2701)
@@ -324,6 +324,10 @@
MonoQuery.Disconnect \
MonoQuery.Procedure \
MonoQuery.Table \
+MonoQuery.User \
+MonoQuery.DateTime \
+MonoQuery.ColumnFK \
+MonoQuery.ColumnPK \
MonoQuery.Tables \
MonoQuery.View
Added: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.Column
===================================================================
(Binary files differ)
Property changes on: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.Column
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.ColumnFK
===================================================================
(Binary files differ)
Property changes on: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.ColumnFK
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.ColumnPK
===================================================================
(Binary files differ)
Property changes on: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.ColumnPK
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.Database
===================================================================
(Binary files differ)
Added: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.DateTime
===================================================================
(Binary files differ)
Property changes on: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.DateTime
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.Table
===================================================================
(Binary files differ)
Modified: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.Tables
===================================================================
(Binary files differ)
Added: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.User
===================================================================
(Binary files differ)
Property changes on: trunk/MonoDevelop/build/data/resources/icons/MonoQuery.User
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/MonoDevelop/configure.in
===================================================================
--- trunk/MonoDevelop/configure.in 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/configure.in 2005-08-02 20:35:00 UTC (rev 2701)
@@ -163,16 +163,6 @@
enable_update_desktopdb=yes)
AM_CONDITIONAL(ENABLE_UPDATE_DESKTOPDB, test x$enable_update_desktopdb = xyes)
-dnl MonoQuery
-PKG_CHECK_MODULES(MONOQUERY_DEPENDENCIES_SQLITE,mono >= 1.1.2.99, enable_monoquery_sqlite=yes, enable_monoquery_sqlite=no)
-AM_CONDITIONAL(ENABLE_MONOQUERY_SQLITE, test x$enable_monoquery_sqlite = xyes)
-
-if test "x$enable_monoquery_sqlite" = "xyes" ; then
-SQLITE_XML='<MonoQueryConnection id="Sqlite" schema="MonoQuery.Connection.SqliteConnectionWrapper" node="MonoQuery.Gui.TreeView.MonoQueryNodeConnection" description="SQLite Database Server" showUnsuported="False"/>'
-else
-SQLITE_XML=
-fi
-
dnl Intl
ALL_LINGUAS="cs da de es fr ja_JP pt_BR tr pl"
GETTEXT_PACKAGE=monodevelop
@@ -243,7 +233,8 @@
Extras/Makefile
Extras/MonoDeveloperExtensions/Makefile
Extras/MonoQuery/Makefile
-Extras/MonoQuery/MonoQuery.addin.xml
+Extras/MonoQuery/Mono.Data.Sql/Makefile
+Extras/MonoQuery/MonoQuery/Makefile
Extras/NUnit/Makefile
Extras/VersionControl/AddIn/Makefile
Extras/VersionControl/Diff/Makefile
@@ -265,7 +256,9 @@
echo " * MonoQuery Providers:"
echo " * PostgreSQL: yes"
echo " * MySQL: yes"
-echo " * SQLite: $enable_monoquery_sqlite"
+echo " * SQLite: yes"
+echo " * Oracle: yes"
+echo " * SQL Server: yes"
echo " * java support: $enable_java"
echo " * boo support: $enable_boo"
echo " * NUnit support: $enable_nunit"
Modified: trunk/MonoDevelop/po/POTFILES.in
===================================================================
--- trunk/MonoDevelop/po/POTFILES.in 2005-08-01 19:10:24 UTC (rev 2700)
+++ trunk/MonoDevelop/po/POTFILES.in 2005-08-02 20:35:00 UTC (rev 2701)
@@ -109,16 +109,6 @@
Core/src/MonoDevelop.Base/Internal/Templates/ProjectTemplates/ProjectTemplate.cs
Core/src/MonoDevelop.Core/Services/FileUtilityService.cs
Core/src/MonoDevelop.Gui.Widgets/FileSelector/FileSelector.cs
-Extras/MonoQuery/Gui/Forms/CreateConnectionDruid.cs
-Extras/MonoQuery/Gui/MonoQueryTree/MonoQueryNodesRoot.cs
-Extras/MonoQuery/MonoQueryView.cs
-Extras/MonoQuery/Exceptions/ConnectionStringException.cs
-Extras/MonoQuery/Exceptions/ExecuteSQLException.cs
-Extras/MonoQuery/Exceptions/ExecuteProcedureException.cs
-Extras/MonoQuery/Exceptions/OpenConnectionException.cs
-Extras/MonoQuery/SchemaClass/MonoQuerySchemaClass.cs
-Extras/MonoQuery/Collection/MonoQueryListDictionary.cs
-Extras/MonoQuery/Collection/MonoQueryStringDictionary.cs
Extras/JavaBinding/templates/EmptyJavaFile.xft.xml
Extras/JavaBinding/templates/EmptyJavaProject.xpt.xml
Extras/JavaBinding/templates/IkvmConsoleApplicationProject.xpt.xml
More information about the Monodevelop-patches-list
mailing list