Skip to content

Commit

Permalink
fix: 修复 pgsql 带有中划线的 schame 和 table 无法查询的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron3S committed Oct 8, 2024
1 parent a31f0ab commit 60d5438
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public List<String> getSchemas() throws SQLException {

@Override
public void changeSchema(String schema) throws SQLException {
this.execute(SQL.of("SET SEARCH_PATH TO ?;", schema));
this.execute(SQL.of("SET SEARCH_PATH TO '?';", schema));
}

@Override
public SQLExecutePlan createPlan(String schema, String table, SQLQueryParams sqlQueryParams) throws SQLException {
var sql = SQL.of("select * from ?.?", schema, table);
var sql = SQL.of("select * from \"?\".\"?\"", schema, table);
return this.createPlan(sql, sqlQueryParams);
}
}

0 comments on commit 60d5438

Please sign in to comment.