Answers for "typeorm raw query"

2

typeorm raw query

import { getManager } from 'typeorm';

  const entityManager = getManager();
  const someQuery = entityManager.query(`
  SELECT 
    fw."X",
    fw."Y",
    ew.*
  FROM "table1" as fw
  JOIN "table2" as ew
    ON fw."X" = $1 AND ew.id = fw."Y";
  `, [param1]);
Posted by: Guest on November-26-2020
1

typeorm raw query params

entityManager.query('SELECT u.name FROM users AS u WHERE u.name = $1 AND u.lastName = $2', ['John', 'Doe']);
Posted by: Guest on November-26-2020
0

typeorm raw sql

const rawData = await manager.query(`SELECT * FROM USERS`);
Posted by: Guest on January-04-2021

Browse Popular Code Answers by Language