Commit Graph

7 Commits

Author SHA1 Message Date
Junyi
841249f58c
Feature/sort (#36)
* feat: add sort value initialization via beforeCreate hook

* fix: after reinitialization, hooks are lost

* test: temp test for hook

* fix: hooks defined in the table options does not work

* refactor: change sort config into sort type field and fix updateAssociations to create with foreignKey

* refactor: abstract utility functions

* fix: type definition

* fix: type and where value type

Co-authored-by: chenos <chenlinxh@gmail.com>
2020-12-11 15:41:03 +08:00
chenos
437c49d211 refactor: change the field type names to uppercase 2020-12-10 14:47:13 +08:00
Junyi
05f815655f
Fix: change strategy from add to set for updateAssociations (#33)
* test: add belongsTo case

* fix: change update strategy from add to set
2020-12-06 14:28:23 +08:00
Junyi
1980464f63
Fix/model update associations (#29)
* refactor: change updateAssociations from set null to small grouped handling

* feat: add transaction for updateAssociations

* test: add more basic cases

* fix: pick options for different model methods

* fix: adjust options picking strategy
2020-12-04 17:20:08 +08:00
Junyi
cd0b357887
Test/list (#19)
* test: add more case for list

* feat: allow order by associations in sorting

* fix: add more utils test in resourcer and fix except usage

* test: fix cases

* fix: page default value and max page size

* fix: page params and cases

* fix: list params

* fix: constants in list action

* fix: count when include, attributes when except and cases

* test: add case for hasMany.
2020-11-23 16:49:46 +08:00
Junyi
85e42f95a5
test: refactor test in database and add more (#17) 2020-11-19 23:30:30 +08:00
chen
e5d30b30ba first commit 2020-10-24 15:34:43 +08:00