api documentation for bookshelf (v0.10.3)

A lightweight ORM for PostgreSQL, MySQL, and SQLite3

table of contents

  1. module bookshelf
    1. function bookshelf (knex)
    2. function bookshelf.initialize (knex)
    3. function bookshelf.model ()
    4. function bookshelf.sync (syncing, options)
    5. object bookshelf.collection
    6. object bookshelf.eager
    7. object bookshelf.errors
    8. object bookshelf.events
    9. object bookshelf.helpers
    10. object bookshelf.model.prototype
    11. object bookshelf.promise
    12. object bookshelf.relation
    13. object bookshelf.sync.prototype
  2. module bookshelf.collection
    1. function bookshelf.collection.default ()
  3. module bookshelf.eager
    1. function bookshelf.eager.default ()
  4. module bookshelf.errors
    1. function bookshelf.errors.EmptyError (message, obj)
    2. function bookshelf.errors.NoRowsDeletedError (message, obj)
    3. function bookshelf.errors.NoRowsUpdatedError (message, obj)
    4. function bookshelf.errors.NotFoundError (message, obj)
  5. module bookshelf.events
    1. function bookshelf.events.default ()
  6. module bookshelf.helpers
    1. function bookshelf.helpers.deprecate (a, b)
    2. function bookshelf.helpers.error (msg)
    3. function bookshelf.helpers.morphCandidate (candidates, foreignTable)
    4. function bookshelf.helpers.orderBy (obj, sort, order)
    5. function bookshelf.helpers.query (obj, args)
    6. function bookshelf.helpers.saveConstraints (model, relatedData)
    7. function bookshelf.helpers.warn (msg)
  7. module bookshelf.model
    1. function bookshelf.model ()
    2. function bookshelf.model.NoRowsDeletedError (message, obj)
    3. function bookshelf.model.NoRowsUpdatedError (message, obj)
    4. function bookshelf.model.NotFoundError (message, obj)
    5. function bookshelf.model.extend (protoProps, staticProps)
    6. function bookshelf.model.extended (child)
    7. function bookshelf.model.super_ ()
    8. object bookshelf.model.__super__
  8. module bookshelf.model.prototype
    1. function bookshelf.model.prototype._doFetch ()
    2. function bookshelf.model.prototype._handleEager (response, options)
    3. function bookshelf.model.prototype._handleResponse (response)
    4. function bookshelf.model.prototype._morphOneOrMany (Target, morphName, columnNames, morphValue, type)
    5. function bookshelf.model.prototype.all ()
    6. function bookshelf.model.prototype.belongsTo (Target, foreignKey, foreignKeyTarget)
    7. function bookshelf.model.prototype.belongsToMany (Target, joinTableName, foreignKey, otherKey, foreignKeyTarget, otherKeyTarget)
    8. function bookshelf.model.prototype.clone ()
    9. function bookshelf.model.prototype.count (column, options)
    10. function bookshelf.model.prototype.destroy ()
    11. function bookshelf.model.prototype.fetch (options)
    12. function bookshelf.model.prototype.fetchAll (options)
    13. function bookshelf.model.prototype.hasMany (Target, foreignKey, foreignKeyTarget)
    14. function bookshelf.model.prototype.hasOne (Target, foreignKey, foreignKeyTarget)
    15. function bookshelf.model.prototype.load ()
    16. function bookshelf.model.prototype.morphMany (Target, name, columnNames, morphValue)
    17. function bookshelf.model.prototype.morphOne (Target, name, columnNames, morphValue)
    18. function bookshelf.model.prototype.morphTo (morphName)
    19. function bookshelf.model.prototype.orderBy ()
    20. function bookshelf.model.prototype.query ()
    21. function bookshelf.model.prototype.refresh (options)
    22. function bookshelf.model.prototype.resetQuery ()
    23. function bookshelf.model.prototype.save ()
    24. function bookshelf.model.prototype.sync (options)
    25. function bookshelf.model.prototype.through (Interim, throughForeignKey, otherKey, throughForeignKeyTarget, otherKeyTarget)
    26. function bookshelf.model.prototype.where ()
  9. module bookshelf.promise
    1. function bookshelf.promise.default (executor)
  10. module bookshelf.relation
    1. function bookshelf.relation.default ()
  11. module bookshelf.sync
    1. function bookshelf.sync (syncing, options)
  12. module bookshelf.sync.prototype
    1. function bookshelf.sync.prototype.count ()
    2. function bookshelf.sync.prototype.del ()
    3. function bookshelf.sync.prototype.first ()
    4. function bookshelf.sync.prototype.insert ()
    5. function bookshelf.sync.prototype.prefixFields (fields)
    6. function bookshelf.sync.prototype.select ()
    7. function bookshelf.sync.prototype.update ()

