SkygearIO / skygear-server

Skygear - an open source serverless platform for modern secure app development
https://skygear.io
Apache License 2.0
408 stars 84 forks source link

[Discussion] Query Template (Saved Query) and Utility Function to convert SQL Query result to Skygear Records #314

Closed chpapa closed 7 years ago

chpapa commented 7 years ago

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.

  1. Query Template (Saved Query)
  2. Utility Function to convert SQL Query result to Skygear Records

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

chpapa commented 7 years ago

Moved this meta issue to skygeario/features#10