How to use the Equal function from typeorm

Find comprehensive JavaScript typeorm.Equal code examples handpicked from public code repositorys.

166
167
168
169
170
171
172
173
174
175
 * @throws {Error}
 */
async fetchById(id, repoName) {
    try {
        const repo = this.#dataSource.getRepository(repoName);
        let res = await repo.findBy({ id: orm.Equal(id) });
        if (res.length > 0) {
            res = res[0];
        } else {
            res = null;
fork icon0
star icon0
watch icon0