Monday, April 4th, 2005

SQL to query JavaScript? :)

Category: JavaScript

TrimPath has a new TrimQuery release which groks SQL:

With some inspiration from the JavaScript DB project, I’ve finally added a SQL parsing frontend to TrimQuery, release 1.0.28.

That is, the TrimQuery engine now supports SQL instead of just the TrimQuery Language (TQL).

You can take a look at the new demo page for a quick test drive

And, more TrimQuery information is available at

Not quite sure how I feel about an SQL parser in JavaScript… but cool!

Posted by Dion Almaer at 10:37 am

3.3 rating from 12 votes


Comments feed

Just FYI to readers, that demo page throws piles of errors in IE, sits inertly in Mozilla, and crashes Opera messily.

Comment by Eric Thompson — April 4, 2005

It works for me on Firefox 1.0 & IE 6.x, win 2k. But, then again, I wrote it, so that’s no surprise.

Comment by Steve Yen — April 5, 2005

It doesnt appear to do anything at first because when the page loads the query has already run. Try the query below and you should see something change: SELECT, Customer.acctBalance FROM Customer

Comment by Bart — April 5, 2005

I can confirm this works for me on XP (SP1) using IE6 and Mozilla.

Comment by Bart — April 6, 2005

I think I see the problem. I ran:

SELECT id, acctBalance FROM Customer

which produces the behavior I described (errors in IE, inaction in Mozilla). Qualifying the tablename for each field does appear to work.

Comment by Eric Thompson — April 7, 2005

Yeah, you have to qualify the tablenames.

SELECT, Customer.acctBalance FROM Customer

And, it worked for me find on firefox and IE 6.x on win2K. Very strange. What IE version are you running?

By the way, I finally found a use for TrimQuery. See, a Ruby-on-Rails clone in JavaScript.

Comment by Steve Yen — May 10, 2005

Whoops, the last post had a buggered URL with the extra comma. Try…

Comment by Steve Yen — May 10, 2005

Leave a comment

You must be logged in to post a comment.