Back to Pocketbase

Interface HashExp

static/jsvm/interfaces/dbx.HashExp.html

latest1.1 KB
Original Source

Interface HashExp

HashExp represents a hash expression.

A hash expression is a map whose keys are DB column names which need to be filtered according to the corresponding values. For example, HashExp{"level": 2, "dept": 10} will generate the SQL: "level"=2 AND "dept"=10.

HashExp also handles nil values and slice values. For example, HashExp{"level": []interface{}{1, 2}, "dept": nil} will generate: "level" IN (1, 2) AND "dept" IS NULL.

Hierarchy

Index

Methods

build

Methods

build

  • build(db, params): string

Build converts an expression into a SQL fragment.

Parameters

db: dbx.DB
params: Params

Returns string

Settings

Member Visibility

  • Inherited

Theme

OSLightDark

On This Page

Generated using TypeDoc