Created
June 4, 2012 16:51
-
-
Save jcleblanc/2869508 to your computer and use it in GitHub Desktop.
ql.io and Node.js Sample Code from Live Coding Session at UtahJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Engine = require('ql.io-engine'); | |
| var engine = new Engine({ | |
| connection: 'close' | |
| }); | |
| var script = "create table geocoder " + | |
| " on select get from 'http://maps.googleapis.com/maps/api/geocode/json?address={address}&sensor=true' " + | |
| " resultset 'results.geometry.location'" + | |
| "select lat as lattitude, lng as longitude from geocoder where address='Mt. Everest'"; | |
| engine.execute(script, function(emitter) { | |
| emitter.on('end', function(err, res) { | |
| console.log(res.body[0]); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment