public override Boolean Execute(Dictionary <string, object> parameters)
        {
            List <string> sqlValueList = new List <string>();

            foreach (object[] valuesArr in base.ValuesList)
            {
                if (base.Fields != null && base.Fields.Count() != valuesArr.Count())
                {
                    throw new ArgumentException("Provided ValueSet does not match the size of Field List");
                }

                List <string> values = new List <string>();
                foreach (object value in valuesArr)
                {
                    if (value is Array)
                    {
                        object[] valuePair = (object[])value;
                        values.Add(MySQLConnection.EscapeValue(
                                       valuePair[0].ToString(), (int)valuePair[1], ref parameters)
                                   );

                        continue;
                    }

                    if (value == null)
                    {
                        values.Add("NULL");
                        continue;
                    }

                    values.Add(MySQLConnection.EscapeValue(
                                   value.ToString(), ParameterFormat.PREPARED_STATEMENT_ARGUMENT, ref parameters)
                               );
                }

                sqlValueList.Add(String.Format("({0})", String.Join(", ", values)));
            }

            String query;

            if (base.Fields == null || base.Fields.Count() < 1)
            {
                query = String.Format("INSERT INTO {0} VALUES {1}", base.Table,
                                      String.Join(",", sqlValueList));
            }
            else
            {
                List <string> fields = new List <String>();
                foreach (String field in base.Fields)
                {
                    fields.Add(MySQLConnection.FieldEscape(field));
                }

                query = String.Format("INSERT INTO {0} ({1}) VALUES {2}", base.Table,
                                      String.Join(", ", fields), String.Join(", ", sqlValueList));
            }

            return(Database.ExecuteUpdate(query, parameters));
        }
        public override bool Execute(Dictionary <string, object> parameters)
        {
            List <string> setFields = new List <string>();

            foreach (FieldUpdate field in base.FieldUpdates)
            {
                string fieldEscaped = MySQLConnection.FieldEscape(field.Field);
                string value        = MySQLConnection.EscapeValue(field.Value, field.ValueFormat, ref parameters);
                setFields.Add(String.Format("{0}={1}", fieldEscaped, value));
            }

            string fieldSQL = String.Join(", ", setFields);

            if (base.Conditions.Count() < 1)
            {
                return(Database.ExecuteUpdate(String.Format("UPDATE {0} SET {1}", fieldSQL, Table)));
            }

            string query = String.Format("UPDATE {0} SET {1} WHERE {2}", base.Table, fieldSQL,
                                         Database.BuildConditionSQL(base.Conditions, ref parameters));

            return(Database.ExecuteUpdate(query, parameters));
        }