Skip to content

Instantly share code, notes, and snippets.

@ktkaushik
Last active December 20, 2015 12:29
Show Gist options
  • Select an option

  • Save ktkaushik/6130962 to your computer and use it in GitHub Desktop.

Select an option

Save ktkaushik/6130962 to your computer and use it in GitHub Desktop.
sails-mongoose model object
{ [Function: model]
base:
{ connections: [ [Object] ],
plugins: [],
models: { Person: [Circular], Post: [Object] },
modelSchemas: { Person: [Object], Post: [Object] },
options: {} },
modelName: 'Person',
model: [Function: model],
db:
{ base:
{ connections: [Object],
plugins: [],
models: [Object],
modelSchemas: [Object],
options: {} },
collections: { people: [Object], posts: [Object] },
models: {},
replica: false,
hosts: null,
host: null,
port: null,
user: null,
pass: null,
name: null,
options: null,
_readyState: 0,
_closeCalled: false,
_hasOpened: false,
_listening: false },
schema:
{ paths: { _id: [Object], __v: [Object] },
subpaths: {},
virtuals: { id: [Object] },
nested: {},
inherits: {},
callQueue: [],
_indexes: [],
methods: {},
statics: {},
tree: { _id: [Object], id: [Object], __v: [Function: Number] },
_requiredpaths: undefined,
options:
{ id: true,
noVirtualId: false,
_id: true,
noId: false,
read: null,
shardKey: null,
autoIndex: true,
minimize: true,
versionKey: '__v',
capped: false,
bufferCommands: true,
strict: true } },
options: undefined,
collection:
{ collection: null,
opts: { bufferCommands: true, capped: false },
name: 'people',
conn:
{ base: [Object],
collections: [Object],
models: {},
replica: false,
hosts: null,
host: null,
port: null,
user: null,
pass: null,
name: null,
options: null,
_readyState: 0,
_closeCalled: false,
_hasOpened: false,
_listening: false },
queue: [],
buffer: true } }
{ [Function: model]
base:
{ connections: [ [Object] ],
plugins: [],
models: { Person: [Circular], Post: [Object] },
modelSchemas: { Person: [Object], Post: [Object] },
options: {} },
modelName: 'Person',
model: [Function: model],
db:
{ base:
{ connections: [Object],
plugins: [],
models: [Object],
modelSchemas: [Object],
options: {} },
collections: { people: [Object], posts: [Object] },
models: {},
replica: false,
hosts: null,
host: null,
port: null,
user: null,
pass: null,
name: null,
options: null,
_readyState: 0,
_closeCalled: false,
_hasOpened: false,
_listening: false },
schema:
{ paths: { _id: [Object], __v: [Object] },
subpaths: {},
virtuals: { id: [Object] },
nested: {},
inherits: {},
callQueue: [],
_indexes: [],
methods: {},
statics: {},
tree: { _id: [Object], id: [Object], __v: [Function: Number] },
_requiredpaths: undefined,
options:
{ id: true,
noVirtualId: false,
_id: true,
noId: false,
read: null,
shardKey: null,
autoIndex: true,
minimize: true,
versionKey: '__v',
capped: false,
bufferCommands: true,
strict: true } },
options: undefined,
collection:
{ collection: null,
opts: { bufferCommands: true, capped: false },
name: 'people',
conn:
{ base: [Object],
collections: [Object],
models: {},
replica: false,
hosts: null,
host: null,
port: null,
user: null,
pass: null,
name: null,
options: null,
_readyState: 0,
_closeCalled: false,
_hasOpened: false,
_listening: false },
queue: [],
buffer: true },
config:
{ host: 'localhost',
database: 'sails',
port: 27017,
schema: false,
nativeParser: false,
safe: true,
user: 'root',
module: 'sails-mongoose' } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment