function likePattern
likePattern(
query: string,
where?: "anywhere" | "prefix"
): string

Returns the pattern matching text that contains query, or that starts with it when where is "prefix". The SQL must read LIKE ? ESCAPE '\', which the LIKE fragment spells.

Parameters

query: string
optional
where: "anywhere" | "prefix" = anywhere

Return Type

string

Usage

import { likePattern } from "api/lib/like.ts";