Skip to content

Commit

Permalink
connman: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akphi committed Nov 15, 2023
1 parent 1012c23 commit 4522f34
Show file tree
Hide file tree
Showing 10 changed files with 175 additions and 14 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
166 changes: 166 additions & 0 deletions docs/connection/new-connection-framework.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

public class TestSnowflakeConnection
{
public static class WithKeyPair extends AbstractConnectionFactoryTest<java.sql.Connection>
public static class ForSnowflakeWithKeyPairFlow extends AbstractConnectionFactoryTest<java.sql.Connection>
{
private static final String CONNECTION_INTEGRATION_TEST__SNOWFLAKE_PK = "CONNECTION_INTEGRATION_TEST__SNOWFLAKE_PK";
private static final String CONNECTION_INTEGRATION_TEST__SNOWFLAKE_PK_PASSPHRASE = "CONNECTION_INTEGRATION_TEST__SNOWFLAKE_PK_PASSPHRASE";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public Iterable<? extends Processor<?>> getExtraProcessors()
Connection.class,
(element, context) ->
{
// @HACKY: new-connection-framework
Root_meta_pure_metamodel_connection_Connection metamodel = new Root_meta_pure_metamodel_connection_Connection_Impl(element.name, null, context.pureModel.getClass("meta::pure::metamodel::connection::Connection"))._name(element.name);
connectionsIndex.put(context.pureModel.buildPackageString(element._package, element.name), metamodel);
metamodel._rawValue(element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ private Connection visitElement(ConnectionParserGrammar.DatabaseConnectionElemen
text.append(fragment.getText());
}
String rawValueText = text.length() > 0 ? text.substring(0, text.length() - 2) : text.toString();
// prepare island grammar walker source information
connection = PureProtocolObjectMapperFactory.getNewObjectMapper().readValue(rawValueText, Connection.class);
}
catch (Exception e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private static String renderElement(Connection element, PureGrammarComposerConte
String value;
try
{
// This is very super hacky!
// @HACKY: new-connection-framework
element.sourceInformation = null;
ObjectMapper objectMapper = PureProtocolObjectMapperFactory.getNewObjectMapper();
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@

Class meta::pure::metamodel::connection::Connection extends PackageableElement
{
// @HACKY: new-connection-framework
rawValue: Any[1];
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-protocol</artifactId>
<artifactId>legend-engine-language-pure-modelManager-sdlc</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-language-pure-modelManager-sdlc</artifactId>
<artifactId>legend-engine-protocol-pure</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-protocol-pure</artifactId>
<artifactId>legend-engine-xt-connection-protocol</artifactId>
</dependency>
<!-- ENGINE -->

<!-- RUNTIME -->
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-connection-protocol</artifactId>
<artifactId>legend-engine-xt-relationalStore-protocol</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@

package org.finos.legend.engine.datapush;

import org.finos.legend.connection.ConnectionFactory;
import org.finos.legend.connection.Connection;
import org.finos.legend.connection.ConnectionFactory;
import org.finos.legend.engine.datapush.data.Data;
import org.finos.legend.engine.protocol.pure.v1.packageableElement.connection.AuthenticationConfiguration;
import org.finos.legend.engine.shared.core.identity.Identity;

public abstract class DataPusher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-language-pure-dsl-generation</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-language-pure-dsl-generation</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down

0 comments on commit 4522f34

Please sign in to comment.