Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/cotton/mod.ts>QueryBuilder#replace

SQL Database Toolkit for Deno
Latest
method QueryBuilder.prototype.replace
import { QueryBuilder } from "https://deno.land/x/cotton@v0.7.5/mod.ts";

Perform REPLACE query to the table.

It will look for PRIMARY and UNIQUE constraints. If something matched, it gets removed from the table and creates a new row with the given values.

Parameters

data: QueryValues

A JSON Object representing columnname-value pairs. Example: { firstname: "John", age: 22, ... }