mysql-all-in-one
Version:
A package that allows you to have a complete interaction with a MYSQL database, allowing to connect to the database, retrieve data and create queries.
15 lines (14 loc) • 677 B
TypeScript
import { ConditionOptions } from '../select/conditionals/types';
import { PreparedStatement } from '../types';
import { DeleteOptions } from './types';
/**
* @description Delete from query.
* @param table Table of delete from.
* @param whereOpts Optional where object to filter deleted data.
* @param opts Extra delete options like `ignore`, `quick`
* @returns Delete from SQL query.
* @example deleteFrom('table', {id: 5}, {ignore: true});
* >>> "DELETE IGNORE FROM `table` WHERE (`table`.`id` = 5);"
*/
declare const deleteFrom: (table: string, whereOpts?: ConditionOptions, opts?: DeleteOptions | undefined) => string | PreparedStatement;
export default deleteFrom;