Пример #1
0
 /// <summary>
 /// 查询对象集合
 /// </summary>
 /// <typeparam name="valueType">对象类型</typeparam>
 /// <typeparam name="modelType">模型类型</typeparam>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="query">查询信息</param>
 /// <param name="memberMap">成员位图</param>
 /// <returns>对象集合</returns>
 protected override IEnumerable <valueType> selectPushMemberMap <valueType, modelType>
     (fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, selectQuery <modelType> query, fastCSharp.code.memberMap <modelType> memberMap)
 {
     memberMap.Dispose();
     log.Error.Throw(log.exceptionType.ErrorOperation);
     return(null);
 }
Пример #2
0
        /// <summary>
        /// 插入数据
        /// </summary>
        /// <typeparam name="valueType">数据类型</typeparam>
        /// <typeparam name="modelType">模型类型</typeparam>
        /// <param name="sqlTool">SQL操作工具</param>
        /// <param name="value">待插入数据</param>
        /// <param name="memberMap">目标成员位图</param>
        /// <returns>是否成功</returns>
        protected override bool insert <valueType, modelType>
            (fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, valueType value, fastCSharp.code.memberMap <modelType> memberMap)
        {
            DbConnection connection = GetConnection(false);

            if (connection != null)
            {
                byte isExecute = 0;
                try
                {
                    subArray <valueType> values = subArray <valueType> .Unsafe(new valueType[] { value }, 0, 1);

                    import(connection, sqlTool.GetDataTable(ref values));
                    return(true);
                }
                catch (Exception error)
                {
                    fastCSharp.log.Error.Add(error, null, false);
                }
                finally
                {
                    if (isExecute == 0)
                    {
                        connection.Dispose();
                    }
                    else
                    {
                        pushConnection(ref connection, false);
                    }
                }
            }
            return(false);
        }
Пример #3
0
        /// <summary>
        /// 插入数据
        /// </summary>
        /// <typeparam name="valueType">数据类型</typeparam>
        /// <typeparam name="modelType">模型类型</typeparam>
        /// <param name="sqlTool">SQL操作工具</param>
        /// <param name="value">待插入数据</param>
        /// <param name="memberMap">目标成员位图</param>
        /// <param name="isIgnoreTransaction">是否忽略应用程序事务</param>
        /// <param name="onInserted"></param>
        protected override void insert <valueType, modelType>
            (fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, valueType value, fastCSharp.code.memberMap <modelType> memberMap, bool isIgnoreTransaction, ref Action <valueType> onInserted)
        {
            inserter <valueType, modelType> inserter;
            bool isTransaction = false;

            if (!isIgnoreTransaction && sqlTool.IsDeleteTransaction)
            {
                if (fastCSharp.domainUnload.TransactionStart(false))
                {
                    isTransaction = true;
                    inserter      = inserter <valueType, modelType> .Get();
                }
                else
                {
                    inserter = null;
                }
            }
            else
            {
                inserter = inserter <valueType, modelType> .Get();
            }
            if (inserter != null)
            {
                inserter.Insert(this, sqlTool, value, ref onInserted, isTransaction);
            }
            else if (isTransaction)
            {
                fastCSharp.domainUnload.TransactionEnd();
            }
        }
Пример #4
0
        /// <summary>
        /// 自增ID整表数组缓存
        /// </summary>
        /// <param name="sqlTool">SQL操作工具</param>
        /// <param name="memberCache">成员缓存</param>
        /// <param name="group">数据分组</param>
        /// <param name="baseIdentity">基础ID</param>
        public identityTree(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, Expression <Func <valueType, memberCacheType> > memberCache, int group = 0, int baseIdentity = 0)
            : base(sqlTool, memberCache, group, baseIdentity, true)
        {
            sqlTool.OnInsertedLock += onInserted;
            sqlTool.OnDeletedLock  += onDelete;

            resetLock();
        }
