malcolmhardie-solutions – Angus Thinks… https://www.malcolmhardie.com/weblogs/angus SQLEditor for Mac OS X, Life and general thoughts Wed, 06 Jan 2010 02:05:46 +0000 en-US hourly 1 https://wordpress.org/?v=6.3.1 SQLEditor 1.6 final https://www.malcolmhardie.com/weblogs/angus/2010/01/06/sqleditor-1-6-final/ https://www.malcolmhardie.com/weblogs/angus/2010/01/06/sqleditor-1-6-final/#respond Wed, 06 Jan 2010 02:04:26 +0000 http://www.malcolmhardie.com/weblogs/angus/?p=479 Continue reading ]]> So, if you’ve seen SQLEditor recently, you’ll hopefully have seen that there is a new version out: version 1.6. This got released just at the beginning of December 2009

1.6 is something that I’ve been working on now for a long time, it is essentially (the unreleased) version 1.5 with improvements and updates. In particular it contains a SQL parser that was written using ANTLR and a new JNI based system for using JDBC drivers with support for Java 6 JDBC drivers.

It’s also the first release version of SQLEditor that is compatible with Snow Leopard. SQLEditor 1.4.7 and earlier had an unusual architecture. When I originally started writing SQLEditor, it was a Java application with a Swing user interface. After some development it seemed clear that java swing was proving limited in some ways. I rewrote the user interface layer in Cocoa, leaving the model layer in Java and using Cocoa Java to connect the two parts together. The application development continued and new versions were released. Eventually though, Apple decided that Cocoa Java was not the future and decided to deprecate it.

Work began immediately on rewriting the crucial components of SQLEditor, although there were some issues.

The first was the model code. Every object in an SQLEditor document is represented by an object and all of the code for these objects was written in Java. All of the object code was rewritten and tested against the earlier versions to check that it still worked. It was very important that files from previous versions continued to work (and as far as I know all of them so far do). New code was written to read and write the SQLEditor document xml format.

The second major issue was that the database interface used JDBC drivers, which are written in Java. Native code would use ODBC drivers. Although similar this might mean that users wouldn’t be able to use existing arrangements to access databases.

Eventually code was written to bridge between SQLEditor native code and the JDBC drivers using the Java Native Interface (JNI).

The other crucial problem was the SQL parser. This is used if you paste SQL code into SQLEditor or if you import a file. The SQL parser was written using JavaCC, a parser generator that is written in and produces Java code. Several parser generators were looked at to replace JavaCC and eventually ANTLR was chosen.

A new SQL parser was written and tested during 2009 in ANTLR and is included in SQLEditor 1.6. The new parser is completely rewritten compared to the one that existed in SQLEditor 1.4.7 and no code is shared between them.

A major step in developing the new parser was to port all of the SQL test cases from Java (in 1.4.7) to objective C (in 1.6). These automated unit tests are run against the parser to ensure that the new parser behaves correctly compared to both the 1.4.7 parser and the assorted SQL standards.

It is still something of a work in progress though, there are things it doesn’t support and it’s still being actively worked on. One particular thing that makes this somewhat harder than it might otherwise be is that it must accept SQL in several different dialects, not just a single standard.

SQLEditor 1.6 also included user interface improvements and various performance fixes.

Overall it’s an improved program, although I do wish that it had been released sooner.

Thanks to everyone using SQLEditor for your patience and also for trying the beta versions.

]]>
https://www.malcolmhardie.com/weblogs/angus/2010/01/06/sqleditor-1-6-final/feed/ 0
SQLEditor: Compound Foreign Keys https://www.malcolmhardie.com/weblogs/angus/2009/04/09/sqleditor-compound-foreign-keys/ https://www.malcolmhardie.com/weblogs/angus/2009/04/09/sqleditor-compound-foreign-keys/#respond Thu, 09 Apr 2009 17:00:37 +0000 http://www.malcolmhardie.com/weblogs/angus/?p=398 Continue reading ]]> The newest version of SQLEditor (1.4.4b1) now has support for compound foreign keys. This is something that people have been asking about for a while now, so I’m pleased that it got included.

There are some things that may need to be improved, but I’m fairly happy with the first revision of this.

Diagram showing compound foreign key

Diagram showing compound foreign key

The compound foreign key object is a new table level object that you can add from the Object menu just like a field or index. Then you drag from the foreign key to the target table. Finally you use the inspector to create pairs of columns to link together.

When importing from a database SQLEditor will try to create field-to-field links on foreign keys with only 1 pair of columns unless you tell it otherwise. (There is a new preference to do this)

Support is fairly complete, SQL parsing, database import, database export and SQL export are all available so it should work fairly well. I think the only thing it doesn’t do is auto-create indexes, so you may need to do this by hand on referenced columns (for those databases that need this)

There is naturally a new inspector palette to go with the table object.

Compound foreign key inspector

Compound foreign key inspector

This allows you to add pairs of columns using the + button at the bottom. Choose your columns using the little popup menus.

The whole thing is completely new, so please send in your thoughts to the usual address.

Download SQLEditor 1.4.4b1

