Ejemplo n.º 1
0
        void DoWithWhere(SoodaObject obj, StringBuilder builder, ArrayList queryParams, bool isRaw)
        {
            builder.Append(" where ");
            object primaryKeyValue = obj.GetPrimaryKeyValue();

            FieldInfo[] primaryKeyFields = obj.GetClassInfo().GetPrimaryKeyFields();
            for (int i = 0; i < primaryKeyFields.Length; i++)
            {
                if (i > 0)
                {
                    builder.Append(" and ");
                }
                FieldEquals(primaryKeyFields[i], SoodaTuple.GetValue(primaryKeyValue, i), builder, queryParams);
            }
            SqlBuilder.BuildCommandWithParameters(_updateCommand, true, builder.ToString(), queryParams.ToArray(), isRaw);
            FlushUpdateCommand(false);
        }