Пример #5
0
 /// <summary>
 /// SQL操作缓存
 /// </summary>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="baseIdentity">基础ID</param>
 /// <param name="group">数据分组</param>
 /// <param name="isEvent">是否绑定更新事件</param>
 protected identityCache(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, Expression <Func <valueType, memberCacheType> > memberCache, int group, int baseIdentity, bool isEvent)
     : base(sqlTool, memberCache, group, baseIdentity)
 {
     if (isEvent)
     {
         sqlTool.OnUpdatedLock += onUpdated;
     }
 }
Пример #6
0
        /// <summary>
        /// 查询对象集合
        /// </summary>
        /// <typeparam name="valueType">对象类型</typeparam>
        /// <typeparam name="modelType">模型类型</typeparam>
        /// <param name="sqlTool">SQL操作工具</param>
        /// <param name="query">查询信息</param>
        /// <param name="memberMap">成员位图</param>
        /// <returns>对象集合</returns>
        private unsafe IEnumerable <valueType> selectRowsPushMemberMap <valueType, modelType>
            (fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, selectQuery <modelType> query, fastCSharp.code.memberMap <modelType> memberMap)
            where valueType : class, modelType
            where modelType : class
        {
            string sql = selectRows(sqlTool, query, memberMap, new charStream((char *)fastCSharp.emit.pub.PuzzleValue, 1));

            return(sql != null?selectPushMemberMap <valueType, modelType>(sql, 0, memberMap) : nullValue <valueType> .Array);
        }
Пример #7
0
 /// <summary>
 /// 添加数据
 /// </summary>
 /// <param name="client">SQL客户端操作</param>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="value">目标对象</param>
 /// <param name="onInserted">删除数据回调</param>
 /// <param name="isTransaction"></param>
 public void Insert(client client, fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, valueType value, ref Action <valueType> onInserted, bool isTransaction)
 {
     this.onInserted    = onInserted;
     this.client        = client;
     this.sqlTool       = sqlTool;
     this.value         = value;
     this.isTransaction = isTransaction;
     onInserted         = null;
     fastCSharp.threading.task.Tiny.Add(this, threading.thread.callType.SqlClientInserter);
 }
Пример #8
0
 /// <summary>
 /// SQL操作缓存
 /// </summary>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="group">数据分组</param>
 protected sqlTool(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, int group)
 {
     if (sqlTool == null)
     {
         log.Error.Throw(log.exceptionType.Null);
     }
     memberGroup = group;
     SqlTool     = sqlTool;
     memberMap   = fastCSharp.emit.sqlModel <modelType> .GetCacheMemberMap(group);
 }
Пример #9
0
 /// <summary>
 /// 关键字整表缓存
 /// </summary>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="getKey">键值获取器</param>
 /// <param name="group">数据分组</param>
 public key(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, Expression <Func <valueType, memberCacheType> > memberCache, Func <modelType, keyType> getKey, int group = 0)
     : base(sqlTool, memberCache, group)
 {
     if (getKey == null)
     {
         log.Error.Throw(log.exceptionType.Null);
     }
     GetKey = getKey;
     GetMemberCacheByKey = getMemberCacheByKey;
 }
Пример #10
0
 /// <summary>
 /// 批量导入数据
 /// </summary>
 /// <param name="sqlTool">数据库表格操作工具</param>
 /// <param name="maxSize">最大单次导入数量</param>
 public batchImport(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, int maxSize)
 {
     if (sqlTool == null)
     {
         log.Error.Throw(log.exceptionType.Null);
     }
     importHandle = import;
     this.maxSize = Math.Max(maxSize, 1);
     this.sqlTool = sqlTool;
     queues       = new collection <valueType[]>(4);
 }
