Files
private-cloud/console/mini_poem/utils/object_reflection.js
2025-10-20 19:24:01 +08:00

22 lines
529 B
JavaScript

/*
* 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;