-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(hubble): support highlighting and hints in query statements #384
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d7a9307
init
wanganjuan cac70ab
ui component protocol information
wanganjuan bbefcda
Delete useless lock files
wanganjuan ce56f29
Merge branch 'apache:master' into master
wanganjuan 6a1b057
Packaging log output progress display
wanganjuan 7d77382
Merge branch 'apache:master' into master
wanganjuan 6a4f7d3
Merge branch 'apache:master' into master
wanganjuan 8954692
Query statements support highlighting and hints
wanganjuan a096ae9
Query statements support highlighting and hints
wanganjuan 456d7a4
Add gremlin keyword hints
wanganjuan c2cd1c1
Merge branch 'apache:master' into master
wanganjuan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
hugegraph-hubble/hubble-fe/src/components/graph-management/data-analyze/GremlinKeyWords.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
export const keywords = | ||
'g|V|E|has|open|close|inV|inE|out|outV|outE|label|store|next|addVertex|clazz|' + | ||
'limit|traversal|withBulk|values|schema|except|ifNotExist|addEdge|addVertex|property|io|' + | ||
'filter|loops|readGraph|tree|properties|graph|value|bothE|addV|where|hidden|bothV|without' + | ||
'both|is|path|it|get|from|to|select|otherV|within|inside|outside|withSack'; | ||
|
||
export const buildinFunctions = | ||
'targetLabel|sourceLabel|indexLabel|indexLabels|edgeLabel|vertexLabel|propertyKey|getPropertyKey|' + | ||
'getVertexLabel|getEdgeLabel|getIndexLabel|getPropertyKeys|getVertexLabels|getEdgeLabels|getIndexLabels|' + | ||
'coin|count|coalesce|createIndex|hasLabel|getLabelId|create|build|append|eliminate|remove|rebuildIndex|' + | ||
'constant|isDirected|desc|inject|profile|simplePath|eq|neq|gt|gte|lt|lte|queryType|indexFields|frequency|' + | ||
'links|type|in|on|by|checkDataType|checkValue|validValue|secondary|drop|search|makeEdgeLabel|cyclicPath|' + | ||
'hasKey|match|sack|aggregate|between|baseType|baseValue|indexType|rebuild|choose|aggregate|iterate|lte|dedup|' + | ||
'identity|groupCount|until|barrier|fold|unfold|schemaId|checkName|makeIndexLabel|makeVertexLabel|makePropertyKey|' + | ||
'sideEffect|hasNext|toList|toSet|cap|option|branch|choose|repeat|emit|order|mean|withComputer|subgraph|' + | ||
'getObjectsAtDepth|hasValue|hasNot|hasId|nullableKey|nullableKeys|sortKeys|link|singleTime|multiTimes|' + | ||
'enableLabelIndex|userdata|checkExist|linkWithLabel|directed|idStrategy|primaryKeys|primaryKey'; | ||
|
||
export const dataTypes = | ||
'int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|toString|primitive|' + | ||
'money|real|number|integer|asInt|asText|dataType|cardinality|asText|asInt|asTimestamp|flatMap|valueMap|' + | ||
'asByte|asBlob|asDouble|asDate|asFloat|asLong|valueSingle|asBoolean|valueList|valueSet|asUuid|null|Infinity|NaN|undefined'; | ||
|
||
export const baseData = [ | ||
...keywords.split('|'), | ||
...buildinFunctions.split('|'), | ||
...dataTypes.split('|') | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like is mysql's hint config. I think that we should set config as gremlin's hint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems right catch, thanks for ur reminder, would u also like to improve the FE module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I'm learning the FE module codes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lionztt any update for this PR? it should consider be merged and improve it later if no better solution now (due to the apache release next week)