tribedb
Version:
Unlimited expansion MySQL cluster storage system
51 lines (29 loc) • 824 B
JavaScript
var mysql = require('mysql');
var tribe = require('tribedb');
var main = async function(){
log('--start--');
log( await tribe.select('tb1', 'id,name', '', true) ); // 查单个
log( await tribe.select('tb2', '*', 'id=1') ); // 条件
log( await tribe.select('tb3', '*', 'id=2') ); // 条件
console.time('ss')
num = 1620;
while(num--){
await tribe.select_merge([
{
table: 'tb1',
where: 'id in(1,2)',
// key: 'id',
single: 1,
},{
table: 'tb2',
where: 'id in(1,2)',
},{
table: 'tb3',
where: 'id in(1,2)',
}
]); // 条件
}
console.timeEnd('ss')
log('--end--');
};
main();