Merge pull request #194 from anatoliychakkaev/master
Allow to set model configuration
This commit is contained in:
commit
56e63bdacf
|
@ -209,6 +209,16 @@ function prepareContext(models, railway, app, defSchema, done) {
|
|||
if (cname) settings[cname].table = name;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set configuration param
|
||||
*
|
||||
* @param name - name of param.
|
||||
* @param value - value.
|
||||
*/
|
||||
ctx.set = function (name, value) {
|
||||
if (cname) settings[cname][name] = value;
|
||||
};
|
||||
|
||||
/**
|
||||
* If the Schema has additional types, add them to the context
|
||||
* e.g. MySQL has an additional Point type
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "jugglingdb",
|
||||
"description": "ORM for every database: redis, mysql, neo4j, mongodb, couchdb, postgres, sqlite",
|
||||
"version": "0.2.0-10",
|
||||
"version": "0.2.0-11",
|
||||
"author": "Anatoliy Chakkaev <rpm1602@gmail.com>",
|
||||
"contributors": [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue