private QueryCommand CreateCommand() { var insert = SqlDml.Insert(SqlDml.TableRef(PrimaryIndexes[0].Table)); setOperation.Statement = SetStatement.Create(insert); setOperation.AddValues(); return ToCommand(insert); }
private QueryCommand CreateCommand(QueryTranslationResult request) { var update = SqlDml.Update(SqlDml.TableRef(PrimaryIndexes[0].Table)); setOperation.Statement = SetStatement.Create(update); Join(update, (SqlSelect)request.Query); setOperation.AddValues(); return(ToCommand(update)); }
protected override int ExecuteInternal() { Bindings = new List <QueryParameterBinding>(); if (PrimaryIndexes.Length > 1) { throw new NotImplementedException("Inheritance is not implemented"); } SqlInsert insert = SqlDml.Insert(SqlDml.TableRef(PrimaryIndexes[0].Table)); setOperation.Statement = SetStatement.Create(insert); setOperation.AddValues(); QueryCommand command = ToCommand(insert); return(command.ExecuteNonQuery()); }
protected override int ExecuteInternal() { base.ExecuteInternal(); QueryTranslationResult request = GetRequest(query); Bindings = request.ParameterBindings.ToList(); if (PrimaryIndexes.Length > 1) { throw new NotImplementedException("Inheritance is not implemented"); } SqlUpdate update = SqlDml.Update(SqlDml.TableRef(PrimaryIndexes[0].Table)); setOperation.Statement = SetStatement.Create(update); Join(update, (SqlSelect)request.Query); setOperation.AddValues(); QueryCommand command = ToCommand(update); return(command.ExecuteNonQuery()); }