* The success handler is not passed any arguments. To obtain DAOs for the newly created values, you will need to query for them again.
* This is because MySQL and SQLite do not make it easy to obtain back automatically generated IDs and other default values in a way that can be mapped to multiple records.
* The success handler is passed an array of instances, but please notice that these may not completely represent the state of the rows in the DB. This is because MySQL
* and SQLite do not make it easy to obtain back automatically generated IDs and other default values in a way that can be mapped to multiple records.
* To obtain DAOs for the newly created values, you will need to query for them again.
*
* @param {Array} records List of objects (key/value pairs) to create instances from
* @param {Object} [options]
* @param {Array} [options.fields] Fields to insert (defaults to all fields)
* @param {Boolean} [options.validate=false] Should each row be subject to validation before it is inserted. The whole insert will fail if one row fails validation
* @param {Boolean} [options.hooks=false] Run before / after bulkCreate hooks?
* @param {Boolean} [options.hooks=false] Run before / after create hooks for each individual DAO? BulkCreate hooks will still be run.
* @param {Boolean} [options.ignoreDuplicates=false] Ignore duplicate values for primary keys? (not supported by postgres)
// If we didn't ever hear from the client.connect() callback the connection timeout, node-postgres does not treat this as an error since no active query was ever emitted
this.client.on('end',function(){
if(!responded){
connectCallback(newError('Connection timed out'))
}
})
// Closes a client correctly even if we have backed up queries
// If we didn't ever hear from the client.connect() callback the connection timeout, node-postgres does not treat this as an error since no active query was ever emitted
this.client.on('end',function(){
if(!responded){
connectCallback(newError('Connection timed out'))
}
})
// Closes a client correctly even if we have backed up queries
* A slightly modified version of bluebird promises. This means that, on top of the methods below, you can also call all the methods listed on the link below.