Models
- Project belongsToMany User
- User hasMany Task
- Task hasMany Task as SubTask
Data
- 10 projects, 25 random users each
- 1000 users
if(req.body.action == 'unlike') { | |
//using find a | |
db.Like.findAll({ | |
where: db.Sequelize.and( | |
{Post_postId: req.body.postId}, | |
{User_userId: req.user.userId} | |
) | |
}).then(function(likes) { | |
if(likes.length > 0) { |
it('supports transactions', function() { | |
return Support.prepareTransactionTest(this.sequelize).bind({}}).then(function(sequelize) { | |
this.sequelize = sequelize; | |
this.Article = sequelize.define('Article', { 'title': DataTypes.STRING }); | |
this.Label = sequelize.define('Label', { 'text': DataTypes.STRING }); | |
this.Article.hasMany(this.Label); | |
return sequelize.sync({ force: true }); | |
}).then(function() { |
"use strict"; | |
var dox = require('dox') | |
, program = require('commander') | |
, fs = require('fs') | |
, path = require('path') | |
, git = require('git') | |
, _ = require('lodash'); | |
program |
Executing (d5b23ea3-8eec-40b6-8e00-29ae91371cd4): START TRANSACTION; | |
Executing (d5b23ea3-8eec-40b6-8e00-29ae91371cd4): SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; | |
Executing (789a76d2-b399-4b85-b62c-41b69f07c21a): START TRANSACTION; | |
Executing (d5b23ea3-8eec-40b6-8e00-29ae91371cd4): SET autocommit = 1; | |
Executing (789a76d2-b399-4b85-b62c-41b69f07c21a): SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; | |
inside transaction 1 | |
d5b23ea3-8eec-40b6-8e00-29ae91371cd4 | |
Executing (789a76d2-b399-4b85-b62c-41b69f07c21a): SET autocommit = 1; | |
inside transaction 2 | |
789a76d2-b399-4b85-b62c-41b69f07c21a |
I hereby claim:
To claim this, I am signing this object: