Connection.prototype.set()
Parameters
- key «String»
- val «Any»
Sets the value of the option key
. Equivalent to conn.options[key] = val
Supported options include
maxTimeMS
: SetmaxTimeMS
for all queries on this connection.useFindAndModify
: Set tofalse
to work around thefindAndModify()
deprecation warning
Example:
conn.set('test', 'foo');
conn.get('test'); // 'foo'
conn.options.test; // 'foo'
当前内容版权归 mongoosejs 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 mongoosejs .