Skip to content

Commit ed4ef24

Browse files
committed
Merge commit 'refs/pull/57/head' of https://github.com/hackolade/Cassandra
2 parents 86fd682 + be0f2f7 commit ed4ef24

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

forward_engineering/helpers/dbConnectionService/applyToInstance.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
const applyToInstance = (cassandraHelper) => (connectionInfo, logger, app) => {
2-
const script = connectionInfo.script;
2+
let script = connectionInfo.script;
3+
if(connectionInfo.clusterType === 'apolloCloud'){
4+
const usePosition = script.indexOf('USE');
5+
script = script.substring(usePosition)
6+
}
37
const cassandra = cassandraHelper(app.require('lodash'));
48

59
return cassandra.connect(app)(connectionInfo)

0 commit comments

Comments
 (0)