Ghost/core/server/models/base
Kevin Ansfield 9ff7423b2b
Added email.open_rate order option to posts api (#12439)
refs https://github.com/TryGhost/Ghost/issues/12420

- updated `order` bookshelf plugin's `parseOrderOption()` method to return multiple order-related properties
  - `order` same as before, a key-value object of property-direction
  - `orderRaw` new property that is a raw SQL order string generated from `orderRawQuery()` method in models
  - `eagerLoad` new property that is an array of properties the `eagerLoad` plugin should use to join across
- updated `pagination.fetchAll()` to apply normal order + raw order if both are available and to handle eager loading / joins when `options.eagerLoad` is populated
- updated post model to include details for email relationship and to add `orderRawQuery()` that allows `email.open_rate` to be used as an order option
2020-12-03 20:13:37 +00:00
..
bulk-operations.js Added error handling for failed member imports 2020-08-26 17:11:35 +12:00
index.js Added email.open_rate order option to posts api (#12439) 2020-12-03 20:13:37 +00:00
listeners.js Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00
utils.js Fixed "no-shadow" linting error in server modules (#12287) 2020-10-20 12:02:56 +13:00