Ghost/core/server/models
Nazar Gargol 84c8bcc457 Extracted ordering into separate bookshelf plugin
refs #11729

- Having a plugin allows to reason about ordering better and gives way
to further extraction away form the core.
- Just like with filtering, ordering falls into similar category of having effect on knex'es query builder object extension through additional statements - ORDER BY in this case.
- Because there were bugs associated with use of permittedAttributes inside of `parseOrderOption` method, introduced separate `orderAttributes` function which returns only those fields which are orderable (https://github.com/TryGhost/Ghost/issues/11729#issuecomment-685740836)
2020-09-22 16:27:12 +12:00
..
base Extracted ordering into separate bookshelf plugin 2020-09-22 16:27:12 +12:00
plugins Extracted ordering into separate bookshelf plugin 2020-09-22 16:27:12 +12:00
relations Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00
action.js Added model implementation for actions 2019-02-06 21:36:09 +01:00
api-key.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
author.js Added plugin based author and public tag models in API v2 (#10284) 2019-01-03 20:30:35 +01:00
email.js Revert "Store email batch and recipient records when sending newsletters (#12195)" 2020-09-21 17:02:59 +01:00
index.js Revert "Store email batch and recipient records when sending newsletters (#12195)" 2020-09-21 17:02:59 +01:00
integration.js Ensured Admin API cannot fetch internal integrations (#10501) 2019-07-24 11:52:55 +02:00
invite.js Extracted core/server/lib/security to @tryghost/security package 2020-08-11 14:06:50 +01:00
label.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
member-stripe-customer.js Added error handling for failed member imports 2020-08-26 17:11:35 +12:00
member.js 🐛 Fixed incorrect status used for trial subscription query 2020-09-02 13:07:48 +01:00
mobiledoc-revision.js Added mobiledoc revisions functionality 2018-10-09 15:31:09 +02:00
permission.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
post.js Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00
posts-meta.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
role.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
session.js Removed user_id constraint when upserting session (#10085) 2018-10-30 16:15:48 +07:00
settings.js 🐛 Fixed importing Stripe Plans with amount 0 (#12062) 2020-07-20 14:59:23 +02:00
single-use-token.js Added SingleUseToken model (#12215) 2020-09-18 15:05:56 +01:00
stripe-customer-subscription.js Added error handling for failed member imports 2020-08-26 17:11:35 +12:00
tag-public.js Added plugin based author and public tag models in API v2 (#10284) 2019-01-03 20:30:35 +01:00
tag.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
user.js Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00
webhook.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00