typeorm-explain
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Ci Status Npm version

typeorm-explain

Tiny helper to wrap TypeORM's query builder queries into EXPLAIN.

Install

npm install typeorm-explain

Usage

Currently supports only Postgres driver. Feel free to open PR and add more drivers.

import explain from 'typeorm-explain';

import { getConnection } from 'typeorm';

const userQuery = getConnection()
  .createQueryBuilder()
  .select('user')
  .from(User, 'user')
  .where('user.id = :id', { id: 1 });

console.log(await explain(userQuery)); // Print explain in console

const user = await userQuery.getOne();

Development

npm run format # code fomatting
npm run lint # linting
npm run build # build

Active maintenance with care and ❤️.

Feel free to send a PR.

Readme

Keywords

Package Sidebar

Install

npm i typeorm-explain

Weekly Downloads

643

Version

0.0.1

License

MIT

Unpacked Size

11.6 kB

Total Files

10

Last publish

Collaborators

  • zamarawka