mirror of
				https://github.com/Fabio286/antares.git
				synced 2025-06-05 21:59:22 +02:00 
			
		
		
		
	feat(PostgreSQL): ✨ Postgress connection string feature for local and server connection string
This feature is based on this [issue](https://github.com/Fabio286/antares/issues/193) I tested with the following posgress connection strings postgresql://postgres:pgpassword@127.0.0.1:5432/my_local_databse?connection=local postgres://serveruser:serverpass@test.db.elephantsql.com/my_remote_databse?connection=server postgres://serveruser:serverpass@test.db.elephantsql.com:5432/my_remote_databse postgresql://postgres:pgpassword@127.0.0.1:5432/my_local_databse. The connection string decoder is loaded before "test-connection", "check-connection", and "connect"
This commit is contained in:
		| @@ -1,20 +1,25 @@ | ||||
| 'use strict'; | ||||
| import { ipcRenderer } from 'electron'; | ||||
|  | ||||
| import connStringConstruct from '../libs/connStringDecode'; | ||||
|  | ||||
| export default class { | ||||
|    static makeTest (params) { | ||||
|    static makeTest(params) { | ||||
|       params = connStringConstruct(params); | ||||
|       return ipcRenderer.invoke('test-connection', params); | ||||
|    } | ||||
|  | ||||
|    static checkConnection (params) { | ||||
|    static checkConnection(params) { | ||||
|       params = connStringConstruct(params); | ||||
|       return ipcRenderer.invoke('check-connection', params); | ||||
|    } | ||||
|  | ||||
|    static connect (params) { | ||||
|    static connect(params) { | ||||
|       params = connStringConstruct(params); | ||||
|       return ipcRenderer.invoke('connect', params); | ||||
|    } | ||||
|  | ||||
|    static disconnect (uid) { | ||||
|    static disconnect(uid) { | ||||
|       return ipcRenderer.invoke('disconnect', uid); | ||||
|    } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user