Пример #11
0
 /// <summary>
 /// 插入数据
 /// </summary>
 /// <typeparam name="valueType">数据类型</typeparam>
 /// <typeparam name="modelType">模型类型</typeparam>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="values">待插入数据</param>
 /// <param name="isIgnoreTransaction">是否忽略应用程序事务</param>
 /// <param name="onInserted"></param>
 public override void Insert <valueType, modelType>
     (fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, subArray <valueType> values, bool isIgnoreTransaction, Action <subArray <valueType> > onInserted)
 {
     if (onInserted == null)
     {
         log.Error.Throw(log.exceptionType.Null);
     }
     if (values.length == 0)
     {
         onInserted(values);
     }
     else
     {
         try
         {
             if (values.GetCount(value => sqlModel <modelType> .verify.Verify(value, fastCSharp.code.memberMap <modelType> .Default, sqlTool)) == values.length && sqlTool.CallOnInsert(ref values))
             {
                 importer <valueType, modelType> inserter;
                 bool isTransaction = false;
                 if (!isIgnoreTransaction && sqlTool.IsDeleteTransaction)
                 {
                     if (fastCSharp.domainUnload.TransactionStart(false))
                     {
                         isTransaction = true;
                         inserter      = importer <valueType, modelType> .Get();
                     }
                     else
                     {
                         inserter = null;
                     }
                 }
                 else
                 {
                     inserter = importer <valueType, modelType> .Get();
                 }
                 if (inserter != null)
                 {
                     inserter.Insert(this, sqlTool, ref values, ref onInserted, isTransaction);
                 }
                 else if (isTransaction)
                 {
                     fastCSharp.domainUnload.TransactionEnd();
                 }
             }
         }
         finally
         {
             if (onInserted != null)
             {
                 onInserted(default(subArray <valueType>));
             }
         }
     }
 }
Пример #12
0
        /// <summary>
        /// SQL操作缓存
        /// </summary>
        /// <param name="sqlTool">SQL操作工具</param
        /// <param name="memberCache">成员缓存</param>
        /// <param name="group">数据分组</param>
        /// <param name="baseIdentity">基础ID</param>
        /// <param name="isReset">是否初始化事件与数据</param>
        public identityArray(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, Expression <Func <valueType, memberCacheType> > memberCache, int group = 0, int baseIdentity = 0, bool isReset = true)
            : base(sqlTool, memberCache, group, baseIdentity, isReset)
        {
            if (isReset)
            {
                sqlTool.OnInsertedLock += onInserted;
                sqlTool.OnDeletedLock  += onDeleted;

                resetLock();
            }
        }
Пример #13
0
        /// <summary>
        /// 查询对象集合
        /// </summary>
        /// <typeparam name="valueType">对象类型</typeparam>
        /// <typeparam name="modelType">成员位图类型</typeparam>
        /// <param name="sqlTool">SQL操作工具</param>
        /// <param name="query">查询信息</param>
        /// <param name="keyName">关键之名称</param>
        /// <param name="memberMap">成员位图</param>
        /// <param name="sqlStream"></param>
        /// <returns></returns>
        private unsafe string selectKeys <valueType, modelType>
            (fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, selectQuery <modelType> query, string keyName, fastCSharp.code.memberMap <modelType> memberMap, charStream sqlStream)
            where valueType : class, modelType
            where modelType : class
        {
            pointer buffer = fastCSharp.sql.client.SqlBuffers.Get();

            try
            {
                using (sqlStream)
                {
                    sqlStream.UnsafeReset(buffer.Byte, SqlBufferSize << 1);
                    sqlStream.SimpleWriteNotNull("select ");
                    sqlModel <modelType> .GetNames(sqlStream, memberMap);

                    sqlStream.SimpleWriteNotNull(" from[");
                    sqlStream.SimpleWriteNotNull(sqlTool.TableName);
                    sqlStream.WriteNotNull("]with(nolock)where ");
                    sqlStream.SimpleWriteNotNull(keyName);
                    sqlStream.SimpleWriteNotNull(" in(select ");
                    sqlStream.SimpleWriteNotNull(keyName);
                    sqlStream.SimpleWriteNotNull(" from(select ");
                    sqlStream.SimpleWriteNotNull(keyName);
                    sqlStream.WriteNotNull(",row_number()over(");
                    int startIndex = sqlStream.Length;
                    query.WriteOrder(sqlTool, sqlStream);
                    int count = sqlStream.Length - startIndex;
                    sqlStream.SimpleWriteNotNull(")as ");
                    sqlStream.SimpleWriteNotNull(orderOverName);
                    sqlStream.SimpleWriteNotNull(" from[");
                    sqlStream.SimpleWriteNotNull(sqlTool.TableName);
                    sqlStream.SimpleWriteNotNull("]with(nolock)");
                    if (query.WriteWhereOnly(sqlTool, sqlStream))
                    {
                        sqlStream.SimpleWriteNotNull(")as T where ");
                        sqlStream.SimpleWriteNotNull(orderOverName);
                        sqlStream.SimpleWriteNotNull(" between ");
                        number.ToString(query.SkipCount, sqlStream);
                        sqlStream.SimpleWriteNotNull(" and ");
                        number.ToString(query.SkipCount + query.GetCount - 1, sqlStream);
                        sqlStream.Write(')');
                        if (count != 0)
                        {
                            sqlStream.Write(sqlStream.Char + startIndex, count);
                        }
                        return(sqlStream.ToString());
                    }
                }
            }
            finally { fastCSharp.sql.client.SqlBuffers.Push(ref buffer); }
            return(null);
        }
