updated console and server repo name
This commit is contained in:
22
private-console/mini_poem/utils/object_reflection.js
Normal file
22
private-console/mini_poem/utils/object_reflection.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Created by Strawmanbobi
|
||||
* 2014-08-30
|
||||
*/
|
||||
|
||||
function objectMemberCount(conditions) {
|
||||
let memberCount = 0;
|
||||
for(let f in conditions) {
|
||||
memberCount++;
|
||||
}
|
||||
let whereClause = "";
|
||||
let index = 0;
|
||||
for(let field in conditions) {
|
||||
whereClause += field + " = '" + conditions[field] + "'";
|
||||
if(index < memberCount - 1) {
|
||||
whereClause += " AND ";
|
||||
}
|
||||
}
|
||||
return whereClause;
|
||||
}
|
||||
|
||||
module.exports = objectMemberCount;
|
||||
Reference in New Issue
Block a user