Skip to content
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

add graph name check in gremlin and rest config #854

Merged
merged 2 commits into from
Feb 19, 2020
Merged

add graph name check in gremlin and rest config #854

merged 2 commits into from
Feb 19, 2020

Conversation

zhoney
Copy link
Contributor

@zhoney zhoney commented Feb 18, 2020

fixed: #850

Change-Id: I5c4c82c784aebeb0bfe910107d7d4e19abc62d7c

@codecov
Copy link

codecov bot commented Feb 18, 2020

Codecov Report

Merging #854 into master will increase coverage by 1.08%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #854      +/-   ##
============================================
+ Coverage     70.73%   71.81%   +1.08%     
- Complexity     4327     4388      +61     
============================================
  Files           286      286              
  Lines         21073    21090      +17     
  Branches       2963     2967       +4     
============================================
+ Hits          14906    15146     +240     
+ Misses         4686     4453     -233     
- Partials       1481     1491      +10     
Impacted Files Coverage Δ Complexity Δ
...hugegraph/backend/store/hbase/HbaseSerializer.java 100.00% <0.00%> (ø) 1.00% <0.00%> (ø%) ⬆️
...egraph/backend/store/hbase/HbaseStoreProvider.java 100.00% <0.00%> (ø) 6.00% <0.00%> (ø%) ⬆️
...raph/backend/store/postgresql/PostgresqlStore.java 100.00% <0.00%> (ø) 2.00% <0.00%> (ø%) ⬆️
...raph/backend/store/postgresql/PostgresqlTable.java 100.00% <0.00%> (ø) 20.00% <0.00%> (ø%) ⬆️
...kend/store/postgresql/PostgresqlStoreProvider.java 92.10% <0.00%> (ø) 5.00% <0.00%> (ø%) ⬆️
...idu/hugegraph/backend/store/hbase/HbaseTables.java 88.57% <0.00%> (ø) 0.00% <0.00%> (ø%) ⬆️
...aph/backend/store/postgresql/PostgresqlTables.java 87.80% <0.00%> (ø) 1.00% <0.00%> (ø%) ⬆️
...backend/store/postgresql/PostgresqlSerializer.java 84.61% <0.00%> (ø) 4.00% <0.00%> (ø%) ⬆️
...u/hugegraph/backend/store/hbase/HbaseFeatures.java 84.21% <0.00%> (ø) 16.00% <0.00%> (ø%) ⬆️
...aidu/hugegraph/backend/store/hbase/HbaseTable.java 80.95% <0.00%> (-1.91%) 35.00% <0.00%> (-1.00%)
... and 46 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1428c8b...dace2b2. Read the comment docs.

Copy link
Contributor

@Linary Linary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems commit message need modify, nothing else

fixed: #850

Change-Id: I5c4c82c784aebeb0bfe910107d7d4e19abc62d7c
@zhoney zhoney changed the title forbid use "-" in graph name add graph name check in gremlin and rest config Feb 18, 2020
@@ -57,6 +60,7 @@
exceptions.put("InvalidQueryException", "unconfigured table");
}

@SuppressWarnings("unchecked")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to line 90

@@ -83,7 +87,15 @@ public static void main(String[] args)
"Must contain at least one graph");

for (ConfigurationNode graphName : graphNames) {
String name = ((Map.Entry<String, Object>)
graphName.getReference()).getKey();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we call graphName.getName()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

graphName.getName() returns 'graph' due to it's sub node of 'graphs'

" valid graph name is up to 48 alpha-numeric " +
"characters and underscores and only letters are " +
"supported as first letter. " +
"Note: letter is case insensitive", name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems better to add a method checkGraphName()

Change-Id: Ib2b74d6471e9298c8d48809df8ce0e32da66067c
@Linary Linary merged commit 08af8f8 into master Feb 19, 2020
@javeme javeme deleted the issue850 branch June 5, 2020 19:10
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.

Gremlin RESTFul API 接口图名不能使用中划线
3 participants