Пример #14
0
        /// <summary>
        /// 缓存计数
        /// </summary>
        /// <param name="sqlTool">SQL操作工具</param>
        /// <param name="getKey">缓存关键字获取器</param>
        /// <param name="group">数据分组</param>
        protected counter(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, int group, Func <modelType, keyType> getKey)
            : base(sqlTool, group)
        {
            if (getKey == null)
            {
                log.Error.Throw(log.exceptionType.Null);
            }
            GetKey = getKey;
            values = dictionary <randomKey <keyType> > .Create <keyValue <valueType, int> >();

            sqlTool.OnUpdatedLock += onUpdated;
            sqlTool.OnDeletedLock += onDeleted;
        }
Пример #15
0
        /// <summary>
        /// 自增ID整表数组缓存
        /// </summary>
        /// <param name="sqlTool">SQL操作工具</param>
        /// <param name="isValue">数据匹配器,必须保证更新数据的匹配一致性</param>
        /// <param name="baseIdentity">基础ID</param>
        /// <param name="group">数据分组</param>
        public identityArrayWhere(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, Expression <Func <valueType, memberCacheType> > memberCache
                                  , Func <valueType, bool> isValue, int group = 0, int baseIdentity = 0)
            : base(sqlTool, memberCache, group, baseIdentity, false)
        {
            if (isValue == null)
            {
                log.Error.Throw(log.exceptionType.Null);
            }
            this.isValue = isValue;

            sqlTool.OnInsertedLock += onInserted;
            sqlTool.OnUpdatedLock  += onUpdated;
            sqlTool.OnDeletedLock  += onDeleted;

            resetLock();
        }
Пример #16
0
 /// <summary>
 /// 查询对象集合
 /// </summary>
 /// <typeparam name="valueType">对象类型</typeparam>
 /// <typeparam name="modelType">模型类型</typeparam>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="query">查询信息</param>
 /// <param name="memberMap">成员位图</param>
 /// <returns>对象集合</returns>
 protected override IEnumerable <valueType> selectPushMemberMap <valueType, modelType>
     (fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, selectQuery <modelType> query, fastCSharp.code.memberMap <modelType> memberMap)
 {
     if (query != null && query.SkipCount != 0 && query.Orders.length() != 0)
     {
         if (sqlModel <modelType> .PrimaryKeys.Length == 1)
         {
             return(selectKeysPushMemberMap(sqlTool, query, sqlModel <modelType> .PrimaryKeys[0].SqlFieldName, memberMap));
         }
         if (sqlModel <modelType> .Identity != null)
         {
             return(selectKeysPushMemberMap(sqlTool, query, sqlModel <modelType> .Identity.SqlFieldName, memberMap));
         }
         return(selectRowsPushMemberMap(sqlTool, query, memberMap));
     }
     return(selectNoOrderPushMemberMap(sqlTool, query, memberMap));
 }
Пример #17
0
        /// <summary>
        /// 先进先出优先队列缓存
        /// </summary>
        /// <param name="counter">缓存计数器</param>
        /// <param name="getCache"></param>
        /// <param name="maxCount">缓存默认最大容器大小</param>
        public memberQueueCustom(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, Func <modelType, keyType> getKey, Func <keyType, memberCacheType> getTarget
                                 , Func <keyType, cacheValueType> getCache, Expression <Func <memberCacheType, cacheValueType> > valueMember
                                 , Expression <Func <memberCacheType, memberCacheType> > previousMember, Expression <Func <memberCacheType, memberCacheType> > nextMember
                                 , bool isRemoveEnd = false, int maxCount = 0)
            : base(valueMember, previousMember, nextMember, maxCount)
        {
            if (sqlTool == null || getKey == null || getTarget == null)
            {
                log.Error.Throw(log.exceptionType.Null);
            }
            this.sqlTool   = sqlTool;
            this.getKey    = getKey;
            this.getTarget = getTarget;
            this.getCache  = getCache;

            sqlTool.OnInsertedLock += onInserted;
            sqlTool.OnUpdatedLock  += onUpdated;
            sqlTool.OnDeletedLock  += onDeleted;
        }
Пример #18
0
            /// <summary>
            /// 连接池处理
            /// </summary>
            private void push()
            {
                Action <valueType> onInserted = this.onInserted;
                valueType          value      = this.value;
                bool isTransaction            = this.isTransaction;

                try
                {
                    client          = null;
                    this.sqlTool    = null;
                    this.onInserted = null;
                    this.value      = null;
                    typePool <inserter <valueType, modelType> > .PushNotNull(this);
                }
                finally
                {
                    if (isTransaction)
                    {
                        fastCSharp.domainUnload.TransactionEnd();
                    }
                    onInserted(value);
                }
            }
Пример #19
0
            /// <summary>
            /// 连接池处理
            /// </summary>
            private void push()
            {
                Action <subArray <valueType> > onInserted = this.onInserted;
                subArray <valueType>           values     = this.values;
                //fastCSharp.emit.sqlTable.sqlTool<valueType, modelType> sqlTool = this.sqlTool;
                bool isTransaction = this.isTransaction;

                try
                {
                    client          = null;
                    this.sqlTool    = null;
                    this.onInserted = null;
                    this.values.Null();
                    typePool <importer <valueType, modelType> > .PushNotNull(this);
                }
                finally
                {
                    if (isTransaction)
                    {
                        fastCSharp.domainUnload.TransactionEnd();
                    }
                    onInserted(values);
                }
            }
Пример #20
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <typeparam name="valueType">数据类型</typeparam>
 /// <typeparam name="modelType">模型类型</typeparam>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="value">待更新数据自增id标识</param>
 /// <param name="sqlExpression">待更新数据</param>
 /// <param name="memberMap">目标成员位图</param>
 /// <returns>更新前的数据对象,null表示失败</returns>
 protected override valueType updateByIdentity <valueType, modelType>(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool
                                                                      , valueType value, ref fastCSharp.emit.sqlTable.updateExpression sqlExpression, fastCSharp.code.memberMap <modelType> memberMap)
 {
     log.Error.Throw(log.exceptionType.ErrorOperation);
     return(null);
 }
Пример #21
0
 /// <summary>
 /// SQL操作缓存
 /// </summary>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="group">数据分组</param>
 protected copy(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, int group)
     : base(sqlTool, group)
 {
 }
Пример #22
0
 public static fastCSharp.code.memberMap <valueType> .builder CreateMemberMap <valueType>(this fastCSharp.emit.sqlTable.sqlTool <valueType> sqlTable)
     where valueType : class
 {
     return(new fastCSharp.code.memberMap <valueType> .builder(sqlTable != null));
 }
Пример #23
0
 public static fastCSharp.code.memberMap.memberIndex CreateMemberIndex <valueType, returnType>(this fastCSharp.emit.sqlTable.sqlTool <valueType> sqlTable, Expression <Func <valueType, returnType> > member)
     where valueType : class
 {
     return(fastCSharp.code.memberMap <valueType> .CreateMemberIndex(member));
 }