(or enable the “Check for beta versions” preference and then use the check for updates feature)

]]>
https://www.malcolmhardie.com/weblogs/angus/2009/04/09/sqleditor-compound-foreign-keys/feed/ 0
What have I been doing recently? https://www.malcolmhardie.com/weblogs/angus/2007/06/11/what-have-i-been-doing-recently/ https://www.malcolmhardie.com/weblogs/angus/2007/06/11/what-have-i-been-doing-recently/#comments Mon, 11 Jun 2007 12:40:44 +0000 http://www.malcolmhardie.com/weblogs/angus/2007/06/11/what-have-i-been-doing-recently/ Continue reading ]]> Well no updates for a bit. Humm?

The main things I’ve been working on:

1) SQLEditor. Lots of things are being worked on. The user interface is being rewritten to improve speed and increase flexibility, the data layer is being rewritten to switch it to cocoa (instead of java), the JDBC code is being rewritten to make it use JNI instead of cocoa/java and a new crash reporting system based on Google BreakPad is being worked on. There are also some other things too like live source view and assorted bug fixes.
2) HTMLValidator. Also undergoing development. It recently moved across to use Sparkle (yey!) instead of the SQLEditor derived update system (which will also be replaced eventually). The final 1.0 release is due very soon now and several people have set in nice comments.
3) A new idea (still secret) 🙂

4) Web site improvements for malcolmhardie.com. Some have been deployed, others are still waiting to be deployed. Although the biggest one which is almost entirely invisible is the rewritten order processing system, which now supports multiple different products and better management features. But only I (and my somewhat-trusted minions) will ever see it. 😉

Then when I’ve not been working I’ve been playing Pikmen on my new gamecube. (Many thanks to Leynos!). I’ve wanted to play this game properly for years and years and it definitely meets and exceeds my expectations.

Although I also played some theme hospital this morning using Parallels 3.0 (new release). It runs really nicely, although since it is an ancient game (1997) this shouldn’t be too surprising. I hope to try out some of my other really old games to see how they perfom under parallels.

]]>
https://www.malcolmhardie.com/weblogs/angus/2007/06/11/what-have-i-been-doing-recently/feed/ 2
SQLEditor 1.3.2 https://www.malcolmhardie.com/weblogs/angus/2007/01/17/sqleditor-132/ https://www.malcolmhardie.com/weblogs/angus/2007/01/17/sqleditor-132/#respond Wed, 17 Jan 2007 05:57:47 +0000 http://www.malcolmhardie.com/weblogs/angus/2007/01/17/sqleditor-132/ Continue reading ]]> SQLEditor 1.3.2 received a very limited release to a few selected testers at the end of 2006. However there were some additional issues that needed a bit more work, so the current plan is for a 1.3.3 release before the end of January.

]]>
https://www.malcolmhardie.com/weblogs/angus/2007/01/17/sqleditor-132/feed/ 0
SQLEditor 1.3.1 https://www.malcolmhardie.com/weblogs/angus/2006/12/10/sqleditor-131/ https://www.malcolmhardie.com/weblogs/angus/2006/12/10/sqleditor-131/#respond Sun, 10 Dec 2006 06:50:24 +0000 http://www.malcolmhardie.com/weblogs/angus/2006/12/10/sqleditor-131/ Continue reading ]]> SQLEditor 1.3.1 got released on Friday afternoon, this was really just a bug fix release which fixed a handful of problems that were identified. I think the only major fix was that the new UID system was slightly broken in that if you copied an object, or duplicated it in some cases, then SQLEditor would not always recreate the unique ID numbers that represent each object. This had the effect that if you copied an object, SQLEditor couldn’t distinguish between the objects when reloading and so all connectors would be attached to the original object and not the new one. An unfortunate bug. 🙁

It has now been fixed, along with slight improvements to image saving and a fix for a menu shortcut not being correct. The latter was an odd problem in that a shortcut was set, but it actually conflicted with an existing shortcut and the cocoa menu system is smart enough not to display the same shortcut for more than one menu.

[Download] 2.8MB DMG

For some reason also I don’t think I posted about the 1.3 release. But the 1.3 release was posted on November 23rd and is the first non-beta release to be released since May 2006. It rolled all of the improvements that had been made during the beta testing phase into a new release and is definitely worth upgrading (especially since the upgrade is free). However the 1.3 release has been superceded by the 1.3.1 release, so download that instead.

]]>
https://www.malcolmhardie.com/weblogs/angus/2006/12/10/sqleditor-131/feed/ 0
MalcolmHardie Solutions Weblog https://www.malcolmhardie.com/weblogs/angus/2006/10/31/test-b/ https://www.malcolmhardie.com/weblogs/angus/2006/10/31/test-b/#respond Tue, 31 Oct 2006 07:20:52 +0000 http://www.malcolmhardie.com/weblogs/angus/?p=192 Continue reading ]]> About the new MalcolmHardie Solutions weblog.

The new weblog will contain posts about SQLEditor and other products.

If you already reading Angus Thinks you probably don’t need to read the MalcolmHardie weblog as well because all the posts on the MalcolmHardie Solutions weblog will appear on Angus Thinks.

This mirroring is done using the xmlrpc api and code from the blogger api plugin for wordpress

]]>
https://www.malcolmhardie.com/weblogs/angus/2006/10/31/test-b/feed/ 0