반응형
Sequelize에서 어떻게이 작업을 수행 할 수 있습니까?
SELECT * FROM table where lower(column) LIKE ('abcd%');
낮은 함수와 $ like 를 혼합하는 방법을 찾을 수 없습니다.
해결 방법
해결책을 찾았습니다.
Table.findAll({
attributes: ['createdAt', 'col'],
where: {
$and:[
{
createdAt:{
$between:[minDate, maxDate]
}
},
Sequelize.where(
Sequelize.fn('lower', Sequelize.col('col')),
{
$like: 'abcd%'
}
)
]
}
});
참조 페이지 https://stackoverflow.com/questions/41728023
반응형
'MySql' 카테고리의 다른 글
MySQL은 여러 값처럼 (0) | 2020.10.29 |
---|---|
MySQL JAVA에서 MySQL 연결을 만드는 방법 (0) | 2020.10.29 |
MySQL-LEFT JOIN 및 COUNT () (0) | 2020.10.29 |
MySQL mysql_real_escape_string이 나를 위해 작동하지 않습니다. (0) | 2020.10.29 |
MySQL How to add reference to assembly in visual studio mac? (0) | 2020.10.29 |
댓글