Это код Codeigniter. Я пытаюсь выполнить этот запрос в nodejs
$this->db->where('feature', $feature);
$this->db->where(1);
for ($i = 0; $i < sizeof($payment12); $i++) {
$this->db->or_where("FIND_IN_SET('" . $payment12[$i] . "', payment)");
}
$this->db->where(1);
for ($i = 0; $i < sizeof($coin); $i++) {
$this->db->or_where("FIND_IN_SET('" . $coin[$i] . "', coin_id)");
}
$this->db->like('name', $website_name);
$this->db->where(1);
for ($i = 0; $i < sizeof($location); $i++) {
$this->db->or_where("FIND_IN_SET('" . $location[$i] . "', location)");
}
Вот пример MySql Запрос
SELECT *, (fees + privacy + speed + limits + trusted + easy_use) AS totalRank FROM `Websites` WHERE ( `feature` = '2' ) AND ( 1 IS NULL OR FIND_IN_SET('credit', payment) OR FIND_IN_SET('bank', payment) ) AND ( 1 IS NULL OR FIND_IN_SET('ZEC', coin_id) OR FIND_IN_SET('BTC', coin_id) ) AND ( `name` LIKE '%coin%' ESCAPE '!' ) AND ( 1 IS NULL OR FIND_IN_SET('USA', location) OR FIND_IN_SET('IND', location) ) AND `status` = 1 ORDER BY `totalRank` DESC
можно преобразовать в Node.js Sequelize?