Class: DAO

DAO

new DAO(nm, module)

A SnoozeJS DAO
Parameters:
Name Type Description
nm string The name of the DAO
module object The module the DAO will belong to
Source:

Methods

(inner) getBelongsTo() → {string}

Gets the name of the DAO this DAO belongs to
Source:
Returns:
a DAO name (or null)
Type
string

(inner) getFields() → {array}

Gets the fields of the DAO
Source:
Returns:
Gets an array of defined fields
Type
array

(inner) getName() → {string}

Gets the name of the DAO
Source:
Returns:
The name of the DAO
Type
string

(inner) getOneToMany() → {array}

Gets the name of DAOs this DAO has a one-to-many connection with
Source:
Returns:
an array of DAO names
Type
array

(inner) getOneToOne() → {array}

Gets the name of DAOs this DAO has a one-to-one connection with
Source:
Returns:
an array of DAO names
Type
array

(inner) getOptions() → {array}

Gets the options of the DAO
Source:
Returns:
Gets an array of defined options
Type
array

(inner) getSeqDAO() → {object}

Gets the Sequelize Model this DAO is associated with
Source:
Returns:
Sequelize Model
Type
object

(inner) setBelongsTo(val)

Sets the DAO this DAO belongs to
Parameters:
Name Type Description
val string The name of a DAO
Source:

(inner) setFields(fields)

Sets the fields for this DAO
Parameters:
Name Type Description
fields array An array of field objects
Source:

(inner) setOneToMany(vals)

Sets the DAOs this DAO has a one-to-many relation with
Parameters:
Name Type Description
vals array An array of DAO names
Source:

(inner) setOneToOne(vals)

Sets the DAOs this DAO has a one-to-one relation with
Parameters:
Name Type Description
vals array An array of DAO names
Source:

(inner) setOptions(options)

Sets the options for this DAO Options can contain belongsTo, oneToOne, and oneToMany
Parameters:
Name Type Description
options object an object of DAO options
Source:

(inner) setSeqDAO(DAO)

Sets the Sequelize Model this DAO is associated with
Parameters:
Name Type Description
DAO object A Sequelize Model
Source: