Skip to content

Commit

Permalink
SOSL user mode and system mode support.
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarParra committed May 13, 2024
1 parent 11c5675 commit 5b5883d
Show file tree
Hide file tree
Showing 7 changed files with 2,580 additions and 2,519 deletions.
5 changes: 4 additions & 1 deletion .idea/material_theme_project_new.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/apex-reflection-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cparra/apex-reflection",
"version": "2.7.1",
"version": "2.8.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
20 changes: 13 additions & 7 deletions lib/src/antlr/grammars/apex/ApexParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -792,17 +792,23 @@ soslLiteral
soslClauses
: (IN searchGroup)?
(RETURNING fieldSpecList)?
(WITH DIVISION ASSIGN StringLiteral)?
(WITH DATA CATEGORY filteringExpression)?
(WITH SNIPPET (LPAREN TARGET_LENGTH ASSIGN IntegerLiteral RPAREN)? )?
(WITH NETWORK IN LPAREN networkList RPAREN)?
(WITH NETWORK ASSIGN StringLiteral)?
(WITH PRICEBOOKID ASSIGN StringLiteral)?
(WITH METADATA ASSIGN StringLiteral)?
soslWithClause*
limitClause?
(UPDATE updateList)?
;

soslWithClause
: WITH DIVISION ASSIGN StringLiteral
| WITH DATA CATEGORY filteringExpression
| WITH SNIPPET (LPAREN TARGET_LENGTH ASSIGN IntegerLiteral RPAREN)?
| WITH NETWORK IN LPAREN networkList RPAREN
| WITH NETWORK ASSIGN StringLiteral
| WITH PRICEBOOKID ASSIGN StringLiteral
| WITH METADATA ASSIGN StringLiteral
| WITH USER_MODE
| WITH SYSTEM_MODE
;

searchGroup
: (ALL|EMAIL|NAME|PHONE|SIDEBAR) FIELDS
;
Expand Down
5,054 changes: 2,545 additions & 2,509 deletions lib/src/antlr/lib/apex/ApexParser.dart

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lib/src/antlr/lib/apex/ApexParser.interp

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions lib/src/antlr/lib/apex/ApexParserBaseListener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,14 @@ class ApexParserBaseListener implements ApexParserListener {
@override
void exitSoslClauses(SoslClausesContext ctx) {}

/// The default implementation does nothing.
@override
void enterSoslWithClause(SoslWithClauseContext ctx) {}

/// The default implementation does nothing.
@override
void exitSoslWithClause(SoslWithClauseContext ctx) {}

/// The default implementation does nothing.
@override
void enterSearchGroup(SearchGroupContext ctx) {}
Expand Down
7 changes: 7 additions & 0 deletions lib/src/antlr/lib/apex/ApexParserListener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,13 @@ abstract class ApexParserListener extends ParseTreeListener {
/// [ctx] the parse tree
void exitSoslClauses(SoslClausesContext ctx);

/// Enter a parse tree produced by [ApexParser.soslWithClause].
/// [ctx] the parse tree
void enterSoslWithClause(SoslWithClauseContext ctx);
/// Exit a parse tree produced by [ApexParser.soslWithClause].
/// [ctx] the parse tree
void exitSoslWithClause(SoslWithClauseContext ctx);

/// Enter a parse tree produced by [ApexParser.searchGroup].
/// [ctx] the parse tree
void enterSearchGroup(SearchGroupContext ctx);
Expand Down

0 comments on commit 5b5883d

Please sign in to comment.