Add conditions to verify rows are not soft deleted.
$ npm i @rematter/paranoid-sql
OR
$ yarn add @rematter/paranoid-sql
import { getParanoidSql } from '@rematter/paranoid-sql';
const paranoidSql = getParanoidSql('SELECT * FROM t WHERE status = ?')
paranoidSql // => 'SELECT * FROM `t` WHERE `status` = ? AND `t`.`deletedAt` IS NULL'
node-sql-parser
- Parse simple SQL statements into an abstract syntax tree (AST) with the visited tableList, columnList and convert it back to SQL.
- Nico Gallinal - nicoabie
This project is licensed under the MIT License - see the LICENSE.md file for details