Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 542 Bytes

README.md

File metadata and controls

25 lines (16 loc) · 542 Bytes

escapeSoqlAndSosl

Escape Salesforce SOQL queries and SOSL searches. Can be used standalone or in conjunction with JSForce.

Installation

> npm install --save-dev escape-soql-and-sosl

Usage

const {escapeSOQL, escapeSOSL} = require('escape-soql-and-sosl');
const jsforce = require('jsforce');

const conn = ...

const query = `FIND {@${escapeSOSL('pride-feat-dangelo.com')}} IN email FIELDS RETURNING Contact(Id, AccountId WHERE AccountId != null)`;
conn.search(query);

License

The MIT License.