using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tango.Synchronization.Local
{
///
/// Represents an SQL data base adapter used by .
///
///
public interface ILocalDataBase : IDisposable
{
///
/// Gets the database source URL/File.
///
String Source { get; }
///
/// Gets the database tables collection.
///
List Tables { get; }
///
/// Loads the tables (Must be done before any synchronization).
///
void LoadTables();
///
/// Clones a table from another database into this database.
///
/// The other database.
/// The other table.
///
DataTable CloneTableFrom(ILocalDataBase otherDB, DataTable otherTable);
///
/// Replaces the table data with the data from another table.
///
/// The other table.
void ReplaceTableData(ILocalDataBase otherDB, DataTable otherTable);
///
/// Replaces the table data with the data from another table.
///
/// The other table.
String GetReplaceTableDataCommand(ILocalDataBase otherDB, DataTable otherTable);
///
/// Gets the SQL command for .
///
/// The other database.
/// The other table.
///
String GetCloneTableFromCommand(ILocalDataBase otherDB, DataTable otherTable);
///
/// Adds the specified column to the specified table.
///
/// The table.
/// The column.
///
DataColumn AddColumn(DataTable table, DataColumn column);
///
/// Gets the SQL command for .
///
/// The table.
/// The column.
///
String GetAddColumnCommand(DataTable table, DataColumn column);
///
/// Adds the specified row to the specified table.
///
/// The table.
/// The row.
void AddRow(DataTable table, DataRow row);
///
/// Gets the SQL command for .
///
/// The table.
/// The row.
///
String GetAddRowCommand(DataTable table, DataRow row);
///
/// Updates the matching row by the row GUID.
///
/// The table.
/// The row.
void UpdateRow(DataTable table, DataRow row);
///
/// Gets the SQL command for .
///
/// The table.
/// The row.
///
String GetUpdateRowCommand(DataTable table, DataRow row);
///
/// Clears the data base.
///
void ClearDataBase();
}
}