Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
IndexQuerier.prototype.toSqlString = function (filter)
{
var self = this;
if (mod_jsprim.isEmpty(filter))
return ('1');
if (filter['and']) {
return (filter['and'].map(function (clause) {
return (sprintf('(%s)', self.toSqlString(clause)));
}).join(' AND '));
}
if (filter['or']) {
return (filter['or'].map(function (clause) {
return (sprintf('(%s)', self.toSqlString(clause)));
}).join(' OR '));
}
return (mod_krill.createPredicate(filter).toCStyleString());
};
function krillPrimTrivial(pred)
{
return (mod_jsprim.isEmpty(pred));
}