Closed cdalexndr closed 1 year ago
Found a test code snippet to call admin statements:
String adminNGQL = "show hosts";
boolean result = statement.execute(adminNGQL);
assertTrue(result);
ResultSet resultSet = statement.getResultSet();
assertNotNull(resultSet);
I think show/describe statements should be allowed to run using statement.executeQuery
in order to be compatible with higher level libraries, such as Spring data that calls executeQuery when expecting results. For example:
JdbcOperations.queryForList("show tags", String.class)
@Nicole00 what do you think? It seems to restrict Nebula-JDBC on the above DQL-only queries isn't reasonable.
Trying to query:
results in error:
java.sql.SQLException: Method executeQuery() can only execute nGql to query data, but the current nGql do not contains any query keyword in [match, lookup, go, fetch, find, subgraph], please modify your nGql or use executeUpdate(), execute().
"execute()" and "executeUpdate()" don't return query results
Similar for other show/describe statements