Monday, April 4th, 2005

SQL to query JavaScript? :)

Category: JavaScript

<>p>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 http://trimpath.com/demos/test1/trimpath/query_demo.html

And, more TrimQuery information is available at http://trimpath.com/project/wiki/TrimQuery

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

Related Content:

7 Comments »

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

Eric,
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.id, 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.id, 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 http://trimpath.com/project/wiki/TrimJunction, 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…

http://trimpath.com/project/wiki/TrimJunction

Comment by Steve Yen — May 10, 2005

Leave a comment

You must be logged in to post a comment.