In light of request to support inner-query (#103), compound query (on Slack), etc. In last product meeting, people have agreed we would try to have two features and see if developers are happy with those instead of "building another Query object to replace SQL."
This issue is a meta-discussion issue for the topic, and list out potential tasks involved.
Query Template (Saved Query)
Utility Function to convert SQL Query result to Skygear Records
Query Template (Saved Query)
There are two ways to do it:
Method 1. In Development Mode, a Skygear instance would accept SQL Query from client SDK and save it as a template, and run them in production mode.
Method 2. In Developer Portal, there will be UI for developers to construct SQL Query with placeholder variables, and call them easily from Client SDK.
Method 1 and 2 can be mixed, but we might also prioritise and only do one of the two ways first.
It is also noted that the Query result will need to be in a specific format in-order to return the Skygear Record correctly. It is agreed that we should do it via an UI to guide users construct the query.
Tasks (Method 2)
[ ] Support Query Template on skygear-server
[ ] Support Query Template on iOS, Android Javascript SDK
[ ] Developer Portal should have an UI to configure the query templates. (How to assist users to construct the correct result?
Utility Function to convert SQL Query result to Skygear Records
For developers who develop Cloud Functions for complicated queries, how can we make it easy for developers to construct and return a Skygear Records to the client?
An idea is we can have utility functions in Javascript and Python, to convert simple hashmap/result returned from popular ORM into a Skygear Record at the client side.
Questions
In Python, besides dict, what other ORM we should support? (SQLAlchemy? Any other?)
In Javascript, besides array map, what other ORM we should support? (sequelizejs?)
In light of request to support inner-query (#103), compound query (on Slack), etc. In last product meeting, people have agreed we would try to have two features and see if developers are happy with those instead of "building another Query object to replace SQL."
This issue is a meta-discussion issue for the topic, and list out potential tasks involved.
Query Template (Saved Query)
There are two ways to do it:
Method 1 and 2 can be mixed, but we might also prioritise and only do one of the two ways first.
It is also noted that the Query result will need to be in a specific format in-order to return the Skygear Record correctly. It is agreed that we should do it via an UI to guide users construct the query.
Tasks (Method 2)
Utility Function to convert SQL Query result to Skygear Records
For developers who develop Cloud Functions for complicated queries, how can we make it easy for developers to construct and return a Skygear Records to the client?
An idea is we can have utility functions in Javascript and Python, to convert simple hashmap/result returned from popular ORM into a Skygear Record at the client side.
Questions