pk software dev blog

custom microsoft .net application development

24. August 2009 19:15
by Paul

The Big Bang Mini SQL Query Changes

24. August 2009 19:15 by Paul

Just a quick note on some recent changes.

The other day I checked in some “breaking changes” around the gathering of database schema information. I used to rely on the very bland combined DataTable information. I took the plunge and converted it to populate a tree of classes:

  • DbModelInstance
    • Tables
      • Columns
    • Views
      • Columns

The columns contain some pretty rich data type information and have remained pretty generic.

There are primary key and non key collection filters etc. The main outstanding requirements that you simply cannot get out of the connection schema is foreign key relationships. This will need to be specific per connection which is a bit lame, some data sources will miss out simply due to the number of databases out there.

The other big change is that I am not trying to coerce all the schema gathering into the one area (my original hope) but now use a base schema collector with derivatives as required. Another advantage of this change is that I can actually provide schema information for databases that don not implement the “Get Schema” methods, for example, I have implemented an MS SQL Compact Edition (3.5) provider enabling Mini SQL Query to work nicely with SQLCE databases even though the provider throws a not implemented exception on a GetSchema call. I did this with a little help from Erik Ejlskov Jensen (http://erikej.blogspot.com). I am also looking at wrapping up his SQLCE Export tool as a plugin – see http://sqlcecmd.codeplex.com/.

Anyway, for now browse the code if you want to know more, I think its time for another release!

Comments are closed