Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move to old-code

svn path=/old-code/; revision=156228
  • Loading branch information...
commit 3e9691ca97ec3e3afdade49fb1aa169e2460e39d 1 parent c043e26
@migueldeicaza migueldeicaza authored
Showing with 10,170 additions and 0 deletions.
  1. +3 −0  sqlsharpgtk/AUTHORS
  2. +493 −0 sqlsharpgtk/ChangeLog
  3. +48 −0 sqlsharpgtk/INSTALL
  4. +29 −0 sqlsharpgtk/Makefile.am
  5. +1 −0  sqlsharpgtk/NEWS
  6. +121 −0 sqlsharpgtk/README
  7. +100 −0 sqlsharpgtk/TODO
  8. +84 −0 sqlsharpgtk/autogen.sh
  9. +15 −0 sqlsharpgtk/browser/AssemblyInfo.cs.in
  10. +201 −0 sqlsharpgtk/browser/FirebirdMetaData.cs
  11. +24 −0 sqlsharpgtk/browser/IMetaData.cs
  12. +47 −0 sqlsharpgtk/browser/Makefile.am
  13. +123 −0 sqlsharpgtk/browser/MetaProcedure.cs
  14. +114 −0 sqlsharpgtk/browser/MetaProcedureArgument.cs
  15. +153 −0 sqlsharpgtk/browser/MetaProcedureArgumentCollection.cs
  16. +174 −0 sqlsharpgtk/browser/MetaProcedureCollection.cs
  17. +73 −0 sqlsharpgtk/browser/MetaTable.cs
  18. +165 −0 sqlsharpgtk/browser/MetaTableCollection.cs
  19. +216 −0 sqlsharpgtk/browser/MetaTableColumn.cs
  20. +204 −0 sqlsharpgtk/browser/MetaTableColumnCollection.cs
  21. +82 −0 sqlsharpgtk/browser/MetaView.cs
  22. +165 −0 sqlsharpgtk/browser/MetaViewCollection.cs
  23. +193 −0 sqlsharpgtk/browser/MySqlMetaData.cs
  24. +398 −0 sqlsharpgtk/browser/OracleMetaData.cs
  25. +200 −0 sqlsharpgtk/browser/PostgreSqlMetaData.cs
  26. +111 −0 sqlsharpgtk/browser/SchemaBrowser.cs
  27. +211 −0 sqlsharpgtk/browser/SqlMetaData.cs
  28. +78 −0 sqlsharpgtk/browser/SqliteMetaData.cs
  29. +193 −0 sqlsharpgtk/browser/SybaseMetaData.cs
  30. +72 −0 sqlsharpgtk/configure.ac
  31. +2 −0  sqlsharpgtk/sqlsharpgtk.sh.in
  32. +88 −0 sqlsharpgtk/sqlsharpgtk/AboutDialog.cs
  33. +15 −0 sqlsharpgtk/sqlsharpgtk/AssemblyInfo.cs.in
  34. +23 −0 sqlsharpgtk/sqlsharpgtk/BatchExecuteMode.cs
  35. +317 −0 sqlsharpgtk/sqlsharpgtk/ChangeLog
  36. +66 −0 sqlsharpgtk/sqlsharpgtk/ComboHelper.cs
  37. +225 −0 sqlsharpgtk/sqlsharpgtk/ConnectionString.cs
  38. +542 −0 sqlsharpgtk/sqlsharpgtk/DataGrid.cs
  39. +132 −0 sqlsharpgtk/sqlsharpgtk/DataGridColumn.cs
  40. +87 −0 sqlsharpgtk/sqlsharpgtk/DataSourceConnection.cs
  41. +182 −0 sqlsharpgtk/sqlsharpgtk/DataSourceConnectionCollection.cs
  42. +92 −0 sqlsharpgtk/sqlsharpgtk/DataTree.cs
  43. +30 −0 sqlsharpgtk/sqlsharpgtk/EditorTab.cs
  44. +26 −0 sqlsharpgtk/sqlsharpgtk/ExecuteOutputType.cs
  45. +93 −0 sqlsharpgtk/sqlsharpgtk/FileSelectionDialog.cs
  46. +499 −0 sqlsharpgtk/sqlsharpgtk/LoginDialog.cs
  47. +36 −0 sqlsharpgtk/sqlsharpgtk/Makefile.am
  48. +63 −0 sqlsharpgtk/sqlsharpgtk/MultiResultsGrid.cs
  49. +21 −0 sqlsharpgtk/sqlsharpgtk/OutputResults.cs
  50. +22 −0 sqlsharpgtk/sqlsharpgtk/QueryMode.cs
  51. +798 −0 sqlsharpgtk/sqlsharpgtk/SqlEditorSharp.cs
  52. +223 −0 sqlsharpgtk/sqlsharpgtk/SqlSharpDataAdapter.cs
  53. +2,403 −0 sqlsharpgtk/sqlsharpgtk/sqlsharpgtk.cs
  54. +94 −0 sqlsharpgtk/sqlsharpgtk/sqlsharpgtk.exe.config
