Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/sqlite/src/db.ts>DB#serialize

Deno SQLite module
Go to Latest
method DB.prototype.serialize
import { DB } from "https://deno.land/x/sqlite@v3.8/src/db.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