Skip to main content
Module

x/sqlite/mod.ts>DB#serialize

Deno SQLite module
Go to Latest
method DB.prototype.serialize
import { DB } from "https://deno.land/x/sqlite@v3.7.2/mod.ts";

Serialize a database.

The format is the same as would be written to disk when modifying a database opened from a file. So for an on-disk database file, this is just a copy of the file contents on disk.

If no schema name is specified the default (main) schema is serialized.

Examples

const data = db.serialize();

Serialize the in-memory temporary database

const temp = db.serialize("temp");

Parameters

optional
schema: "main" | "temp" | string = [UNSUPPORTED]

Returns

Uint8Array