using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Text;
namespace FastReport.Web.Services
{
///
/// Interface for working with connections. Allows to get connection string properties, connected tables, connection types and create a connection string.
///
///
/// The interface may change over time
///
public interface IConnectionsService
{
///
/// Returns JSON string of connection string properties.
///
/// Out variable, which helps to determine if an error is returned
/// Returns JSON string with connection string properties. If an error is detected, it returns the error text.
string GetConnectionStringPropertiesJSON(string connectionType, string connectionString, out bool isError);
///
/// Create connection string and returns json with this connection string
///
/// Out variable, which helps to determine if an error is returned
/// Returns JSON with сonnection string. If an error is detected, it returns the error text.
string CreateConnectionStringJSON(string connectionType, IFormCollection form, out bool isError);
///
/// Returns the list of connected tables by connection type and connection string
///
/// Returns a bool variable which means whether the error is returned or not
/// Returns JSON with connected tables
string GetConnectionTables(string connectionType, string connectionString, List customConnections);
///
/// Returns the list of connection types
///
List GetConnectionTypes(bool needSqlSupportInfo = false);
}
}