Пример #24
0
 /// <summary>
 /// 查询对象
 /// </summary>
 /// <typeparam name="valueType">对象类型</typeparam>
 /// <typeparam name="modelType">模型类型</typeparam>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="value">匹配成员值</param>
 /// <param name="memberMap">成员位图</param>
 /// <param name="onGet"></param>
 public override void GetByPrimaryKey <valueType, modelType>
     (fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, valueType value, fastCSharp.code.memberMap <modelType> memberMap, Action <valueType> onGet)
 {
     onGet(null);
     log.Error.Throw(log.exceptionType.ErrorOperation);
 }
Пример #25
0
 /// <summary>
 /// 自增id标识缓存计数器
 /// </summary>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="group">数据分组</param>
 public identityCounter32
     (fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, int group = 0)
     : base(sqlTool, group, fastCSharp.emit.sqlModel <modelType> .GetIdentity32)
 {
 }
Пример #26
0
 /// <summary>
 /// SQL操作缓存
 /// </summary>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="baseIdentity">基础ID</param>
 /// <param name="group">数据分组</param>
 protected identityMemberMap(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, Expression <Func <valueType, memberCacheType> > memberCache, int group, int baseIdentity)
     : base(sqlTool, memberCache, fastCSharp.emit.sqlModel <modelType> .IdentityGetter(baseIdentity), group)
 {
     this.baseIdentity = baseIdentity;
 }
Пример #27
0
 /// <summary>
 /// 删除数据
 /// </summary>
 /// <typeparam name="valueType">数据类型</typeparam>
 /// <typeparam name="modelType">模型类型</typeparam>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="value">待删除数据</param>
 /// <returns>是否成功</returns>
 protected override bool deleteByIdentity <valueType, modelType>(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, valueType value)
 {
     log.Error.Throw(log.exceptionType.ErrorOperation);
     return(false);
 }
Пример #28
0
 /// <summary>
 /// 删除数据
 /// </summary>
 /// <typeparam name="valueType">数据类型</typeparam>
 /// <typeparam name="modelType">模型类型</typeparam>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="value">待删除数据</param>
 /// <param name="isIgnoreTransaction">是否忽略应用程序事务</param>
 /// <param name="onDeleted">是否成功</param>
 protected override void delete <valueType, modelType>(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, valueType value, bool isIgnoreTransaction, ref Action <valueType> onDeleted)
 {
     log.Error.Throw(log.exceptionType.ErrorOperation);
 }
Пример #29
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <typeparam name="valueType">数据类型</typeparam>
 /// <typeparam name="modelType">模型类型</typeparam>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="value">待更新数据自增id标识</param>
 /// <param name="updateExpression">待更新数据</param>
 /// <param name="isIgnoreTransaction">是否忽略应用程序事务</param>
 /// <param name="onUpdated"></param>
 public override void UpdateByIdentity <valueType, modelType>(fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, valueType value
                                                              , ref fastCSharp.emit.sqlTable.updateExpression updateExpression, bool isIgnoreTransaction, Action <valueType, valueType, fastCSharp.code.memberMap> onUpdated)
 {
     onUpdated(null, null, null);
     log.Error.Throw(log.exceptionType.ErrorOperation);
 }
Пример #30
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <typeparam name="valueType">数据类型</typeparam>
 /// <typeparam name="modelType">模型类型</typeparam>
 /// <param name="sqlTool">SQL操作工具</param>
 /// <param name="value">待更新数据</param>
 /// <param name="memberMap">目标成员位图</param>
 /// <param name="isIgnoreTransaction">是否忽略应用程序事务</param>
 /// <param name="onUpdated">是否成功</param>
 public override void Update <valueType, modelType>
     (fastCSharp.emit.sqlTable.sqlTool <valueType, modelType> sqlTool, valueType value, fastCSharp.code.memberMap <modelType> memberMap, bool isIgnoreTransaction, Action <valueType, valueType, fastCSharp.code.memberMap> onUpdated)
 {
     using (memberMap) onUpdated(null, null, null);
     log.Error.Throw(log.exceptionType.ErrorOperation);
 }