createProjectFromPostgresDatabase function

Future<bool> createProjectFromPostgresDatabase(
  1. PostgreSQLConnection connection, {
  2. String path = '',
  3. String name = 'static_grpc_server',
})

Implementation

Future<bool> createProjectFromPostgresDatabase(
  PostgreSQLConnection connection, {
  String path = '',
  String name = 'static_grpc_server',
}) async {
  var schemaCount = 2;
  return testConnection(connection, schemaCount).then((value) async {
    schemaCount = value;
    return value > 0 &&
        await createFold(path, name).then((value) async =>
            value &&
            await createProjectStructure(path, name, connection)
                .then((value) async =>
                    value &&
                    await createProjectFiles(
                      connection,
                      path: path,
                      name: name,
                      schemaInName: schemaCount > 1,
                    )));
  });
}