Skip to content

Commit

Permalink
feat: Query builder order by (#685)
Browse files Browse the repository at this point in the history
* feat(cubejs-playground): Query builder order change support, UI controls for order change in the playground
  • Loading branch information
vasilev-alex authored Jun 10, 2020
1 parent af7e930 commit d3c735b
Show file tree
Hide file tree
Showing 27 changed files with 2,292 additions and 5,519 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
'no-trailing-spaces': ['error', { skipBlankLines: true }],
'no-unused-vars': ['warn']
}
};
19 changes: 19 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"arrowParens": "always",
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"overrides": [
{
"files": ["*.css", "*.scss"],
"options": {
"singleQuote": false
}
}
]
}
5 changes: 4 additions & 1 deletion packages/cubejs-api-gateway/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,10 @@ class ApiGateway {
{ includeDebugInfo: process.env.NODE_ENV !== 'production' }
);
res({
sql: sqlQuery
sql: {
...sqlQuery,
order: Object.fromEntries(sqlQuery.order.map(({ id, desc }) => [id, desc ? 'desc' : 'asc']))
}
});
} catch (e) {
this.handleError({
Expand Down
Loading

0 comments on commit d3c735b

Please sign in to comment.