parent
3d55100717
commit
be7b9ac021
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue