{"action":"created","issue":{"url":"https://api.github.com/repos/begriffs/postgrest/issues/280","labels_url":"https://api.github.com/repos/begriffs/postgrest/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/begriffs/postgrest/issues/280/comments","events_url":"https://api.github.com/repos/begriffs/postgrest/issues/280/events","html_url":"https://github.com/begriffs/postgrest/issues/280","id":105752392,"number":280,"title":"Extending the capabilities of &select parameter (and filtering along with it)","user":{"login":"ruslantalpa","id":5537246,"avatar_url":"https://avatars.githubusercontent.com/u/5537246?v=3","gravatar_id":"","url":"https://api.github.com/users/ruslantalpa","html_url":"https://github.com/ruslantalpa","followers_url":"https://api.github.com/users/ruslantalpa/followers","following_url":"https://api.github.com/users/ruslantalpa/following{/other_user}","gists_url":"https://api.github.com/users/ruslantalpa/gists{/gist_id}","starred_url":"https://api.github.com/users/ruslantalpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruslantalpa/subscriptions","organizations_url":"https://api.github.com/users/ruslantalpa/orgs","repos_url":"https://api.github.com/users/ruslantalpa/repos","events_url":"https://api.github.com/users/ruslantalpa/events{/privacy}","received_events_url":"https://api.github.com/users/ruslantalpa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-09-10T07:56:32Z","updated_at":"2015-09-18T08:48:16Z","closed_at":null,"body":"What do you guys think about implementing this https://github.com/ruslantalpa/skin (ignore the code quality and the specific implementation details)\r\nThe details are in the README\r\n\r\nRight now you can do this\r\n```\r\n&select=col1,col2::int,col3->>sub1::json,col3->sub1->>sub2::int\r\n```\r\n\r\nI propose to add the capabilities to do this\r\n```\r\n&select=id,name,projects(id,name,tasks(id,name))\r\n```\r\nand this\r\n```\r\n&id=eq.1&projects.tasks.completed=eq.true\r\n```\r\n\r\nThis would allow the capability of getting back results that look like this\r\n```\r\n[  \r\n   {  \r\n      \"id\":1,\r\n      \"name\":\"Windows 7\",\r\n      \"clients\":{  \r\n         \"id\":1,\r\n         \"name\":\"Microsoft\"\r\n      },\r\n      \"tasks\":[  \r\n         {  \r\n            \"id\":1,\r\n            \"name\":\"Design w7\"\r\n         },\r\n         {  \r\n            \"id\":2,\r\n            \"name\":\"Code w7\"\r\n         }\r\n      ],\r\n      \"users\":[  \r\n         {  \r\n            \"id\":1,\r\n            \"name\":\"Angela Martin\"\r\n         },\r\n         {  \r\n            \"id\":3,\r\n            \"name\":\"Dwight Schrute\"\r\n         }\r\n      ]\r\n   }\r\n]\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/begriffs/postgrest/issues/comments/141384133","html_url":"https://github.com/begriffs/postgrest/issues/280#issuecomment-141384133","issue_url":"https://api.github.com/repos/begriffs/postgrest/issues/280","id":141384133,"user":{"login":"ruslantalpa","id":5537246,"avatar_url":"https://avatars.githubusercontent.com/u/5537246?v=3","gravatar_id":"","url":"https://api.github.com/users/ruslantalpa","html_url":"https://github.com/ruslantalpa","followers_url":"https://api.github.com/users/ruslantalpa/followers","following_url":"https://api.github.com/users/ruslantalpa/following{/other_user}","gists_url":"https://api.github.com/users/ruslantalpa/gists{/gist_id}","starred_url":"https://api.github.com/users/ruslantalpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruslantalpa/subscriptions","organizations_url":"https://api.github.com/users/ruslantalpa/orgs","repos_url":"https://api.github.com/users/ruslantalpa/repos","events_url":"https://api.github.com/users/ruslantalpa/events{/privacy}","received_events_url":"https://api.github.com/users/ruslantalpa/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T08:48:16Z","updated_at":"2015-09-18T08:48:16Z","body":"So i've made some headway in https://github.com/ruslantalpa/skin\r\nMy plan is to work there until it's fully functional (able to handle all GET requests) and then integrate it into a custom branch in PostgREST.\r\nThe current state is:\r\nIt reads the the db structure (all the schemas) at once and detects all the relations (except many to many and except views, i'll add that soon)\r\nIt understands \"select\" parameter with possible json paths and casting and nested items.\r\nI added a lot of type declarations that are just naming strings to make it more clear what those strings are\r\n\r\nI would appreciate comments on the code, if it's heading the right way, anything that does not look right ...  \r\n\r\nThanks\r\n"}}