module bookshelf

function bookshelf (knex)

function bookshelf.initialize (knex)

function bookshelf.model ()

function bookshelf.sync (syncing, options)

module bookshelf.collection

function bookshelf.collection.default ()

module bookshelf.eager

function bookshelf.eager.default ()

module bookshelf.errors

function bookshelf.errors.EmptyError (message, obj)

function bookshelf.errors.NoRowsDeletedError (message, obj)

function bookshelf.errors.NoRowsUpdatedError (message, obj)

function bookshelf.errors.NotFoundError (message, obj)

module bookshelf.events

function bookshelf.events.default ()

module bookshelf.helpers

function bookshelf.helpers.deprecate (a, b)

function bookshelf.helpers.error (msg)

function bookshelf.helpers.morphCandidate (candidates, foreignTable)

function bookshelf.helpers.orderBy (obj, sort, order)

function bookshelf.helpers.query (obj, args)

function bookshelf.helpers.saveConstraints (model, relatedData)

function bookshelf.helpers.warn (msg)

module bookshelf.model

function bookshelf.model ()

function bookshelf.model.NoRowsDeletedError (message, obj)

function bookshelf.model.NoRowsUpdatedError (message, obj)

function bookshelf.model.NotFoundError (message, obj)

function bookshelf.model.extend (protoProps, staticProps)

function bookshelf.model.extended (child)

function bookshelf.model.super_ ()

module bookshelf.model.prototype

function bookshelf.model.prototype._doFetch ()

function bookshelf.model.prototype._handleEager (response, options)

function bookshelf.model.prototype._handleResponse (response)

function bookshelf.model.prototype._morphOneOrMany (Target, morphName, columnNames, morphValue, type)

function bookshelf.model.prototype.all ()

function bookshelf.model.prototype.belongsTo (Target, foreignKey, foreignKeyTarget)

function bookshelf.model.prototype.belongsToMany (Target, joinTableName, foreignKey, otherKey, foreignKeyTarget, otherKeyTarget)

function bookshelf.model.prototype.clone ()

function bookshelf.model.prototype.count (column, options)

function bookshelf.model.prototype.destroy ()

function bookshelf.model.prototype.fetch (options)

function bookshelf.model.prototype.fetchAll (options)

function bookshelf.model.prototype.hasMany (Target, foreignKey, foreignKeyTarget)

function bookshelf.model.prototype.hasOne (Target, foreignKey, foreignKeyTarget)

function bookshelf.model.prototype.load ()

function bookshelf.model.prototype.morphMany (Target, name, columnNames, morphValue)

function bookshelf.model.prototype.morphOne (Target, name, columnNames, morphValue)

function bookshelf.model.prototype.morphTo (morphName)

function bookshelf.model.prototype.orderBy ()

function bookshelf.model.prototype.query ()

function bookshelf.model.prototype.refresh (options)

function bookshelf.model.prototype.resetQuery ()

function bookshelf.model.prototype.save ()

function bookshelf.model.prototype.sync (options)

function bookshelf.model.prototype.through (Interim, throughForeignKey, otherKey, throughForeignKeyTarget, otherKeyTarget)

function bookshelf.model.prototype.where ()

module bookshelf.promise

function bookshelf.promise.default (executor)

module bookshelf.relation

function bookshelf.relation.default ()

module bookshelf.sync

function bookshelf.sync (syncing, options)

module bookshelf.sync.prototype

function bookshelf.sync.prototype.count ()

function bookshelf.sync.prototype.del ()

function bookshelf.sync.prototype.first ()

function bookshelf.sync.prototype.insert ()

function bookshelf.sync.prototype.prefixFields (fields)

function bookshelf.sync.prototype.select ()

function bookshelf.sync.prototype.update ()

[ this document was created with utility2 ]