Entity들을 아래와 같은 속성:조건식으로 여러개 서치가 가능하다.
repository.find({
count1: LessThen(5), // < operator
count2: MoreThen(10), // > operator
name: Equal("Hello"),
title: Not(Equal("Buy")),
description1: Like("%AAA%BBB%"),
description2: Not(Like("%ADAD_A")),
date1: Between("yesterday", "today"),
date2: Not(Between("yesterday", "today")),
type1: In("a", "b", "c", "d"),
type1: Not(In("a", "b", "c", "d")),
array1: Any(["a", "b", "c", "d"]),
type1: Not(In("a", "b", "c", "d")),
a1: IsNull(),
a2: Not(IsNull())
});
출처: https://github.com/typeorm/typeorm/issues/1101
'개발 > NomadCoder' 카테고리의 다른 글
Postgresql Command (0) | 2019.02.22 |
---|