mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-02 02:34:42 +08:00
@@ -14,6 +14,14 @@ public final class HighgoAgent extends PostgresLikeAgent {
|
||||
super(HIGHGO_PROFILE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String setSchemaSQL(String schema) {
|
||||
if ("public".equals(schema)) {
|
||||
return super.setSchemaSQL(schema);
|
||||
}
|
||||
return super.setSchemaSQL(schema) + ", public";
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new MultiSessionJsonRpcServer(HighgoAgent::new).run();
|
||||
}
|
||||
|
||||
@@ -28,6 +28,15 @@ class HighgoAgentTest extends JdbcFakeExecutionBehaviorTest {
|
||||
Assertions.assertEquals("jdbc:highgo://{host}:{port}/{database}", agent.getProfile().getUrlTemplate());
|
||||
}
|
||||
|
||||
@Test
|
||||
void preservesPublicFunctionsWhenSwitchingSchemas() {
|
||||
HighgoAgent agent = new HighgoAgent();
|
||||
|
||||
Assertions.assertEquals("SET search_path TO \"app\", public", agent.setSchemaSQL("app"));
|
||||
Assertions.assertEquals("SET search_path TO \"public\"", agent.setSchemaSQL("public"));
|
||||
Assertions.assertEquals("SET search_path TO \"PUBLIC\", public", agent.setSchemaSQL("PUBLIC"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void readsViewSourceWithQuotedRegclassParameter() {
|
||||
HighgoAgent agent = new HighgoAgent();
|
||||
|
||||
Reference in New Issue
Block a user