private QueryCommand CreateCommand()
 {
   var insert = SqlDml.Insert(SqlDml.TableRef(PrimaryIndexes[0].Table));
   setOperation.Statement = SetStatement.Create(insert);
   setOperation.AddValues();
   return ToCommand(insert);
 }
예제 #2
0
        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));
        }
예제 #3
0
        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());
        }
예제 #4
0
        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());
        }