prorm API Reference
    Preparing search index...

    Function toTsquery

    • Create a PostgreSQL to_tsquery expression SQL: to_tsquery(config, query)

      Parameters

      • query: string
      • Optionalconfig: string

      Returns { $tsquery: { query: string; config: string } }

      import { toTsquery } from 'orm';
      Article.findAll({
      where: {
      body: { [toTsquery('database')]: true }
      }
      })
      // SQL: WHERE body @@ to_tsquery('english', 'database')