示例#1
0
        public async Task <CDdlReturnValue> ExecuteAsync()
        {
            CDdlReturnValue cDdlReturnValue = new CDdlReturnValue();

            cDdlReturnValue.ValidationErrorMsg = Validate();

            if (cDdlReturnValue.ValidationErrorMsg == null)
            {
                CMySqlDdl cMySqlDdl = new CMySqlDdl(connectionString, sql, _params, null);

                cDdlReturnValue = cMySqlDdl.Execute();
            }

            return(cDdlReturnValue);
        }
示例#2
0
        public async Task <CDdlReturnValue> ExecuteAsync()
        {
            CDdlReturnValue cDdlReturnValue = new CDdlReturnValue();

            CMySqlBuilderInsertBulk cMySqlBuilderInsert = new CMySqlBuilderInsertBulk(tableName, keyValues);

            parsedSql = cMySqlBuilderInsert.Build();

            cDdlReturnValue.ValidationErrorMsg = Validate();

            if (cDdlReturnValue.ValidationErrorMsg == null)
            {
                List <MySqlParameter> _params   = CGetQueryParams.Get(keyValues);
                CMySqlDdl             cMySqlDdl = new CMySqlDdl(connectionString, parsedSql, _params, onError, false);

                cDdlReturnValue = await cMySqlDdl.ExecuteAsync();
            }

            return(cDdlReturnValue);
        }
示例#3
0
        public CDdlReturnValue Execute()
        {
            CDdlReturnValue cDdlReturnValue = new CDdlReturnValue();

            CMySqlBuilderInsert cMySqlBuilderInsert = new CMySqlBuilderInsert(tableName, keyValue);

            parsedSql = cMySqlBuilderInsert.Build();

            cDdlReturnValue.ValidationErrorMsg = Validate();

            if (cDdlReturnValue.ValidationErrorMsg == null)
            {
                List <MySqlParameter> _params   = CGetQueryParams.Get(keyValue);
                CMySqlDdl             cMySqlDdl = new CMySqlDdl(connectionString, parsedSql, _params, onError, getNewInsertId);

                cDdlReturnValue = cMySqlDdl.Execute();
            }

            return(cDdlReturnValue);
        }
示例#4
0
        public async Task <CDdlReturnValue> ExecuteAsync()
        {
            CDdlReturnValue cDdlReturnValue = new CDdlReturnValue();

            CMySqlBuilderInsertOrUpdateOnDuplicateKey cMySqlBuilderInsert = new CMySqlBuilderInsertOrUpdateOnDuplicateKey(tableName, keyValue, onDuplicateUpdateStatement);

            parsedSql = cMySqlBuilderInsert.Build();

            cDdlReturnValue.ValidationErrorMsg = Validate();

            if (cDdlReturnValue.ValidationErrorMsg == null)
            {
                List <MySqlParameter> _params   = CGetQueryParams.Get(keyValue);
                CMySqlDdl             cMySqlDdl = new CMySqlDdl(connectionString, parsedSql, _params, onError, getNewInsertId);

                cDdlReturnValue = await cMySqlDdl.ExecuteAsync();
            }

            return(cDdlReturnValue);
        }
        public async Task <CDdlReturnValue> ExecuteAsync()
        {
            CDdlReturnValue cDdlReturnValue = new CDdlReturnValue();

            CMySqlBuilderUpdate cMySqlBuilderUpdate = new CMySqlBuilderUpdate(tableName, keyValue, whereConditions);

            parsedSql = cMySqlBuilderUpdate.Build();

            cDdlReturnValue.ValidationErrorMsg = Validate();

            if (cDdlReturnValue.ValidationErrorMsg == null)
            {
                List <MySqlParameter> _params = CGetQueryParams.Get(keyValue);
                _params.AddRange(CGetQueryParams.Get(whereConditions));

                CMySqlDdl cMySqlDdl = new CMySqlDdl(connectionString, parsedSql, _params, onError);

                cDdlReturnValue = await cMySqlDdl.ExecuteAsync();
            }

            return(cDdlReturnValue);
        }
        public CDdlReturnValue Execute()
        {
            CDdlReturnValue cDdlReturnValue = new CDdlReturnValue();

            CMySqlBuilderDeleteRange CMySqlBuilderDeleteRange = new CMySqlBuilderDeleteRange(tableName, rangeColumn, rangeInt);

            parsedSql = CMySqlBuilderDeleteRange.Build();

            cDdlReturnValue.ValidationErrorMsg = Validate();

            if (cDdlReturnValue.ValidationErrorMsg == null)
            {
                List <MySqlParameter> _params = CGetQueryParams.Get(keyValue);
                //  _params.AddRange(CGetQueryParams.Get(whereConditions));

                CMySqlDdl cMySqlDdl = new CMySqlDdl(connectionString, parsedSql, _params, onError);

                cDdlReturnValue = cMySqlDdl.Execute();
            }

            return(cDdlReturnValue);
        }