Trent Richardson

practical web design & development

Archive for December, 2007

Introducing JsonSQL 0.1

After a bit of work it is now possible to use sql to parse json using javascript!. I introduce to you version 0.1 of JsonSQL. Given a javascript object you can write a simple select statement to filter, order and limit the object:
jsonsql.query(“select title,url from json.channel.items
where (category==’javascript’ || category==’vista’)
order by title,category asc [...]

Many may not know(I just recently learned) about using regular expressions within SQL statements. Instead of using substring functions and such, we can create a clean little regular expression(Oracle):
SELECT zip FROM zipcode WHERE REGEXP_LIKE(zip, ‘[^[:digit:]]’)
Keep in mind however that just like SQL syntax varies for each database(MySQL, Oracle, Postgres, etc.) so does the regular [...]

Nothing Better than a Good Dump!

For all of you ColdFusion programmers out there you know what I’m talking about,.. that cfdump. When in doubt this nice little function will dump out any variable in a readable layout. Well there is also such a tool for javascript thanks to Net Grow! Although it has been around for some [...]

Javascript JSON Parsing with SQL

I’ve been playing with JSON a bit lately and it seems there’s not a lot of options for searching JSON such as the way xpath can search XML. Since there aren’t any slick libraries out there I have been thinking on possibilities of creating such. Would it be slick to have an sql-like [...]

Microsoft += Microsoft–;

A couple things I would like to share. While I’m not having a change of heart I would like to say I’ve reevaluated my perspective towards Microsoft. Lately I’ve tried to reorganize my work flow to adapt to my “environment”. At my desk sites a Vista machine and an Ubuntu machine..
Since I’ve [...]