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

Not support integer setter in JDBC PreparedStatement #59

Open
chenjienn opened this issue Dec 30, 2019 · 0 comments
Open

Not support integer setter in JDBC PreparedStatement #59

chenjienn opened this issue Dec 30, 2019 · 0 comments

Comments

@chenjienn
Copy link

chenjienn commented Dec 30, 2019

When i run the code below, it works

String sql = "match (x:meta_table {table_id: ?}),(y:meta_table),\n" +
                "path=allshortestpaths((x)-[:meta_table_lineage*1..1]->(y))\n" +
                "return path";
 return jdbcTemplate.query(sql, ps -> {
            ps.setString(1, tableLineageInfo.getTableId());
        }, new ResultExtractor());

but when i run the code below, it doesn't work and throw the exception

String sql = "match (x:meta_table {table_id: ?}),(y:meta_table),\n" +
                "path=allshortestpaths((x)-[:meta_table_lineage*1..?]->(y))\n" +
                "return path";
 return jdbcTemplate.query(sql, ps -> {
            ps.setString(1, tableLineageInfo.getTableId());
            ps.setInt(2, tableLineageInfo.getLayerNum());
        }, new ResultExtractor());
uncategorized SQLException for SQL [match (x:meta_table {table_id: ?}),(y:meta_table),
path=allshortestpaths((x)-[:meta_table_lineage*1..?]->(y))
return path]; SQL state [0A000]; error code [0]; ERROR: property constraint is not supported; nested exception is org.postgresql.util.PSQLException: ERROR: property constraint is not supported] with root cause
org.postgresql.util.PSQLException: ERROR: property constraint is not supported
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2497)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2233)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
	at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:108)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
	at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:678)
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

No branches or pull requests

1 participant