public static string BuildUpdate(string[] fieldList, string conditions)
{
string update = "UPDATE " + SQLiteLocalStorage.TABLE_DATASETS + " SET ";
for (int i = 0; i < fieldList.Length; i++)
{
update += fieldList[i] + " = @" + fieldList[i] + (i < fieldList.Length - 1 ? " , " : " ");
}
if (conditions != null && conditions.Trim().Length > 0)
{
update += " WHERE " + conditions;
}
return update;
}