Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

typeorm where and

const productRepository = dataSource.getRepository(Product);
const result = await productRepository
        .createQueryBuilder('product')
        .where('product.price < :price', { price: 100 })
        .orWhere('product.color = :color', { color: 'yellow' })
        .getMany();
Source by www.kindacode.com #
 
PREVIOUS NEXT
Tagged: #typeorm
ADD COMMENT
Topic
Name
6+4 =