View
3  sqlsharpgtk/AUTHORS
@@ -0,0 +1,3 @@
+Authors:
+ Daniel Morgan <monodanmorg@yahoo.com>
+
View
493 sqlsharpgtk/ChangeLog
@@ -0,0 +1,493 @@
+2008-02-26 Daniel Morgan <monodanmorg@yahoo.com>
+
+ * configure.ac: use gmcs instead of
+ mcs to build because sqlsharpgtk needs the
+ NET_2_0 prfile.
+ * README: add comment about using gmcs
+
+2007-01-01 Daniel Morgan <monodanmorg@yahoo.com>
+
+ * autogen.sh
+ * configure.ac
+ * Makefile.am
+ * aclocal.m4
+ * NEWS
+ * AUTHORS
+ * browser/Makefile.am
+ * browser/AssemblyInfo.cs.in
+ * sqlsharpgtk/Makefile.am
+ * sqlsharpgtk/AssemblyInfo.cs.in: add files
+ for autotools support
+
+ * Makefile
+ * browser/Makefile
+ * browser/AssemblyInfo.cs
+ * sqlsharpgtk/Makefile
+ * sqlsharpgtk/AssemblyInfo.cs: deleted files
+ to support autotools
+
+ * README.TXT --> README
+ * INSTALL.TXT --> INSTALL: renamed files
+ to support autotools
+
+ * TODO.TXT --> TODO: renamed file
+
+ * sqlsharpgtk/EditorTab.cs: support multiple result
+ grids in one execution
+
+ * MultiResultsGrid.cs: added new widget
+ for handling multiple results as multiple grids
+
+ * DataGridColumn.cs: put DataGridColumn
+ from DataGrid.cs into its own file.
+ and add support for formatting of dates
+ and right-justification of numeric
+ data types
+
+ * DataGrid.cs: add support for formatting
+ of dates and justification of numeric
+ data types
+
+ * sqlsharpgtk.cs: changes to support one execution
+ can have multiple results and show all these results
+ via a new widget that can show multiple grids,
+ do not load all meta data at once in connection tree view - load them on-demand,
+ and allow meta data to be refreshed, and fix Tooltips to work
+
+ * sqlsharpgtk.exe.config.in: app settings file should
+ explicitly use the fully qualified assembly name of Mono.Data
+
+ * DbProvider.cs
+ * DbProviderCollection.cs: delete obsolete files
+
+2005-12-26 Daniel Morgan <danielmorgan@verizon.net>
+
+ * browser/MetaProcedureArgument.cs
+ * browser/MetaProcedureArgumentCollection.cs: add new files
+ for listing parameters of a stored procedure
+
+2005-12-26 Daniel Morgan <danielmorgan@verizon.net>
+
+ * browser/MetaProcedureCollection.cs: add method
+ GetProcedures to return an array of MetaProcedure
+ for a given procedure name to support Oracle stored
+ packages which can contain overloaded procedures
+ and functions
+
+ * browser/MetaProcedure.cs: modified:
+ - list stored procedure arguments
+ - provide a way to list procedures and functions in
+ an Oracle package via collection Procedures,
+ a way needed needed to indicate if this
+ instance of MetaProcedure contained Procedures
+ via property HasProcedures
+
+ * browser/PostgreSqlMetaData.cs:
+ - support PostgreSQL 8.0
+ - list views and stored procedures
+ - fix run-time error getting list of tables
+
+ * browser/OracleMetaData.cs: support
+ listing of parameters
+ for stored produres and functions
+ and the functions and procedures
+ in a package, support listing of packages
+ and listing the functions
+ and procedures in each package
+
+ * browser/MySqlMetaData.cs:
+ - support MySQL 5.0
+ - list views and stored procedures (only available in MySQL 5.0)
+
+ * sqlsharpgtk/DataGrid.cs: support multiple selection mode
+ and add some convience methods and properties
+
+ * sqlsharpgtk/AboutDialog.cs: bump up version to 0.4
+
+ * sqlsharpgtk/sqlsharpgtk.cs: modified
+ - modify Copy for the results DataGrid pop up menu
+ to be able to paste into a spreadsheet
+ using tab separated values. Comma Separated Values pastes
+ in a spreadsheet as one big cell.
+ - implement Select All and UnSelect All
+ for the results DataGrid. However, getting right-clicking
+ to work right with multiple rows selected is a TODO
+ - set the results DataGrid to support selecting of multiple rows
+ - list parameters (arguments) for each procedure and function
+ - list packages for Oracle, and the functions and procedures in a package,
+ and the parameters for each function and procedure
+
+ * sqlsharpgtk/Makefile: flush
+
+ * sqlsharpgtk/DataSourceConnection.cs: dispose properly
+
+ * TODO.TXT: update TODO status
+
+ * Makefile: allow to run sqlsharpgtk
+
+2005-08-14 Daniel Morgan <danielmorgan@verizon.net>
+
+ * browser/SybaseMetaData.cs: bug fixes
+
+ * sqlsharpgtk/sqlsharpgtk.exe.config.in: add
+ an example connection string to connect to
+ Sybase ASE database
+
+2005-07-29 Daniel Morgan <danielmorgan@verizon.net>
+
+ * Makefile: use a slash instead of backslash
+ as directory separator
+
+2005-06-26 Daniel Morgan <danielmorgan@verizon.net>
+
+ Port SQL# For GTK# to Mono 1.1.7 and GTK# 1.9.3 and gtk+ 2.6
+
+ * sqlsharpgtk/FileSelectionDialog.cs
+ * sqlsharpgtk/SqlEditorSharp.cs
+ * sqlsharpgtk/ConnectionString.cs
+ * browser/Makefile
+ * browser/MySqlMetaData.cs
+ * browser/PostgreSqlMetaData.cs
+ * browser/MetaTable.cs: get rid of compiler warnings
+
+ * browser/SqlMetaData.cs
+ * browser/SybaseMetaData.cs: SQL Server and Sybase should use
+ xusertype instead of xtype when getting meta data about table columns
+
+ * sqlsharpgtk/LoginDialog.cs: port to GTK# 1.9.3 and get rid of warnings
+ - use ComboBox instead of OptionMenu
+
+ * sqlsharpgtk/sqlsharpgtk.cs: port to GTK# 1.9.3 and get rid of warnings
+ - use ComboBox instead of Combo
+
+ * sqlsharpgtk/DataGrid.cs: port to GTK# 1.9.3
+
+ * EditorTab.cs
+ * QueryMode.cs
+ * BatchExecuteMode.cs
+ * ExecuteOutputType.cs
+ * OutputResults.cs: added new files by moving items from sqlsharpgtk.cs
+
+ * ComboHelper.cs: new file for helping getting/setting text for ComboBox
+
+ * sqlsharpgtk/Makefile: add new files to build, start using
+ the gtk-sharp-2.0.pc which is required for gtk# 1.9.3 and up, get
+ rid of compile warnings
+
+ * TODO.TXT
+ * README.TXT
+ * INSTALL.TXT: update text files with latest info
+
+2005-04-26 Daniel Morgan <danielmorgan@verizon.net>
+
+ * browser/MetaView.cs
+ * browser/MetaViewCollection.cs: add files for
+ meta data for views
+
+ * browser/MetaProcedure.cs
+ * browser/MetaProcedureCollection.cs: meta data
+ for stored procedures
+
+ * browser/SqliteMetaData.cs: meta data for Sqlite
+
+ * sqlsharpgtk/sqlsharpgtk.cs: when logging error
+ messages to console
+
+
+2005-04-10 Daniel Morgan <danielmorgan@verizon.net>
+
+ * browser/SqlMetaData.cs: add meta data for Views and Stored Procedures and
+ the source so a user can view or edit a stored procedure, sort tables
+
+ * browser/PostgreSqlMetaData.cs: sort table, add stubs for views and procedures and source
+
+ * browser/SchemaBrowser.cs: add support for providers
+ for Mono.Data.SqliteClient and MySQL.Data, handle cases where a schema provider does not implement
+ a function, add support for Views, Stored Procedures, and Source of the Stored Procedures
+
+ * browser/MySqlMetaData.cs: add stubs
+
+ * browser/OracleMetaData.cs: sort tables, add support for views, stored procedures,
+ and source of stored procedures, add support to show errors when a stored procedures
+ has compile errors
+
+ * browser/FirebirdMetaData.cs: add support for views and stored procedures
+
+ * browser/SybaseMetaData.cs: sort tables, add support for stored procedures and views
+
+ * browser/IMetaData.cs: add support for views, stored procedures, and source of
+ stored procedure
+
+ * browser/Makefile: add new .cs files to build for views and procedures, and add
+ Sqlite meta data provider
+
+ * sqlsharpgtk/DataGrid.cs: flush
+
+ * sqlsharpgtk/LoginDialog.cs: if a setting is selected, make the setting name show up on
+ the tree view and combo box for connections
+
+ * sqlsharpgtk/sqlsharpgtk.exe.config.in: add example connection strings for SQL Lite v2.x or v3.x
+
+ * sqlsharpgtk/AboutDialog.cs: add copyright
+
+ * sqlsharpgtk/sqlsharpgtk.cs: app name is "Mono SQL# For GTK#", add Copy pop up menu item
+ for the data grid which copies a row to the clipboard as comma separated values, show list
+ of views and stored procedures in meta data tree view, add new menu item to pop up menu
+ to allow viewing/editing of a stored procedure, added shortcut for F7 key to execute SQL
+ AS-IS, if a setting was selected in the Login Dialog - show it in the tree view and combo as
+ a connection name
+
+ * sqlsharpgtk/SqlEditorSharp.cs: clean up
+
+ * TODO.TXT: update TODO file
+
+2005-01-10 Daniel Morgan <danielmorgan@verizon.net>
+
+ * ChangeLog: fix the my email address
+
+ * INSTALL.TXT
+ * sqlsharpgtk/DataGrid.cs: flush
+
+ * sqlsharpgtk/AboutDialog.cs: bump up version to 0.0.2
+
+ * sqlsharpgtk/sqlsharpgtk.cs: fixes to get it
+ to build on Mono 1.1.3 too
+
+ * browser/Makefile
+ * sqlsharpgtk/Makefile: db browser
+ has new name Mono.Data.SqlSharp.DatabaseBrowser.dll
+ so it can build and run on Mono 1.1.3
+
+ * sqlsharpgtk/SqlEditorSharp.cs: flush
+
+ * browser/MetaTableCollection.cs
+ * browser/IMetaData.cs
+ * browser/MetaTableColumnCollection.cs
+ * browser/FirebirdMetaData.cs
+ * browser/MySqlMetaData.cs
+ * browser/OracleMetaData.cs
+ * browser/PostgreSqlMetaData.cs
+ * browser/SchemaBrowser.cs
+ * browser/SqlMetaData.cs
+ * browser/MetaTable.cs
+ * browser/MetaTableColumn.cs: renamed namespace so sqlsharpgtk
+ can build on Mono 1.1.3 too
+
+ * browser/SybaseMetaData.cs: added file for Sybase SQL support
+
+2004-12-05 Daniel Morgan <danielmorgan@verizon.net>
+
+ * sqlsharpgtk/sqlsharpgtk.cs: when selecting the Query menu item in
+ the left pane Tree View, automatically set the data source combo so
+ it will execute the sql against the correct database
+
+2004-12-05 Daniel Morgan <danielmorgan@verizon.net>
+
+ * sqlsharpgtk/sqlsharpgtk.cs: fix right-clicking on
+ data grid causes crash
+
+2004-12-05 Daniel Morgan <danielmorgan@verizon.net>
+
+ * sqlsharpgtk/DataTree.cs: add Clear method
+
+ * sqlsharpgtk/sqlsharpgtk.cs: implemented handling
+ multiple connections, added SQL# command "CONNECT setting"
+ for connecting to a data source to be used in scripts
+
+ * sqlsharpgtk/Makefile: added new files to build
+
+ * sqlsharpgtk/DataSourceConnectionCollection.cs
+ * sqlsharpgtk/DataSourceConnection.cs: added new files
+
+ * TODO.TXT: updated TODO
+
+2004-12-05 Daniel Morgan <danielmorgan@verizon.net>
+
+ * sqlsharpgtk/ConnectionString.cs: right-trim a semicolon on the
+ connection string
+
+ * sqlsharpgtk/LoginDialog.cs: fix the display of the connection
+ string parameters in the app settings grid
+
+ * sqlsharpgtk/sqlsharpgtk.exe.config.in: add a sample connection
+ string for a SQL Lite database
+
+ * sqlsharpgtk/FileSelectionDialog.cs
+ * sqlsharpgtk/DataGrid.cs
+ * sqlsharpgtk/DataTree.cs: flush
+
+ * sqlsharpgtk/sqlsharpgtk.cs: each SQL Editor notebook tab will
+ have its own results notebook pane (grid or log), added
+ toolbar buttons for file new, open, save, and close
+
+ * sqlsharpgtk/SqlEditorSharp.cs: after loading a file
+ into the text buffer, set the cursor position to the beginning
+
+ * TODO.TXT: update TODO
+
+ * INSTALL.TXT: add requirement for Mono.Data.dll
+
+2004-11-29 Daniel Morgan <danielmorgan@verizon.net>
+
+ * sqlsharpgtk/DataGrid.cs
+ * sqlsharpgtk/ConnectionString.cs
+ * sqlsharpgtk/LoginDialog.cs: enhancements to the Login screen
+
+ * sqlsharpgtk/sqlsharpgtk.cs: replace option menu with
+ combo for the connected data source, added Help About
+ menu
+
+ * sqlsharpgtk/Makefile: added AboutDialog to build
+
+ * TODO.TXT: added TODO file
+
+ * INSTALL.TXT
+ * README.TXT: updated
+
+ * sqlsharpgtk/AboutDialog.cs: added About dialog
+
+2004-11-23 Daniel Morgan <danielmorgan@verizon.net>
+
+ * sqlsharpgtk/sqlsharpgtk.cs: do pending events
+ so the status bar can be updated to reflect
+ its getting meta data
+
+ * browser/Makefile
+ * browser/SchemaBrowser.cs: added meta data
+ support for FirebirdSql
+
+ * browser/MySqlMetaData.cs
+ * browser/OracleMetaData.cs: flush
+
+2004-11-21 Daniel Morgan <danielmorgan@verizon.net>
+
+ * sqlsharpgtk/sqlsharpgtk.cs: output text view
+ should always scroll to end of buffer, and do not
+ execute empty queries (ignore them)
+
+ * sqlsharpgtk/DataGrid.cs
+ * qlsharpgtk/LoginDialog.cs: flush
+
+2004-11-21 Daniel Morgan <danielmorgan@verizon.net>
+
+ * sqlsharpgtk/DataGrid.cs: enhancements to allow adding
+ new rows and columns instead of via DataLoad or DataBind
+
+ * sqlsharpgtk/LoginDialog.cs:
+ update the LoginDialog to parse the Mono.Data app settings
+ into a new grid to allow a user to connect via this,
+ updated namespaces to one namespace
+
+ * sqlsharpgtk/Makefile: add ConnectionString.cs to build
+
+ * sqlsharpgtk/DataTree.cs
+ * sqlsharpgtk/SqlEditorSharp.cs
+ * sqlsharpgtk/SqlSharpDataAdapter.cs
+ * sqlsharpgtk/FileSelectionDialog.cs: updated namespaces
+ to one namespace
+
+ * sqlsharpgtk/sqlsharpgtk.cs: allow right-clicking
+ the output results grid to pop-up a menu,
+ updated namespaces to one namespace
+
+ * sqlsharpgtk/sqlsharpgtk.exe.config
+ * sqlsharpgtk/sqlsharpgtk.exe.config.in: replace
+ sqlsharpgtk.exe.config with sqlsharpgtk.exe.config.in
+
+ * sqlsharpgtk/ConnectionString.cs: new class for
+ parsing connection string
+
+2004-11-21 Daniel Morgan <danielmorgan@verizon.net>
+
+ * sqlsharpgtk/sqlsharpgtk.cs: add menu item to clear log,
+ unselect text when appending text to log, update status
+ when records retrieved
+
+ * browser/SchemaBrowser.cs
+ * browser/PostgreSqlMetaData.cs (new file)
+ * browser/MySqlMetaData.cs (new file)
+ * browser/Makefile: added support for PostgreSQL and MySQL
+
+2004-11-21 Daniel Morgan <danielmorgan@verizon.net>
+
+ * sqlsharpgtk/DataGrid.cs: do not load the DataGrid
+ if there is no results.
+
+ * sqlsharpgtk/sqlsharpgtk.cs
+ * sqlsharpgtk/SqlEditorSharp.cs:
+ - set status bar messages.
+ - execute command - allow execution of one command at the cursor
+ (execute command). each SQL command separated by a semicolon.
+ - execute script - allow execution of multiple commands one at a
+ time starting at the cursor. if error occurs, stop executing.
+ point the cursor at the last successful or errored command.
+ each SQL command separated by a semicolon.
+ - bug - if provider does have meta data, do not fail loading
+ the treeview
+ - simply namespaces
+
+ * sqlsharpgtk/LoginDialog.cs
+ * browser/MetaTable.cs
+ * browser/MetaTableColumn.cs
+ * browser/SqlMetaData.cs
+ * browser/SchemaBrowser.cs
+ * browser/OracleMetaData.cs
+ * browser/MetaTableColumnCollection.cs
+ * browser/IMetaData.cs
+ * browser/MetaTableCollection.cs: new
+ namespace SqlSharp.DatabaseBrowser
+
+ * sqlsharpgtk/Makefile
+ * browser/Makefile: new DLL name SqlSharp.DatabaseBrowser.dll
+
+2004-11-20 Daniel Morgan <danielmorgan@verizon.net>
+
+ in .:
+
+ * Makefile: added build file
+
+ * browser: new subdirectory
+
+ in sqlsharpgtk:
+
+ * DataGrid.cs: set the font family
+ in the grid to courier
+
+ * sqlsharpgtk.cs: use DatabaseBrowser to populate tables
+ and columns in a left paned TreeView, the TreeView can
+ be right-clicked to show a popup menu. One menu items
+ allows you to query data from a table, use Mono.Data.ProviderFactory
+ and config file sqlsharpgtk.exe.config to load providers,
+ created work-around for bug in gtk text view search where the last
+ character in the buffer is the text being searched
+
+ * sqlsharpgtk.exe.config: added xml file for app settings based
+ on the app.settings file from Mono.Data
+
+ * LoginDialog.cs: load providers from xml file
+ sqlsharpgtk.exe.config using Mono.Data.ProviderFactory
+
+ * Makefile: include DataTree.cs and refence assembly Mono.Data
+
+ * DataTree: container for a scrollable TreeView/TreeStore
+
+ in browser:
+
+ * SchemaBrowser.cs
+ * IMetaData.cs
+ * SqlMetaData.cs
+ * OracleMetaData.cs
+ * MetaTableCollection.cs
+ * MetaTable.cs
+ * MetaTableColumnCollection.cs
+ * MetaTableColumn.cs
+ * Makefile.cs: new DatabaseBrowser.dll
+
+2004-01-11 Daniel Morgan <danielmorgan@verizon.net>
+
+ * ChangeLog: add file ChangeLog to root
+ * INSTALL.TXT: add file for installation instructions
+ for SQL# For GTK#
+ * README.TXT: add README file for general info and
+ user instructions
+
View
48 sqlsharpgtk/INSTALL
@@ -0,0 +1,48 @@
+INSTALL.TXT for SQL Query for Mono and GTK# (sqlsharpgtk)
+-------------------------------------------
+
+To Build sqlsharpgtk.exe
+
+ cd sqlsharpgtk
+ make
+
+To Run sqlsharpgtk.exe
+
+ mono sqlsharpgtk.exe
+
+The following are minimum requirements for sqlsharpgtk:
+- GTK# 1.9.3 or higher
+- Mono 1.1.7 or higher
+- gtk+ 2.4 or higher
+
+Additional Assemblies:
+- System.Data.dll
+- Mono.Data.dll - used for the ProviderFactory
+
+Mono and GTK# can be downloaded from http://mono-project.com/
+See README.TXT for more info.
+
+Provider Factory:
+
+Either create a config file or
+add information to your machine.config
+SQL# For GTK# uses the Provider Factory to load the assemblies of the providers.
+In order to do this, it needs the provider to be listed
+in sqlsharpgtk.exe.config or your machine.config file.
+
+If you prefer to use your own config file,
+copy sqlsharpgtk.exe.config.in to sqlsharpgtk.exe.config
+
+
+Works on Windows and Linux.
+
+It works great on Linux.
+
+For Windows 2000/XP users, get the Combined Mono 1.1.x and GTK# 1.9.x Windows Installer
+from Mono's download page.
+
+I have heard it works on Mac OS X as well.
+
+
+
+
View
29 sqlsharpgtk/Makefile.am
@@ -0,0 +1,29 @@
+#SUBDIRS = man resources src
+SUBDIRS = browser sqlsharpgtk
+bin_SCRIPTS = sqlsharpgtk.sh
+EXTRA_DIST = sqlsharpgtk.sh.in
+
+REWRITE = \
+ sed -e "s|\@prefix\@|$(prefix)|g" \
+ -e "s|\@pkglibdir\@|$(pkglibdir)|g" \
+ -e "s|\@bindir\@|$(bindir)|g" \
+ -e "s|\@MONO\@|$(MONO)|g"
+
+$(bin_SCRIPTS): $(srcdir)/sqlsharpgtk.sh.in Makefile
+ $(REWRITE) $(srcdir)/sqlsharpgtk.sh.in > $@.tmp
+ mv $@.tmp $@
+
+CLEANFILES = \
+ sqlsharpgtk.sh
+
+DISTCLEANFILES = \
+ configure \
+ config.guess \
+ config.sub \
+ Makefile.in \
+ install-sh \
+ aclocal.m4 \
+ INSTALL \
+ COPYING \
+ missing
+
View
1  sqlsharpgtk/NEWS
@@ -0,0 +1 @@
+Describe the new features here
View
121 sqlsharpgtk/README
@@ -0,0 +1,121 @@
+README for Mono SQL Query For GTK# (sqlsharpgtk)
+------------------------------------------------
+
+SQL# is a GUI tool for entering
+and executing SQL queries that runs on Mono and GTK#.
+
+You have a top paned text editor for entering SQL commands,
+and a bottom panel (either a grid or text viewer) to output
+the results. There is a notebook tabs for editing different files.
+These files can be loaded and saved. The results can be saved
+to XML or CSV file.
+
+It is written in C# and has support for executing queries for
+various ADO.NET data providers:
+
+- PostgreSQL 7.x/8.x (Npgsql)
+- MySQL (ByteFX.Data.MySQLClient)
+- Oracle (8i, 9i, and 10g)
+- Microsoft SQL Server 7/2000/2005
+- Sybase 12.x
+- Firebird SQL
+- SQL Lite
+- ODBC
+- and other providers listsed in sqlsharpgtk.exe.config
+
+This tool complements the SQL# command-line version included with Mono.
+
+Mono can be found at http://www.mono-project.com/
+GTK# can be found at http://gtk-sharp.sourceforge.net/
+
+You can find Mono SQL Query in Mono's Subversion repository as module sqlsharpgtk.
+
+Mono SQL# For GTK# project page is at:
+http://forge.novell.com/modules/xfmod/project/?sqlsharpgtk
+
+Browse the Subversion repository:
+http://svn.myrealbox.com/viewcvs/trunk/sqlsharpgtk/
+
+How to check out from the repository:
+http://www.mono-project.com/contributing/anonsvn.html
+
+Read INSTALL.TXT on how to install sqlsharpgtk.
+
+Use gmcs to build sqlsharpgtk instead of mcs because it needs the NET_2_0 profile.
+
+Using Mono SQL Query For GTK#
+-----------------------------
+
+Once you started SQL Query, you can connect to a database by selecting
+the Session menu and click Connect.
+
+A Login Dialog will appear.
+
+Select the Provider to use, such as, PostgreSQL (Npgsql) to connect to
+a PostgreSQL database via the Npgsql provider.
+
+Enter the Connection String you would use to connect to the database,
+and click OK.
+
+Connection String formats
+-------------------------
+
+ Example connection strings for various providers:
+
+Provider:
+ Microsoft SQL Server via System.Data.SqlClient or Mono.Data.TdsClient provider:
+ConnectionString:
+ Server=DANPC;Database=pubs;User ID=danmorg;Password=freetds
+
+Provider:
+ PostgreSQL (Npgsql)
+ConnectionString:
+ Server=localhost;Database=test;User ID=postgres;Password=fun2db
+
+Provider:
+ MySQL (ByteFX MySql)
+ConnectionString:
+ Server=localhost;Database=test;User ID=mysql;Password=mypass
+
+Provider:
+ ODBC via System.Data.Odbc provider using a DSN named "MSSQLDSN" I set up
+ in the Windows control panel's ODBC Data Sources which connects
+ to Microsoft SQL Server 2000:
+ConnectionString:
+ DSN=MSSQLDSN;UID=danmorg;PWD=freetds
+
+Provider:
+ SQL Lite via Mono.Data.SqliteClient provider which connects to the
+ database file SqliteTest.db; if not found, the file is created:
+ConnectionString:
+ URI=file:SqliteTest.db
+
+Provider:
+ OLE DB via System.Data.OleDb provider which connects to a PostgreSQL database:
+ConnectionString:
+ Provider=PostgreSQL;Addr=127.0.0.1;Database=rodrigo
+
+Provider:
+ Oracle via System.Data.OracleClient
+ConnectionString:
+ Data Source=testdb;User ID=scott;Password=tiger
+
+Provider:
+ FirebirdSql via FirebirdSql.Data.Firebird (not included with Mono)
+ConnectionString:
+ Database=C:\FIREBIRD\EXAMPLES\EMPLOYEE.FDB;User=SYSDBA;Password=masterkey;Dialect=3;Server=localhost
+
+List of Data Providers
+----------------------
+
+Provider Name Namespace Assembly
+=========== ============= ========================== ==========================
+OleDb OLE DB System.Data.OleDb System.Data
+SqlClient MS SQL 7/2000 System.Data.SqlClient System.Data
+Odbc ODBC System.Data.Odbc System.Data
+Sqlite SQL Lite Mono.Data.SqliteClient Mono.Data.SqliteClient
+Sybase Sybase Mono.Data.SybaseClient Mono.Data.SybaseClient
+Oracle Oracle 8i/9i System.Data.OracleClient System.Data.OracleClient
+PostgreSql NET Postgres Npgsql Npgsql
+MySQL ByteFX MySQL ByteFX.Data.MySQLClient ByteFX.Data
+
View
100 sqlsharpgtk/TODO
@@ -0,0 +1,100 @@
+TODO for Mono SQL Query for GTK#
+================================
+
+Connections
+-----------
+
+- add SQL# commands for disconnecting.
+ Helpful for scripting.
+- every connection needs to have at least one other connection for the schema browser
+ if four connections share the same provider and connection string, then there only
+ needs to have one extra connection for the schema browser
+
+Meta Data Tree View (Left Pane)
+-------------------------------
+
+- only load the child nodes if you expand the node and it has not been
+ expanded before
+- implement refresh
+- add meta data for:
+ - tables (done)
+ - table columns (done except for sqlite)
+ - views (oracle, sybase, and sql server done)
+ - stored procedures (oracle, sybase, and sql server done)
+ - Oracle - packages and package bodies (done)
+ - list the functions and procedures in a package (done)
+ - show invalid database objects in different color
+ - Firebird - TODO - does Firebird have stored procedures?
+ - PostgreSQL - TODO
+ - MySQL 5.0 - TODO - one of the new features in MySQL 5.0 is stored prcedures
+ - parameters for stored procedures
+ - Oracle - (done)
+ - triggers
+ - indexes - unque/duplicate, primary keys, foreign keys
+ - constraints
+ - users
+ - sessions (dynamic info)
+ - tablespaces
+ - handle database objects used by a particular DBMS, such as, sequences for Oracle
+- in the future, replace the database browser with chrish01's Mono.Data.Sql
+
+Stored Procedures, Functions, and other stored procedural objects
+-----------------------------------------------------------------
+
+with meta data added to list all stored procedures, then do these:
+- for a stored procedure screen, all execute functions are execute as-is.
+- for oracle:
+ - allow (all or individual) invalid objects to be re-compiled
+ - if saving a stored procedure, and there are errors, show errors in grid. If
+ user double-clicks on a row in the grid, go to that line and position
+
+SQL Execution Engine
+--------------------
+
+- refactor the SQL execution code into its own assembly. Use threads and events
+ to handle this
+
+Clipboard (Cut/Copy/Paste)
+--------------------------
+
+- add Edit menu with clipboard cut/copy/paste functionality for the
+ SQL editor
+
+Options Dialg
+-------------
+
+- create an options dialog for user preferences
+
+Variables
+---------
+
+- add the ability for SQL# to set and get variables. Useful for scripting.
+- add support for parameters when executing SQL statements via variables
+- create a new dialog for accepting missing parameters when executing SQL
+
+Find / Replace
+--------------
+
+- create a Find / Replace dialog
+
+Project Files
+-------------
+
+- change the source code files from vs.net default style to mono style
+- refactor the majority of source code in sqlsharpgtk.cs, move this into other classes, such as,
+ the output for csv files vs. normal output can be generalized into output classes. and refactor
+ the non-GUI code from the GUI code
+
+Data Grid
+---------
+
+- Make the DataGrid a first-class Data Grid like the one found in System.Windows.Forms or
+ System.Web.UI.WebControls, such as, allow the grid to be editable - when a value changes in
+ the grid - update the data source. Add the approviate events for this.
+ See what vlad and duncan did for managed tree model stuff
+
+Providers
+---------
+- test the following providers, and if they work, add them to the config file
+ - MySql.Data. Test versions of MySQL 4.x and 5.x
+ - ADP
View
84 sqlsharpgtk/autogen.sh
@@ -0,0 +1,84 @@
+#! /bin/sh
+
+PROJECT=sqlsharpgtk
+FILE=sqlsharpgtk/sqlsharpgtk.cs
+CONFIGURE=configure.ac
+
+: ${AUTOCONF=autoconf}
+: ${AUTOHEADER=autoheader}
+: ${AUTOMAKE=automake}
+: ${LIBTOOLIZE=libtoolize}
+: ${ACLOCAL=aclocal}
+: ${LIBTOOL=libtool}
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+TEST_TYPE=-f
+aclocalinclude="-I . $ACLOCAL_FLAGS"
+
+DIE=0
+
+($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have autoconf installed to compile $PROJECT."
+ echo "Download the appropriate package for your distribution,"
+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+
+($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have automake installed to compile $PROJECT."
+ echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz"
+ echo "(or a newer version if it is available)"
+ DIE=1
+}
+
+(grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
+ ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
+ echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
+ echo "(or a newer version if it is available)"
+ DIE=1
+ }
+}
+
+if test "$DIE" -eq 1; then
+ exit 1
+fi
+
+test $TEST_TYPE $FILE || {
+ echo "You must run this script in the top-level $PROJECT directory"
+ exit 1
+}
+
+if test -z "$*"; then
+ echo "I am going to run ./configure with no arguments - if you wish "
+ echo "to pass any to it, please specify them on the $0 command line."
+fi
+
+case $CC in
+*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
+esac
+
+(grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
+ echo "Running $LIBTOOLIZE ..."
+ $LIBTOOLIZE --force --copy
+}
+
+echo "Running $ACLOCAL $aclocalinclude ..."
+$ACLOCAL $aclocalinclude
+
+echo "Running $AUTOMAKE --gnu $am_opt ..."
+$AUTOMAKE --add-missing --gnu $am_opt
+
+echo "Running $AUTOCONF ..."
+$AUTOCONF
+
+echo Running $srcdir/configure $conf_flags "$@" ...
+$srcdir/configure --enable-maintainer-mode $conf_flags "$@" \
+
View
15 sqlsharpgtk/browser/AssemblyInfo.cs.in
@@ -0,0 +1,15 @@
+//
+// AssemblyInfo.cs.in for project 'sqlsharpgtk'
+//
+// Authors:
+// Daniel Morgan <monodanmorg@yahoo.com>
+//
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyVersion("@VERSION@")]
+[assembly: AssemblyTitle ("Mono Database Browswer for SQL# For GTK#")]
+[assembly: AssemblyDescription ("Database Browser")]
+[assembly: AssemblyCopyright ("Copyright (c) 2006 Daniel Morgan")]
+[assembly: AssemblyCompany ("")]
+
View
201 sqlsharpgtk/browser/FirebirdMetaData.cs
@@ -0,0 +1,201 @@
+// FirebirdMetaData.cs - meta data for Firebird SQL Database
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2004-2005 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using Mono.Data.SqlSharp.DatabaseBrowser;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser
+{
+ public class FirebirdMetaData : IMetaData
+ {
+ private IDbConnection con;
+
+ private static MethodInfo schemaMethod = null;
+
+ public FirebirdMetaData()
+ {
+ }
+
+ public FirebirdMetaData(IDbConnection connection)
+ {
+ this.con = connection;
+ }
+
+ public MetaTableCollection GetTables(bool includeSystemTables)
+ {
+ if(con.State != ConnectionState.Open)
+ con.Open();
+
+ MetaTableCollection tables = new MetaTableCollection ();
+ DataTable table = GetSchema ("Tables", new string[] {null, null, null, "TABLE"});
+
+ for (int r = 0; r < table.Rows.Count; r++)
+ {
+ DataRow row = table.Rows[r];
+ string tableName = row["TABLE_NAME"].ToString();
+ MetaTable mtable = new MetaTable(tableName);
+ tables.Add(mtable);
+ }
+
+ return tables;
+ }
+
+ public MetaTableColumnCollection GetTableColumns(string owner, string tableName)
+ {
+ if(con.State != ConnectionState.Open)
+ con.Open();
+
+ MetaTableColumnCollection columns = new MetaTableColumnCollection (owner, tableName);
+ DataTable table2 = GetSchema ("Columns", new string[] {null, null, tableName, null});
+ for (int r = 0; r < table2.Rows.Count; r++)
+ {
+ DataRow row2 = table2.Rows[r];
+
+ string columnName = row2["COLUMN_NAME"].ToString();
+ string dataType = row2["COLUMN_DATA_TYPE"].ToString();
+
+ int columnSize = 0;
+ if (row2["COLUMN_SIZE"] != DBNull.Value)
+ columnSize = (int) row2["COLUMN_SIZE"];
+
+ int precision = 0;
+ if (row2["NUMERIC_PRECISION"] != DBNull.Value)
+ precision = (int) row2["NUMERIC_PRECISION"];
+
+ int scale = 0;
+ if (row2["NUMERIC_SCALE"] != DBNull.Value)
+ scale = (int) row2["NUMERIC_SCALE"];
+
+ bool isNullable = false; // FIXME: is nullable
+ //short n = 0;
+ //if (row2["IS_NULLABLE"] != DBNull.Value)
+ // n = (short) row2["IS_NULLABLE"];
+ //
+ //if (n == 1)
+ // isNullable = true;
+
+ int pos = 0; // FIXME: ordinal position
+ //if (row2["ORDINAL_POSITION"] != DBNull.Value)
+ // pos = (int) row2["ORDINAL_POSITION"];
+
+ MetaTableColumn column = new MetaTableColumn(
+ "",
+ tableName,
+ columnName,
+ dataType,
+ columnSize,
+ precision,
+ scale,
+ isNullable,
+ pos);
+
+ columns.Add(column);
+ }
+
+ return columns;
+ }
+
+ public MetaViewCollection GetViews (bool includeSystem)
+ {
+ if (con.State != ConnectionState.Open)
+ con.Open();
+
+ MetaViewCollection views = new MetaViewCollection ();
+
+ DataTable table2 = GetSchema ("Views", new string[] {null, null, null});
+ for (int r = 0; r < table2.Rows.Count; r++) {
+ DataRow row2 = table2.Rows[r];
+ string viewName = row2["VIEW_NAME"].ToString();
+ MetaView view = new MetaView (viewName);
+ views.Add (view);
+ }
+
+ return views;
+ }
+
+ private DataTable GetSchema (string sCollectionName, string[] sRestrictions)
+ {
+ if (schemaMethod == null)
+ {
+ // get the proper GetSchema method on the FbConnection object
+ MethodInfo [] conMethodInfo = con.GetType ().GetMethods ();
+
+ for (int m = 0; m < conMethodInfo.Length; m++)
+ {
+ if (conMethodInfo[m].Name.Equals ("GetSchema"))
+ {
+ ParameterInfo[] parms = conMethodInfo[m].GetParameters ();
+
+ if (parms.Length == 2)
+ {
+ if (parms[0].ParameterType.ToString ().Equals ("System.String") &&
+ parms[1].ParameterType.ToString ().Equals ("System.String[]"))
+ {
+ schemaMethod = conMethodInfo [m];
+ m = conMethodInfo.Length;
+ }
+ }
+ }
+ }
+ }
+
+ object parm0 = (object) sCollectionName;
+ object parm1 = (object) sRestrictions;
+
+ object[] oParms = new object[2];
+ oParms[0] = parm0;
+ oParms[1] = parm1;
+
+ // invoke GetSchema method
+ return (DataTable) schemaMethod.Invoke (con, oParms);
+ }
+
+ public MetaProcedureCollection GetProcedures(string owner)
+ {
+ if (con.State != ConnectionState.Open)
+ con.Open();
+
+ MetaProcedureCollection procs = new MetaProcedureCollection ();
+
+ DataTable table2 = null;
+ DataRow row2 = null;
+ table2 = GetSchema ("Procedures", new string[] {null, null, null});
+ for (int r = 0; r < table2.Rows.Count; r++) {
+ row2 = table2.Rows[r];
+ string procName = row2["PROCEDURE_NAME"].ToString();
+ MetaProcedure proc = new MetaProcedure ("", procName, "Procedures");
+ procs.Add (proc);
+ row2 = null;
+ }
+ table2 = null;
+
+ table2 = GetSchema ("Functions", new string[] {null, null, null, null});
+ for (int r = 0; r < table2.Rows.Count; r++) {
+ row2 = table2.Rows[r];
+ string funcName = row2["FUNCTION_NAME"].ToString();
+ MetaProcedure proc = new MetaProcedure ("", funcName, "Functions");
+ procs.Add (proc);
+ row2 = null;
+ }
+ table2 = null;
+
+ return procs;
+ }
+
+ public string GetSource (string objectName, string objectType)
+ {
+ return "";
+ }
+ }
+}
+
View
24 sqlsharpgtk/browser/IMetaData.cs
@@ -0,0 +1,24 @@
+// IMetaData.cs
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2004-2005 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser
+{
+ public interface IMetaData
+ {
+ MetaTableCollection GetTables (bool includeSystemTables);
+ MetaTableColumnCollection GetTableColumns (string owner, string tableName);
+ MetaViewCollection GetViews (bool includeSystem);
+ MetaProcedureCollection GetProcedures(string owner);
+ string GetSource (string objectName, string objectType);
+ }
+}
View
47 sqlsharpgtk/browser/Makefile.am
@@ -0,0 +1,47 @@
+browserdir=$(pkglibdir)
+browser_SCRIPTS = Mono.Data.SqlSharp.DatabaseBrowser.dll
+EXTRA_DIST = $(browser_sources) $(browser_sources_in)
+CLEANFILES = Mono.Data.SqlSharp.DatabaseBrowser.dll
+DISTCLEANFILES = AssemblyInfo.cs Makefile.in
+
+browser_sources_in = AssemblyInfo.cs.in
+browser_generated_sources = $(browser_sources_in:.in=)
+
+browser_sources = IMetaData.cs \
+MetaTable.cs \
+MetaTableCollection.cs \
+MetaTableColumn.cs \
+MetaTableColumnCollection.cs \
+MetaView.cs \
+MetaViewCollection.cs \
+MetaProcedure.cs \
+MetaProcedureCollection.cs \
+MetaProcedureArgument.cs \
+MetaProcedureArgumentCollection.cs \
+SchemaBrowser.cs \
+OracleMetaData.cs \
+SqlMetaData.cs \
+SqliteMetaData.cs \
+SybaseMetaData.cs \
+PostgreSqlMetaData.cs \
+FirebirdMetaData.cs \
+MySqlMetaData.cs
+
+browser_build_sources = $(addprefix $(srcdir)/, $(browser_sources))
+browser_build_sources += $(browser_generated_sources)
+
+Mono.Data.SqlSharp.DatabaseBrowser.dll: $(browser_build_sources)
+ $(MCS) -target:library -out:$@ $(browser_build_sources) -r:System.Data.dll
+
+# Install Unstable Mono Libraries (see configure.ac)
+
+install-data-hook:
+ for ASM in $(INSTALLED_ASSEMBLIES); do \
+ $(INSTALL) -c -m 0755 $$ASM $(DESTDIR)$(pkglibdir); \
+ done;
+
+uninstall-hook:
+ for ASM in $(INSTALLED_ASSEMBLIES); do \
+ rm -f $(DESTDIR)$(pkglibdir)/`basename $$ASM`; \
+ done;
+
View
123 sqlsharpgtk/browser/MetaProcedure.cs
@@ -0,0 +1,123 @@
+// MetaProcedure.cs - represents a stored procedure or function
+//
+// For Oracle, can also represent a package
+// For a meta data provider, they do not have to subclass MetaProcedure.
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2005 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+using System.Text;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser
+{
+ public class MetaProcedure {
+ private string name = "";
+ private string owner = "";
+ private string procedureType = "";
+ private string language = "";
+
+ private MetaProcedureArgumentCollection args;
+
+ private bool hasProcs = false;
+ private MetaProcedureCollection procs;
+
+ // created date
+
+ internal MetaProcedure() {
+ }
+
+ public MetaProcedure(string procOwner, string procName, string procType) {
+ this.owner = procOwner;
+ this.name = procName;
+ this.procedureType = procType;
+ args = new MetaProcedureArgumentCollection ();
+ }
+
+ public MetaProcedure(string procOwner, string procName, string procType, bool hasProcs) {
+ this.owner = procOwner;
+ this.name = procName;
+ this.procedureType = procType;
+ this.hasProcs = hasProcs;
+ if (hasProcs)
+ this.procs = new MetaProcedureCollection ();
+ }
+
+ public bool HasProcedures {
+ get {
+ return hasProcs;
+ }
+ set {
+ hasProcs = value;
+ }
+ }
+
+ public MetaProcedureCollection Procedures {
+ get {
+ return procs;
+ }
+ }
+
+ public string Name {
+ get {
+ return name;
+ }
+
+ set {
+ name = value;
+ }
+ }
+
+ public string Owner {
+ get {
+ return owner;
+ }
+
+ set {
+ owner = value;
+ }
+ }
+
+ public string ProcedureType {
+ get {
+ return procedureType;
+ }
+
+ set {
+ procedureType = value;
+ }
+ }
+
+ public string Language {
+ get {
+ return language;
+ }
+
+ set {
+ language = value;
+ }
+ }
+
+ public MetaProcedureArgumentCollection Arguments {
+ get {
+ return args;
+ }
+ }
+
+ public override string ToString()
+ {
+ if(owner != null)
+ if(owner.Equals("") == false)
+ return owner + "." + name;
+
+ return name;
+ }
+ }
+}
+
View
114 sqlsharpgtk/browser/MetaProcedureArgument.cs
@@ -0,0 +1,114 @@
+// MetaProcedure.cs - represents a stored procedure or function
+//
+// For Oracle, can also represent a package
+// For a meta data provider, they do not have to subclass MetaProcedure.
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2005 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+using System.Text;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser
+{
+ public class MetaProcedureArgument {
+ private string procname = "";
+ private string owner = "";
+ private string argument = "";
+ private string procedureType = "";
+ private string direction = "";
+ private string dataType = "";
+
+ internal MetaProcedureArgument()
+ {
+ }
+
+ public MetaProcedureArgument(string procOwner, string procName, string procType,
+ string argument, string direction, string dataType)
+ {
+ this.owner = procOwner;
+ this.procname = procName;
+ this.procedureType = procType;
+ this.argument = argument;
+ this.direction = direction;
+ this.dataType = dataType;
+ }
+
+ public string ProcedureName
+ {
+ get
+ {
+ return procname;
+ }
+
+ set
+ {
+ procname = value;
+ }
+ }
+
+ public string Owner
+ {
+ get {
+ return owner;
+ }
+
+ set {
+ owner = value;
+ }
+ }
+
+ public string ProcedureType
+ {
+ get {
+ return procedureType;
+ }
+
+ set {
+ procedureType = value;
+ }
+ }
+
+ public string ArgumentName {
+ get {
+ return argument;
+ }
+
+ set {
+ argument = value;
+ }
+ }
+
+ public string Direction {
+ get {
+ return direction;
+ }
+
+ set {
+ direction = value;
+ }
+ }
+
+ public string DataType {
+ get {
+ return dataType;
+ }
+
+ set {
+ dataType = value;
+ }
+ }
+
+ public override string ToString()
+ {
+ return String.Format ("{0} {1} {2}", argument, direction, dataType);
+ }
+ }
+}
+
View
153 sqlsharpgtk/browser/MetaProcedureArgumentCollection.cs
@@ -0,0 +1,153 @@
+// MetaProcedureCollection.cs
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2005 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+using System.Collections;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser
+{
+ public class MetaProcedureArgumentCollection : MarshalByRefObject, IList, ICollection, IEnumerable
+ {
+ #region Fields
+
+ private ArrayList list = new ArrayList ();
+
+ #endregion // Fields
+
+ #region Constructors
+
+ public MetaProcedureArgumentCollection ()
+ {
+ }
+
+ #endregion // Constructors
+
+ #region Properties
+
+ public MetaProcedureArgument this[int index]
+ {
+ get {
+ return (MetaProcedureArgument) list[index];
+ }
+ }
+
+ public MetaProcedureArgument this[string name]
+ {
+ get {
+ MetaProcedureArgument p = null;
+ foreach (object o in list) {
+ p = (MetaProcedureArgument) o;
+ if (p.ArgumentName.Equals (name))
+ return p;
+ }
+ throw new Exception ("MetaProcedureArgument not found");
+ }
+ }
+
+ object IList.this[int index]
+ {
+ get {
+ return list[index];
+ }
+
+ set {
+ list[index] = value;
+ }
+ }
+
+ public int Count
+ {
+ get {
+ return list.Count;
+ }
+ }
+
+ public bool IsFixedSize
+ {
+ get {
+ return false;
+ }
+ }
+
+ public bool IsReadOnly
+ {
+ get {
+ return true;
+ }
+ }
+
+ public bool IsSynchronized
+ {
+ get {
+ return false;
+ }
+ }
+
+ public object SyncRoot
+ {
+ get {
+ throw new InvalidOperationException ();
+ }
+ }
+
+ #endregion // Properties
+
+ #region Methods
+
+ public int Add (object o)
+ {
+ return list.Add ((MetaProcedureArgument) o);
+ }
+
+ public void Clear ()
+ {
+ list.Clear ();
+ }
+
+ public bool Contains (object o)
+ {
+ return list.Contains ((MetaProcedureArgument) o);
+ }
+
+ public void CopyTo (Array array, int index)
+ {
+ list.CopyTo (array, index);
+ }
+
+ public IEnumerator GetEnumerator ()
+ {
+ return list.GetEnumerator ();
+ }
+
+ public int IndexOf (object o)
+ {
+ return list.IndexOf ((MetaProcedureArgument) o);
+ }
+
+ public void Insert (int index, object o)
+ {
+ list.Insert (index, (MetaProcedureArgument) o);
+ }
+
+ public void Remove (object o)
+ {
+ list.Remove ((MetaProcedureArgument) o);
+ }
+
+ public void RemoveAt (int index)
+ {
+ list.RemoveAt (index);
+ }
+
+ #endregion // Methods
+
+ }
+}
View
174 sqlsharpgtk/browser/MetaProcedureCollection.cs
@@ -0,0 +1,174 @@
+// MetaProcedureCollection.cs
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2005 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+using System.Collections;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser {
+ public class MetaProcedureCollection : MarshalByRefObject, IList, ICollection, IEnumerable {
+ #region Fields
+
+ private ArrayList list = new ArrayList ();
+
+ #endregion // Fields
+
+ #region Constructors
+
+ public MetaProcedureCollection () {
+ }
+
+ #endregion // Constructors
+
+ #region Properties
+
+ public MetaProcedure this[int index] {
+ get {
+ return (MetaProcedure) list[index];
+ }
+ }
+
+ // get the MetaProcedure given its name. if they are overloaded, it gets
+ // the first MetaProcedure for the name
+ public MetaProcedure this[string name] {
+ get {
+ MetaProcedure p = null;
+ foreach(object o in list) {
+ p = (MetaProcedure) o;
+ if(p.Name.Equals(name)) {
+ return p;
+ }
+ }
+ throw new Exception("MetaProcedure not found");
+ }
+ }
+
+ public MetaProcedure GetProcedure(string name)
+ {
+ MetaProcedure p = null;
+ foreach (object o in list) {
+ p = (MetaProcedure) o;
+ if (p.Name.Equals (name))
+ return p;
+ }
+
+ throw new Exception("MetaProcedure not found");
+ }
+
+ public MetaProcedure[] GetProcedures(string name)
+ {
+ ArrayList list = new ArrayList ();
+ foreach (object o in list) {
+ MetaProcedure p = (MetaProcedure) o;
+ if (p.Name.Equals (name))
+ list.Add (o);
+ }
+
+ if (list.Count == 0)
+ throw new Exception("MetaProcedure not found");
+
+ return (MetaProcedure[]) list.ToArray (typeof(MetaProcedure));
+ }
+
+ object IList.this[int index] {
+ get {
+ return list[index];
+ }
+
+ set {
+ list[index] = value;
+ }
+ }
+
+ public int Count {
+ get {
+ return list.Count;
+ }
+ }
+
+ public bool IsFixedSize {
+ get {
+ return false;
+ }
+ }
+
+ public bool IsReadOnly {
+ get {
+ return true;
+ }
+ }
+
+ public bool IsSynchronized {
+ get {
+ return false;
+ }
+ }
+
+ public object SyncRoot {
+ get {
+ throw new InvalidOperationException ();
+ }
+ }
+
+ #endregion // Properties
+
+ #region Methods
+
+ public int Add (object o)
+ {
+ return list.Add ((MetaProcedure) o);
+ }
+
+ public void Clear ()
+ {
+ list.Clear ();
+ }
+
+ public bool Contains (object o)
+ {
+ return list.Contains ((MetaProcedure) o);
+ }
+
+ public void CopyTo (Array array, int index)
+ {
+ list.CopyTo (array, index);
+ }
+
+ public IEnumerator GetEnumerator ()
+ {
+ return list.GetEnumerator ();
+ }
+
+ public int IndexOf (object o)
+ {
+ return list.IndexOf ((MetaProcedure) o);
+ }
+
+ public void Insert (int index, object o)
+ {
+ list.Insert (index, (MetaProcedure) o);
+ }
+
+ public void Remove (object o)
+ {
+ list.Remove ((MetaProcedure) o);
+ }
+
+ public void RemoveAt (int index)
+ {
+ list.RemoveAt (index);
+ }
+
+ #endregion // Methods
+
+ }
+}
+
+
View
73 sqlsharpgtk/browser/MetaTable.cs
@@ -0,0 +1,73 @@
+// MetaTable.cs
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2004 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser
+{
+ public class MetaTable
+ {
+ private string name = "";
+ private string owner = "";
+
+ public MetaTable()
+ {
+ }
+
+ public MetaTable(string tableName)
+ {
+ this.name = tableName;
+ }
+
+ public MetaTable(string tableOwner, string tableName)
+ {
+ this.owner = tableOwner;
+ this.name = tableName;
+ }
+
+ public string Name
+ {
+ get
+ {
+ return name;
+ }
+
+ set
+ {
+ name = value;
+ }
+ }
+
+ public string Owner
+ {
+ get
+ {
+ return owner;
+ }
+
+ set
+ {
+ owner = value;
+ }
+ }
+
+ public override string ToString()
+ {
+ if(owner != null)
+ if(owner.Equals("") == false)
+ return owner + "." + name;
+
+ return name;
+ }
+
+ }
+}
+
View
165 sqlsharpgtk/browser/MetaTableCollection.cs
@@ -0,0 +1,165 @@
+// MetaTableCollection.cs
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2004 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+using System.Collections;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser
+{
+ public class MetaTableCollection : MarshalByRefObject, IList, ICollection, IEnumerable
+ {
+ #region Fields
+
+ private ArrayList list = new ArrayList ();
+
+ #endregion // Fields
+
+ #region Constructors
+
+ public MetaTableCollection ()
+ {
+ }
+
+ #endregion // Constructors
+
+ #region Properties
+
+ public MetaTable this[int index]
+ {
+ get
+ {
+ return (MetaTable) list[index];
+ }
+ }
+
+ public MetaTable this[string name]
+ {
+ get
+ {
+ MetaTable p = null;
+ foreach(object o in list)
+ {
+ p = (MetaTable) o;
+ if(p.Name.Equals(name))
+ {
+ return p;
+ }
+ }
+ throw new Exception("MetaTable not found");
+ }
+ }
+
+ object IList.this[int index]
+ {
+ get
+ {
+ return list[index];
+ }
+
+ set
+ {
+ list[index] = value;
+ }
+ }
+
+ public int Count
+ {
+ get
+ {
+ return list.Count;
+ }
+ }
+
+ public bool IsFixedSize
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public bool IsReadOnly
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public bool IsSynchronized
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public object SyncRoot
+ {
+ get
+ {
+ throw new InvalidOperationException ();
+ }
+ }
+
+ #endregion // Properties
+
+ #region Methods
+
+ public int Add (object o)
+ {
+ return list.Add ((MetaTable) o);
+ }
+
+ public void Clear ()
+ {
+ list.Clear ();
+ }
+
+ public bool Contains (object o)
+ {
+ return list.Contains ((MetaTable) o);
+ }
+
+ public void CopyTo (Array array, int index)
+ {
+ list.CopyTo (array, index);
+ }
+
+ public IEnumerator GetEnumerator ()
+ {
+ return list.GetEnumerator ();
+ }
+
+ public int IndexOf (object o)
+ {
+ return list.IndexOf ((MetaTable) o);
+ }
+
+ public void Insert (int index, object o)
+ {
+ list.Insert (index, (MetaTable) o);
+ }
+
+ public void Remove (object o)
+ {
+ list.Remove ((MetaTable) o);
+ }
+
+ public void RemoveAt (int index)
+ {
+ list.RemoveAt (index);
+ }
+
+ #endregion // Methods
+
+ }
+}
View
216 sqlsharpgtk/browser/MetaTableColumn.cs
@@ -0,0 +1,216 @@
+// MetaTableColumn.cs
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2004 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser
+{
+ public class MetaTableColumn
+ {
+ private string name = "";
+ private string owner = "";
+ private string table = "";
+
+ private string dataType = "";
+
+ private int length = 0;
+ private int precision = 0;
+ private int scale = 0;
+
+ private bool nullable = false;
+
+ private int column_id = 0;
+
+ public MetaTableColumn()
+ {
+ }
+
+ public MetaTableColumn(string tableName, string columnName)
+ {
+ this.table = tableName;
+ this.name = columnName;
+
+ }
+
+ public MetaTableColumn(string tableOwner, string tableName, string columnName)
+ {
+ this.owner = tableOwner;
+ this.table = tableName;
+ this.name = columnName;
+
+ }
+
+ public MetaTableColumn(string tableOwner, string tableName, string columnName,
+ int length, bool nullable, int columnid)
+ {
+ this.owner = tableOwner;
+ this.table = tableName;
+ this.name = columnName;
+ this.length = length;
+ this.nullable = nullable;
+ this.column_id = columnid;
+ }
+
+ public MetaTableColumn(string tableOwner, string tableName, string columnName,
+ int precision, int scale, bool nullable, int columnid)
+ {
+ this.owner = tableOwner;
+ this.table = tableName;
+ this.name = columnName;
+ this.precision = precision;
+ this.scale = scale;
+ this.nullable = nullable;
+ this.column_id = columnid;
+ }
+
+ public MetaTableColumn(string tableOwner, string tableName, string columnName,
+ string data_type,
+ int length, int precision, int scale, bool nullable, int columnid)
+ {
+ this.owner = tableOwner;
+ this.table = tableName;
+ this.name = columnName;
+ this.dataType = data_type;
+ this.length = length;
+ this.precision = precision;
+ this.scale = scale;
+ this.nullable = nullable;
+ this.column_id = columnid;
+ }
+
+ public string Name
+ {
+ get
+ {
+ return name;
+ }
+
+ set
+ {
+ name = value;
+ }
+ }
+
+ public string Owner
+ {
+ get
+ {
+ return owner;
+ }
+
+ set
+ {
+ owner = value;
+ }
+ }
+
+ public string TableName
+ {
+ get
+ {
+ return table;
+ }
+
+ set
+ {
+ table = value;
+ }
+ }
+
+ public string DataType
+ {
+ get
+ {
+ return dataType;
+ }
+
+ set
+ {
+ dataType = value;
+ }
+ }
+
+ public int Length
+ {
+ get
+ {
+ return length;
+ }
+
+ set
+ {
+ length = value;
+ }
+ }
+
+ public int Precision
+ {
+ get
+ {
+ return precision;
+ }
+
+ set
+ {
+ precision = value;
+ }
+ }
+
+ public int Scale
+ {
+ get
+ {
+ return scale;
+ }
+
+ set
+ {
+ scale = value;
+ }
+ }
+
+ public bool Nullable
+ {
+ get
+ {
+ return nullable;
+ }
+
+ set
+ {
+ nullable = value;
+ }
+ }
+
+ public int ColumnID
+ {
+ get
+ {
+ return column_id;
+ }
+
+ set
+ {
+ column_id = value;
+ }
+ }
+
+ public override string ToString()
+ {
+ if(owner != null)
+ if(owner.Equals("") == false)
+ return owner + "." + table + "." + name;
+
+ return table + "." + name;
+ }
+ }
+}
+
View
204 sqlsharpgtk/browser/MetaTableColumnCollection.cs
@@ -0,0 +1,204 @@
+// MetaTableColumnCollection.cs
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2004 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+using System.Collections;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser
+{
+ public class MetaTableColumnCollection : MarshalByRefObject, IList, ICollection, IEnumerable
+ {
+ #region Fields
+
+ ArrayList list = new ArrayList ();
+ string owner;
+ string tableName;
+
+ #endregion // Fields
+
+ #region Constructors
+
+ public MetaTableColumnCollection ()
+ {
+ }
+
+ public MetaTableColumnCollection (string tableName)
+ {
+ this.tableName = tableName;
+ }
+
+ public MetaTableColumnCollection (string owner, string tableName)
+ {
+ this.owner = owner;
+ this.tableName = tableName;
+ }
+
+ #endregion // Constructors
+
+ #region Properties
+
+ public MetaTableColumn this[int index]
+ {
+ get
+ {
+ return (MetaTableColumn) list[index];
+ }
+ }
+
+ public MetaTableColumn this[string name]
+ {
+ get
+ {
+ MetaTableColumn p = null;
+ foreach(object o in list)
+ {
+ p = (MetaTableColumn) o;
+ if(p.Name.Equals(name))
+ {
+ return p;
+ }
+ }
+ throw new Exception("MetaTableColumn not found");
+ }
+ }
+
+ object IList.this[int index]
+ {
+ get
+ {
+ return list[index];
+ }
+
+ set
+ {
+ list[index] = value;
+ }
+ }
+
+ public int Count
+ {
+ get
+ {
+ return list.Count;
+ }
+ }
+
+ public bool IsFixedSize
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public bool IsReadOnly
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public bool IsSynchronized
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public string TableName
+ {
+ get
+ {
+ return tableName;
+ }
+
+ set
+ {
+ tableName = value;
+ }
+ }
+
+ public string Owner
+ {
+ get
+ {
+ return owner;
+ }
+
+ set
+ {
+ owner = value;
+ }
+ }
+
+ public object SyncRoot
+ {
+ get
+ {
+ throw new InvalidOperationException ();
+ }
+ }
+
+ #endregion // Properties
+
+ #region Methods
+
+ public int Add (object o)
+ {
+ return list.Add ((MetaTableColumn) o);
+ }
+
+ public void Clear ()
+ {
+ list.Clear ();
+ }
+
+ public bool Contains (object o)
+ {
+ return list.Contains ((MetaTableColumn) o);
+ }
+
+ public void CopyTo (Array array, int index)
+ {
+ list.CopyTo (array, index);
+ }
+
+ public IEnumerator GetEnumerator ()
+ {
+ return list.GetEnumerator ();
+ }
+
+ public int IndexOf (object o)
+ {
+ return list.IndexOf ((MetaTableColumn) o);
+ }
+
+ public void Insert (int index, object o)
+ {
+ list.Insert (index, (MetaTableColumn) o);
+ }
+
+ public void Remove (object o)
+ {
+ list.Remove ((MetaTableColumn) o);
+ }
+
+ public void RemoveAt (int index)
+ {
+ list.RemoveAt (index);
+ }
+
+ #endregion // Methods
+
+ }
+}
View
82 sqlsharpgtk/browser/MetaView.cs
@@ -0,0 +1,82 @@
+// MetaView.cs
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2005 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser
+{
+ public class MetaView
+ {
+ private string name = "";
+ private string owner = "";
+ private string sql = "";
+
+ public MetaView()
+ {
+ }
+
+ public MetaView(string tableName)
+ {
+ this.name = tableName;
+ }
+
+ public MetaView(string tableOwner, string tableName)
+ {
+ this.owner = tableOwner;
+ this.name = tableName;
+ }
+
+ public string Name
+ {
+ get
+ {
+ return name;
+ }
+
+ set
+ {
+ name = value;
+ }
+ }
+
+ public string Owner
+ {
+ get
+ {
+ return owner;
+ }
+
+ set
+ {
+ owner = value;
+ }
+ }
+
+ public string SQL {
+ get {
+ return sql;
+ }
+ set {
+ sql = value;
+ }
+ }
+
+ public override string ToString()
+ {
+ if(owner != null)
+ if(owner.Equals("") == false)
+ return owner + "." + name;
+
+ return name;
+ }
+ }
+}
+
View
165 sqlsharpgtk/browser/MetaViewCollection.cs
@@ -0,0 +1,165 @@
+// MetaViewCollection.cs
+//
+// Author:
+// Daniel Morgan <danielmorgan@verizon.net>
+//
+// (C)Copyright 2005 by Daniel Morgan
+//
+// To be included with Mono as a SQL query tool licensed under the LGPL license.
+//
+
+using System;
+using System.Data;
+using System.Collections;
+
+namespace Mono.Data.SqlSharp.DatabaseBrowser
+{
+ public class MetaViewCollection : MarshalByRefObject, IList, ICollection, IEnumerable
+ {
+ #region Fields
+
+ private ArrayList list = new ArrayList ();
+
+ #endregion // Fields
+
+ #region Constructors
+
+ public MetaViewCollection ()
+ {
+ }
+
+ #endregion // Constructors
+
+ #region Properties
+
+ public MetaView this[int index]
+ {
+ get
+ {
+ return (MetaView) list[index];
+ }
+ }
+
+ public MetaView this[string name]
+ {
+ get
+ {
+ MetaView p = null;
+ foreach(object o in list)
+ {
+ p = (MetaView) o;
+ if(p.Name.Equals(name))
+ {
+ return p;
+ }
+ }
+ throw new Exception("MetaView not found");
+ }
+ }
+
+ object IList.this[int index]
+ {
+ get
+ {
+ return list[index];
+ }
+
+ set
+ {
+ list[index] = value;
+ }
+ }
+
+ public int Count
+ {
+ get
+ {
+ return list.Count;
+ }
+ }
+
+ public bool IsFixedSize
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public bool IsReadOnly