getConnection function
String
getConnection(
- PostgreSQLConnection connection
)
Implementation
String getConnection(PostgreSQLConnection connection) {
var content = '''
import 'package:postgres/postgres.dart';
var _pgConnection = PostgreSQLConnection(
'${connection.host}',
${connection.port},
'${connection.databaseName}',
username: '${connection.username}',
password: '${connection.password}',
useSSL : ${connection.useSSL}
);
PostgreSQLConnection getConnection() => _pgConnection;
''';
return content;
}