dragnilar / databvase Goto Github PK
View Code? Open in Web Editor NEWA (sorta) lightweight query tool for MS Sql Server that makes usage of DevExpress to provide a rich user interface
A (sorta) lightweight query tool for MS Sql Server that makes usage of DevExpress to provide a rich user interface
Add a query builder, similar to the one in SSMS so that users have a visual aid to create joins and other types of queries.
As of 4/30/18 this is about 45% finished. The code needs to be cleaned up and the queries created need to be sent to a query tab. A loading/wait message may also be desired as the query builder has to create a connection when it's instantiated, and this can take some time.
Databvase only displays one query results grid at a time. This means that if you fire off a query that returns two or more results sets (I.E. Select * from table1, select * from table 2), you only get the first tables worth of results back.
SSMS is capable of displaying multiple results. It would be nice if Databvase were able to capture this functionality.
The settings window is bare bones at this point. It could expose more settings.
Some potential candidates are:
Add an about/information window that displays at minimum:
Result:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Databvase_Winforms.Controls.QueryTextEditor.QueryTextEditor.RegisterSyntaxHighlightingService(Boolean forceExecute) in C:\Users\swhite\source\repos\Databvase-master\Databvase-Winforms\Controls\QueryTextEditor\QueryTextEditor.cs:line 55
at Databvase_Winforms.Controls.QueryTextEditor.QueryTextEditor.ApplyFontChange() in C:\Users\swhite\source\repos\Databvase-master\Databvase-Winforms\Controls\QueryTextEditor\QueryTextEditor.cs:line 134
at Databvase_Winforms.Controls.QueryTextEditor.QueryTextEditor.ApplySettingsUpdate(SettingsUpdatedMessage message) in C:\Users\swhite\source\repos\Databvase-master\Databvase-Winforms\Controls\QueryTextEditor\QueryTextEditor.cs:line 127
Currently the .exe size is being bloated a little due to the fact that Costura is embedding the DevExpress localization files. These should be removed to help trim down the size of the .exe.
The object explorer currently shows all user and system views/stored procedures/function nodes in their respective folders. They should be grouped into sub folders to help prevent users with navigating a database.
The syntax highlighting service causes a minor delay when typing into the query text editor. While it is still perfectly usable, this causes a slight annoyance for people who are used to the "normal" performance provided by SSMS and Visual Studio.
DevExpress has acknowledged this in their own forums. Unfortunately it looks like they do not have immediate plans to address this because it would require heavily reworking the Rich Text Editor control. Since this looks like something that could take years(?) to get fixed, its probably time to look into other options.
17dc2e0 - Users are now able to hold alt and make rectangular selections in the Scintilla editor to highlight rectangular regions of text. They are also now able to retain focus if they select a whole column of text and start typing and all text will go to all lines in the region.
Note: I know this is functionality that is of course baked into Scintilla/Notepad++ but its also important to have it since its EXTREMELY useful. SSMS features it as well.
Syntax highlighting is currently being handled by a regex to just "make it work". This isn't really the most ideal solution as there are various scenarios that it doesn't cover. For example, you can have:
/* select * from sometable
-- where somevalue = ''
*/
The syntax highlighting may not work correctly in this scenario.
It would be ideal to possibly replace this with a true SQL parser to get the most SSMS like experience.
The execution plan for a query can be obtained from SQL Server.
There's probably a number of ways that this can be handled, and of course this could get rather time consuming depending on how one goes about rendering the plan (I.E. Go SSMS style and show icons for each node in the plan, etc.)
A C# example can be found here:
Some of the groups on the ribbon display as [X] boxes when you add them to the quick access bar on the ribbon.
A likely fix for this would be to just remove the quick access bar unless its found that this is functionality that people would find useful.
Repro Steps:
Possibly optional pre-req: You may need to have enabled Direct X prior to performing the steps below.
Reason:
The event in the VM always fires whenever the data binding changes. Since the value for UseDirectX is being set in the constructor, the event detects a change and fires.
Change:
For now I added an additional window state to the VM so that it first goes through a "loading" state before it sets the state to "shown". Subsequently the event for the direct x setting will only display the message if the window is actually shown. This isn't exactly the most ideal solution but I don't feel like spending a lot of time on this since this is more of a minor annoyance than anything else.
SMO provides the ability to create database backups, so it shouldn't be (too difficult) to possibly add the ability to create a backup wizard/gui in Databvase.
Currently when an error occurs with a query (I.E. Bad syntax, table doesn't exist, etc), the messages tab does not get focused on a query pane. The user has to manually select the messages tab to see what went wrong. A message should be sent to the query pane to have it switch the focus to the messages tab.
Keyboard shortcuts can be added to enhance usability
ex.
Databvase currently use the connect -> do action -> disconnect pattern for all database operations. This is fine but it may be advantageous to add the ability to use connection pooling. SMO provides this functionality, so its very feasible to add it to Databvase.
The default DevExpress grid filters do not provide the user with the ability to easily distinguish nulls and empty strings.
As a result both are combined in a category called 'blank'. This isn't a humongous problem but it does hurt the overall usability to filter out nulls from empty strings in specific data shaping/researching scenarios. It appears to overcome this, a custom filter will have to be used.
It isn't known at this point if this will require overriding the filter feature for all types of columns or if DevExpress allows you to handle it more selectively.
The query builder does not show a wait form when loading, and it takes a while. It could possibly be made async but for now we should at least show a wait form so that the user doesn't think the app is frozen.
The object explorer is currently lacking the ability to refresh it. As a result, if any object is changed, the user has to disconnect and reconnect to an instance before they can see what has been added/changed/removed in the object explorer.
While on this subject, it would probably be also good if renaming of objects could be done in real time, but that's probably a separate enhancement.
Add unit tests for the data access layer in databvase
High DPI support is currently not implemented. As a result, Databvase may appear distorted and/or unusable on computers that are using DPI settings greater than 100%. It would be good to have this so that Databvase functions consistently across computers.
It would be extremely nice if Databvase had intellisense.
This is unfortunately not easy to implement since DevExpress does not provide it out of the box and its obviously a feature that would take a significant amount of work to implement.
The RichTextEdit is a good control but it unfortunately isn't really meant for being used as a code editor.
There are two possible candidates for replacing this:
Between the two, Scintilla looks to be the more likely candidate since it has a Windows Forms wrapper.
Currently all functions are shown as nodes under the function folder. Scalar/Table/etc should be placed into their own folders.
99cf3f5 - Column data types and sizes are now more accurate. This uses some new extension methods added to improve upon what SMO already provides.
Add a logging framework ( NLog is preferred candidate right now )
Currently if you export a large query results grid to any particular file type, the export process can take a while. This seems to be more or less something to be expected since Databvase is using the default DevExpress functionality baked into the grid. It is possible to make it faster, but it would require possibly implementing some custom exporting code.
27a8f71 - All references to "ConnectionString" have been renamed appropriately (simply either Connection or SavedConnection). This is to better emphasize that these are being used for Databvase's "SavedConnection" objects, which are not the same thing as a SQL Connection String. There is still one reference left, but that is for the query builder, which DOES use Connection Strings.
Note that this change also requires that if you have any previous connections saved in your config file to be renamed to the settings group Saved Connections. If you do not rename it, the next time you open the program, your saved connections will not show up and you will need to reinput them. Since the program is still in "alpha", we will NOT be adding any processes to automatically convert the setting to the new category.
Starting with 59fe97a, the last used saved connection is automatically selected when the connection window is shown. If the program is opening for the first time, the last used saved connection will of course be blank, so nothing will be selected.
For a separate enhancement, we should probably add an ability to delete saved connections and clear out the last used saved connection if it gets deleted from the collection.
Scintilla.NET provides a larger number of color settings for syntax highlight, line numbers, etc. We should expose those settings in the configuration in Databvase.
When you select or type in a filter for the object explorer, matching nodes should show their child nodes as well.
Add ability to right click and generate modify and alter scripts for views to the object explorer.
The query text editor allows you to copy and paste images into it since its a Rich Edit control (similar to Wordpad/MS Word). This functionality should be disabled since the query text editor isn't meant for creating documents with pictures in them.
Repro:
NOTE: SSMS does NOT do this asynchronously...
Upgrade to DevExpress 18.1 when it comes out of beta.
Some of the new features that would be useful are:
SSMS allows you to cancel long running queries that may cause deadlock and/or are just taking too long to return results. It would be good if Databvase provides this functionality.
SMO seems to provide some way to implement this.
While this is a highly unrealistic possibility, it would be great to have the ability to edit records in the grid and commit them on the fly, like with Data Grip.
This could be possible, but some significant work would be required.
Assuming you are building from source knowing which specific libraries to grab would be beneficial
Add the ability to view the properties of each node via right click menu options, similar to SSMS.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.