getSoqlCompletionContext (soql/soqlCompletion.ts)

dbx · apps/desktop/src/lib/soql/soqlCompletion.ts · typescript · Apache-2.0
crm

Pure TypeScript library that parses SOQL queries and generates completion items.

// Source: https://github.com/t8y2/dbx | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Salesforce SOQL completion engine.
//
// SOQL is SQL-like but narrower: a single object per query (FROM), relationship
// traversal via `Relationship.Field` paths, no JOINs, no DDL/DML. This module is a
// PURE function library mirroring lib/mongo/mongoCompletion.ts: a context scanner
// reads the text under the cursor, a builder turns resolved metadata into
// completion items, and an async resolver walks relationship paths using a
// caller-supplied field loader. QueryEditor.vue supplies the store-backed loader
// (which reads the backend describe cache), so nothing here touches I/O directl

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key