Commit Graph

35 Commits

Author SHA1 Message Date
Alice Gaudon d925237233 Move pagination to common, add serialization, update BackendController 2021-06-01 16:04:43 +02:00
Alice Gaudon 82ab0b963c Switch to esm and add import auto format 2021-05-03 20:52:52 +02:00
Alice Gaudon 4692a23696 Properly implement pagination 2021-03-30 12:02:57 +02:00
Alice Gaudon 595a6d4066 ModelQuery: add create() and fix boolean serialization 2020-10-02 12:08:01 +02:00
Alice Gaudon 79d704083a Add many eslint rules and fix all linting issues 2020-09-28 14:15:22 +02:00
Alice Gaudon fec607da20 ModelQuery: add offset parameter to union() 2020-09-11 15:15:15 +02:00
Alice Gaudon 969ab18b96 ModelRelation: sort recursive relations by tree 2020-09-08 19:11:19 +02:00
Alice Gaudon 0e37014667 ModelQuery: add nested eagerloading 2020-09-07 13:43:02 +02:00
Alice Gaudon e86356ae74 ModelQuery.union(): fix missing subquery variables 2020-09-06 16:02:53 +02:00
Alice Gaudon 17685a44be Improve field disambiguation to allow raw values when starting with ",',` 2020-09-06 15:44:37 +02:00
Alice Gaudon 4c482fb148 ModelQuery: add union() 2020-09-06 15:07:11 +02:00
Alice Gaudon 3a4606b328 ModelQuery: allow specifying raw value for sortBy() 2020-09-06 12:25:53 +02:00
Alice Gaudon b84c2cdff1 Code formatting and cleanup 2020-09-06 10:53:28 +02:00
Alice Gaudon 25f890e082 Remove unnecessary db query to determine whether a model exists in db 2020-09-06 10:45:26 +02:00
Alice Gaudon 27bd7400e2 ModelQuery: fix backticks on ORDER BY and remove extra useless spaces 2020-09-05 16:09:52 +02:00
Alice Gaudon e403dfa863 ModelQuery: fix field disambiguation 2020-09-05 15:51:44 +02:00
Alice Gaudon 9e38b003f9 Model relations: add recursive query and recursive relation 2020-09-05 14:56:19 +02:00
Alice Gaudon 7b739ff056 ModelQueryResult: also return model original data 2020-09-04 22:44:30 +02:00
Alice Gaudon e29b6369af ModelQuery: add groupWhere and test it 2020-09-04 22:16:20 +02:00
Alice Gaudon 823f5d0d26 ModelQuery: fix count() queries 2020-09-04 18:51:41 +02:00
Alice Gaudon 1dd22f618c ModelQuery: fix passing missing connection parameter 2020-09-04 15:10:11 +02:00
Alice Gaudon 19aafc76bf mysql queries: wrap field names in "`" to avoid conflict with reserved words
also do not add table name to field in select if it is already present
2020-09-04 15:09:30 +02:00
Alice Gaudon bffab3a4dc ModelQuery: actually fix fields conflicts for jointures
ref: 68ff977bcc
2020-09-02 16:29:11 +02:00
Alice Gaudon 68ff977bcc ModelQuery: fix model instantiation field conflict for jointures 2020-09-02 11:56:09 +02:00
Alice Gaudon 9db09f83cb Fix ManyThroughModelRelation eagerloading 2020-08-30 18:56:27 +02:00
Alice Gaudon 28349b791e Fix ModelQuery.count() 2020-08-30 13:31:19 +02:00
Alice Gaudon 813e10c4c7 ModelQuery: fix array of values to string conversion 2020-08-28 15:40:58 +02:00
Alice Gaudon 5930a85617 mysql count(): optimize requested fields 2020-08-26 14:05:06 +02:00
Alice Gaudon 37ed42b37d Fix model queries values not matching placeholder count 2020-07-28 15:02:08 +02:00
Alice Gaudon 97b2d3b94c ModelQuery: throw an error when fed with nonexistent relation 2020-07-28 10:33:45 +02:00
Alice Gaudon 8746ad2ea3 ModelQuery: fix is null / is not null checks 2020-07-27 10:56:43 +02:00
Alice Gaudon be6e659ca2 ModelFactory: refactor make into create 2020-07-27 10:52:39 +02:00
Alice Gaudon 7f398c1d4e Make models extendable 2020-07-24 12:58:06 +02:00
Alice Gaudon b043513fe8 Bug fixes and app settings 2020-06-27 17:12:50 +02:00
Alice Gaudon ec5b2b9aa0 Revamp model system
- Add model relations
- Get rid of SQL_CALC_FOUND_ROWS (deprecated)
- Eager loading
2020-06-27 14:45:05 +02:00