-
Notifications
You must be signed in to change notification settings - Fork 8
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
Browserify WIP #56
base: master
Are you sure you want to change the base?
Browserify WIP #56
Conversation
I love it :D Thank you very much, I faced some problems: When compiling:keywords = require('./sql_keywords') I think the solution is to rename sql_keywords.json to sql_keywords.coffee When running in console:#gesundheit.select('jobs', ['name', 'id']).compile() #json = gesundheit.select('jobs', ['name', 'id']).toJSON() #object = gesundheit.fromJSON(json) I changed: Then it returnes: But I cannot use any of the gesundheit methods.. I'm doing something wrong? |
Well, the security must have some kind of schema, so the client is only allowed to do some kind of actions on the different tables. 'table': {allow: {'select': ['field', 'fields']}} etc. www.meteor.com have some kind of query-manager in the browser, but I don't know how they handle security. What do you think? But again security and client-side engine must be handled by the developer, or else we move to new project. |
Sorry, |
I think that would be configuration for the validator object supplied to the I would then much prefer to merge an implementation of a validator object that somebody has used in a real application rather than write one myself. I think that whitelisting |
BTW I fixed the sql_keywords file so that it is present again... though I'm thinking your solution might be better, as there's no reason that I can see for the client code to worry about quoting keywords. |
I tried to submit a commit but I got access denied. |
yes you must fork and send a pull request. Check out this help topic |
I will look at the code :) Thank you... |
Queries and nodes now support a to/from JSON interface allowing them to be compiled to a datastructure on the client.
This s not ready for merge, but meant to track progress on some ideas I have.
The motivation is to allow client-side javascript to use the gesundheit API to simplify interactive query building.
The architecture I have in mind is to make gesundheit browserify-able and support marshalling/unmarshalling queries from JSON objects. Then a client-side application can build any possible gesundheit query, turn it into JSON and send it over the wire to the server. The server can then unmarshal it into a Query object, execute it, and send back the results. This much already works, but there are some outstanding issues:
.execute
on a query object, and this would automatically send a request in a predefined format to a user-configurable URL./cc @jamalsoueidan