How to use the Like function from typeorm
Find comprehensive JavaScript typeorm.Like code examples handpicked from public code repositorys.
GitHub: bildvitta/navpi
![bildvitta profile picture](/bildvitta.png?size=40)
17 18 19 20 21 22 23 24 25
continue } if (Object.prototype.hasOwnProperty.call(filters, key)) { formattedFilters.push({ [key]: searchLikeTypes.includes(fields[key].type) ? Like(`%${filters[key]}%`) : filters[key] }) } }
+ 7 other calls in file
133 134 135 136 137 138 139 140 141 142
* @returns {Promise<*>} */ ${entityName}FindWhereLike: async (options) => { const searchKey = Object.keys(options)[0]; const searchVal = Object.values(options)[0]; options[searchKey] = Like(\`%\${searchVal}%\`); return await dataSource.getRepository('${entityName}').findBy(options); }, `;
typeorm.getCustomRepository is the most popular function in typeorm (5799 examples)