Class: DBObjectFactory

amiwo/db~ DBObjectFactory


new DBObjectFactory()

Source:

Methods


<static> createObject(name [, object])

Build a DBObject from a name or an array of DBObject if object is an Array

Parameters:
Name Type Argument Description
name String
object Array | Object <optional>

parameters to pass to the Object's constructor; if an array returns an Array of DBObject each initialized with its associated element

Source:
Returns:

returns a subclass of DBObject or null if 'name' doesn't match an existing object

Type
DBObject

<static> getDB()

Get underlying database

Source:

<static> setDB(db)

Set underlying database

Parameters:
Name Type Description
db any
Source:

<static> setDBImplementation(dbImplementation:)

Set DB implementation

Parameters:
Name Type Description
dbImplementation: String

DB implementation, "mongo" or something else (e.g., SQL, ...)

Source:

<static> setDBRootPath(root)

Set app root path

Parameters:
Name Type Description
root String
Source: