From 0a6bfee641d5204f3b18a0e1bf31e4d482ffbe39 Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Tue, 27 Feb 2024 06:17:30 +0100 Subject: [PATCH] prepare -> query --- docs/api/sqlite.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/sqlite.md b/docs/api/sqlite.md index 2769cb85e6ef32..c6ddce378cc1d7 100644 --- a/docs/api/sqlite.md +++ b/docs/api/sqlite.md @@ -401,7 +401,7 @@ db.defineFunction( (name, age) => "Me" + "o".repeat(name.length) + "w".repeat(age), ); -db.prepare("SELECT getMeow(name, age) AS sound FROM cats"); +db.query("SELECT getMeow(name, age) AS sound FROM cats"); ``` If the function is deterministic (which means that the function always returns the same result on the same inputs), you can tell SQLite about that. This enables SQLite to perform additional optimizations in some cases: @@ -423,9 +423,9 @@ db.defineFunction( }, (...args) => args.join(","), ); -db.prepare("SELECT joinWithComma(name) AS sound FROM cats"); -db.prepare("SELECT joinWithComma(name, age) AS sound FROM cats"); -db.prepare("SELECT joinWithComma(id, name, age) AS sound FROM cats"); +db.query("SELECT joinWithComma(name) AS sound FROM cats"); +db.query("SELECT joinWithComma(name, age) AS sound FROM cats"); +db.query("SELECT joinWithComma(id, name, age) AS sound FROM cats"); ``` ## Reference