Skip to content

Commit 6458ae7

Browse files
committed
update changelog, release new version
1 parent 07e937f commit 6458ae7

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

Diff for: CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 0.0.8 (March 18, 2020)
2+
3+
- Bug Fix: Translate id to primary key for custom primary keys.
4+
- Bug Fix: Respect primary key on order by.
5+
- Bug Fix: Fix typo in GET_MANY_REFERENCE.
6+
- Bug Fix: Set `asc` as default sorting order in GET_LIST.
7+
18
## 0.0.7 (September 17, 2019)
29

310
- Bug Fix: Re-build library to fix discrepancies. Pass `where` arguments to `count` query.

Diff for: package-lock.json

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/index.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ export default (serverEndpoint, httpClient, config) => {
8383
params.sort.field = primaryKey;
8484
}
8585

86-
const orderBy = primaryKey !== DEFAULT_PRIMARY_KEY && params.sort.field === DEFAULT_PRIMARY_KEY ? primaryKey : params.sort.field;
8786
switch (type) {
8887
case 'GET_LIST':
8988
// select multiple
@@ -94,7 +93,7 @@ export default (serverEndpoint, httpClient, config) => {
9493
finalSelectQuery.args.limit = params.pagination.perPage;
9594
finalSelectQuery.args.offset = (params.pagination.page * params.pagination.perPage) - params.pagination.perPage;
9695
finalSelectQuery.args.where = params.filter;
97-
finalSelectQuery.args.order_by = { column: orderBy, type: typeof params.sort.order === 'undefined' ? 'asc' : params.sort.order.toLowerCase() };
96+
finalSelectQuery.args.order_by = { column: params.sort.field, type: typeof params.sort.order === 'undefined' ? 'asc' : params.sort.order.toLowerCase() };
9897
finalCountQuery.args.table = { 'name': tableName, 'schema': schema };;
9998
finalCountQuery.args.where = {};
10099
finalCountQuery.args.where[primaryKey] = { '$ne': null };
@@ -186,7 +185,7 @@ export default (serverEndpoint, httpClient, config) => {
186185
finalManyRefQuery.args.offset = (params.pagination.page * params.pagination.perPage) - params.pagination.perPage;
187186
finalManyRefQuery.args.where = { [params.target]: params.id };
188187
finalManyRefQuery.args.where = addFilters(finalManyRefQuery.args.where, params.filter);
189-
finalManyRefQuery.args.order_by = { column: orderBy, type: typeof params.sort.order === 'undefined' ? 'asc' : params.sort.order.toLowerCase() };
188+
finalManyRefQuery.args.order_by = { column: params.sort.field, type: typeof params.sort.order === 'undefined' ? 'asc' : params.sort.order.toLowerCase() };
190189
finalManyRefCountQuery.args.table = { 'name': tableName, 'schema': schema };;
191190
finalManyRefCountQuery.args.where = {};
192191
finalManyRefCountQuery.args.where[primaryKey] = { '$ne': null };

0 commit comments

Comments
 (0)