Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax checked YQL queries using hssqlppp #1

Open
dag opened this issue May 27, 2012 · 0 comments
Open

Syntax checked YQL queries using hssqlppp #1

dag opened this issue May 27, 2012 · 0 comments

Comments

@dag
Copy link
Owner

dag commented May 27, 2012

Something like:

let query = [yql| SELECT name FROM github.user.info WHERE id = $s(name); |]
    name = "dag"
in [jmacro| YUI().use "yql" \y ->
              y.YQL `(query)` \r ->
                alert r.query.results.user.name |]

However preferably more type safe: the above query can be used as a string anywhere in JS. One option is to save the callback in a variable:

[jmacro| YUI().use "yql" \y
           { var cb = \r -> alert r.query.results.user.name
           ; `(query y cb)`
           } |]

However, having to name the function is arguably ugly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant