Skip to content

Examples Todo

Dmitri Moore edited this page Feb 12, 2015 · 9 revisions

Add common uses cases or under-appreciated features that should have better examples in a future documentation update:

  1. Using key/val pairs with withRelated and query.columns (https://github.com/tgriesser/bookshelf/issues/75#issuecomment-70918329)

  2. Omitting pivot attributes in JSON response (https://github.com/tgriesser/bookshelf/issues/588)

  3. An example showing how a base model with global properties can be defined and other models can derive from it. I think this is a very common use case.

  4. Ways to implement basic joins in bookshelf.

  5. How to augment relation query (https://github.com/tgriesser/bookshelf/issues/601).

  6. A pagination example

  7. An example showing how to return a count of model matching certain criteria (https://github.com/tgriesser/bookshelf/issues/609)

  8. Selecting and ordering by a JSON field