For sql queries that start with 'SELECT ...

def get(self, uri=''):
        "For sql queries that start with 'SELECT ...'"
        (node, rule_kw) = node_from_uri(uri)

        if node == None:
            abort(404)
        rule_kw.update( node )
        values = rule_kw
        xhr_data = request.get_json()
        if xhr_data:
            values.update( xhr_data )
        values.update( request.form.to_dict(flat=True) )
        values.update( request.args.to_dict(flat=True) )
        values.update( request.cookies )
        values['method'] = request.method
        noderequest = values.copy()
        noderequest.pop('node_id')
        noderequest.pop('name')
        noderequest.pop('value')

        current_app.logger.debug("get kw: %s", values)
        rendered = render_node(node['id'], noderequest=noderequest, **values)
        current_app.logger.debug("rendered: %s", rendered)
        if rendered:
            if not isinstance(rendered, (str, unicode, int, float)):
                # return a json string
                return encoder.encode(rendered)
            return rendered

        # Nothing to show, so nothing found
        abort(404)