File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 parseTestOracleDBConnectionString ,
1111 parseTestMongoDBConnectionString ,
1212 parseTestIbmDB2ConnectionString ,
13+ parseTestDynamoDBConnectionString ,
1314} from '../parsers/string-connection-to-database-parsers.js' ;
1415
1516export type TestConnectionsFromJSON = {
@@ -264,6 +265,8 @@ export const Constants = {
264265 case type . toLowerCase ( ) . includes ( 'ibmdb2' ) :
265266 connection = parseTestIbmDB2ConnectionString ( connection_string ) as CreateConnectionDto ;
266267 break ;
268+ case type . toLowerCase ( ) . includes ( 'dynamodb' ) :
269+ connection = parseTestDynamoDBConnectionString ( connection_string ) as CreateConnectionDto ;
267270 default :
268271 break ;
269272 }
Original file line number Diff line number Diff line change @@ -144,3 +144,18 @@ export const parseTestIbmDB2ConnectionString = (connectionString: string): Parti
144144 config . cert = params . get ( 'cert' ) || undefined ;
145145 return config ;
146146} ;
147+
148+ // dynamodb://accessKeyId:secretAccessKey@localhost :8000/
149+ export const parseTestDynamoDBConnectionString = ( connectionString : string ) : Partial < CreateConnectionDto > => {
150+ const url = new URL ( connectionString ) ;
151+ const config : Partial < CreateConnectionDto > = { } ;
152+
153+ config . username = url . username || null ;
154+ config . password = url . password || null ;
155+ config . host = url . hostname || null ;
156+ config . type = ConnectionTypesEnum . dynamodb ;
157+ config . title = 'DynamoDB' ;
158+ config . isTestConnection = true ;
159+ config . ssl = false ;
160+ return config ;
161+ } ;
You can’t perform that action at this time.
0 commit comments