internal override GatewayResult Fetch(IRecord record) { GatewayResult result = base.Fetch(record); if (result.Success && !IgnorePositionCache) { PositionCache.Set(GetPositionId(record), CurrentPosition); } return(result); }
/// <summary> /// fetch link into record /// </summary> /// <param name="record"></param> /// <returns></returns> internal override GatewayResult Fetch(IRecord record) { GatewayResult result = CursorFetch(); if (result.Success) { PositionCache.Set(GetPositionId(record), CurrentPosition); CopyValues(record); } if (!result.Success) { PositionCache.Remove(GetPositionId(record)); } return(result); }
/// <summary> /// insert cursor /// </summary> /// <param name="pos"></param> /// <returns></returns> internal GatewayResult InsertRecord(IRecord record) { GatewayResult result = CheckTransactionValidation(); if (result.Success) { UpdateRuntimeCursor(record, true); GatewayCommandCursorInsertRecord cursorCommand = GatewayCommandsFactory.CreateCursorInsertCommand(CurrentCursor, LocalDataviewManager.LocalManager); result = cursorCommand.Execute(); if (result.Success && !IgnorePositionCache) { PositionCache.Set(GetPositionId(record), CurrentPosition); } } return(result); }