Amazon.CognitoSync.SyncManager.Internal.SQLiteLocalStorage.RecordColumns.BuildUpdate C# (CSharp) Метод

BuildUpdate() публичный статический Метод

public static BuildUpdate ( string fieldList, string conditions ) : string
fieldList string
conditions string
Результат string
            public static string BuildUpdate(string[] fieldList, string conditions)
            {
                string update = "UPDATE " + SQLiteLocalStorage.TABLE_RECORDS + " 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;
            }