Module

x/nessie/deps.ts>SQLiteClient#execute

A modular Deno library for PostgreSQL, MySQL, MariaDB and SQLite migrations
Latest
method SQLiteClient.prototype.execute
import { SQLiteClient } from "https://dotland.deno.dev/x/nessie@2.0.11/deps.ts";

Run multiple semicolon-separated statements from a single string.

This method cannot bind any query parameters, and any result rows are discarded. It is only for running a chunk of raw SQL; for example, to initialize a database.

Example

db.execute(`
  CREATE TABLE people (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    name TEXT,
    age REAL,
    city TEXT
  );
  INSERT INTO people (name, age, city) VALUES ("Peter Parker", 21, "nyc");
`);

Parameters

sql: string