Skip to content

Conversation

@dehru
Copy link
Contributor

@dehru dehru commented Jan 15, 2021

What does this PR do?

This PR just bring main into par with develop, which is about 3 weeks behind. Since develop has released several npm package updates this year. In the future, we will publish npm packages out of main if we are following our new process.

jgellin-sf and others added 14 commits November 19, 2020 10:17
* model WHERE clause
* make IN and INCLUDES conditions unmodeled syntax
* implement condition simplicity utils
* added where complexity to script statement
* Add debounce dep to language-server

* Call runQuery on clients when SOQL query text changes

* Gate runQuery request with runQueryValidation flag

* Convert runQuery flag to client feature
* remove code builder
The main reason we are doing this migration is to be able to leverage lib
antlr-c3 for code-completion.

Also:
* add a top-level prettierrc config file
* Pin version of lwc-services to avoid build errors with the latest version
* Leveraging antlr4-c3 library for code-completion driven by antlr grammar
* Simple completion of main keywords (SELECT, FROM, WHERE)
* Simple completion of "queryable" SObject names for FROM clause
* Actual retrieval of SObject names is responsibility of the LSP client
* SOQL LSP server: code-completion of SELECT fields

* Extracts the object referenced in FROM
* Supports nested SELECT statements
* Generate completion item with SELECT FROM snippet only where it applies
* Actual retrieval of SObject fields is responsibility of the LSP client

* Improve extraction of FROM value on parse error

* Improve extraction of FROM value when using alias

* Increase version number
* Disabled 'Running...' button while query running
* remove unused import
* Add basic code-completion for ORDER BY and other keywords

Also:
 * New implementation for extracting data from query (like SObject name),
 * More robust in case of parsing errors (uses custom ANTLR Error Strategy)
 * Better handling of nested queries
 * Better handling of incomplete queries (nested or not)
 * New keywords: FOR, OFFSET, LIMIT, ORDER BY, GROUP BY, WITH, WHERE,
                 UPDATE TRACKING, UPDATE VIEWSTAT

* Simplify implementation for QueryExtractor

* Refactoring: Extract methods. Move class to new file. Remove old code

* Propose keywords (ORDER BY, etc) after FROM in nested queries

Also:
 * Add proposals for COUNT(...), TYPEOF, DISTANCE
 * Cleaner handling of "special cases"

* Improve tests. Propose numbers only after LIMIT

* Extract constants. Reformat comments

* Do NOT offer numeric candidates after LIMIT
…s/unsupported syntax present (#110)

* condition <--> array

* in progress

* stashing

* send telemetry when errors or unsupported

* passing basic soql errors/unsupported count to custom editor for telemetry

* simplify statement

* Better telemetry through metadata

* combine jon's and my work into a single PR

* fixes for PR

Co-authored-by: Jonathan Gellin <jgellin@salesforce.com>
* Disable WHERE in model
* Update soql-model dependency version
* Improvements to code-completion of WHERE expressions

* feat(soql): Smarter code-completion of WHERE clause expressions

 * Complete operators based on type of field
 * Complete literal values based on field

* Refactoring: pass JSON data instead of parseable string for commands

Also: Offer NULL as a completion value only if operator in context allows nulls.

* fix: workaround: grammar allows spaces between the < > and = signs

* Bump version for publish

Co-authored-by: Jonathan Gellin <jgellin@salesforce.com>
@dehru dehru merged commit 28d7d14 into main Jan 15, 2021
dehru added a commit that referenced this pull request Jan 15, 2021
dehru added a commit that referenced this pull request Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants