빌드 경고 해결 및 데이터 검증 진행중.
This commit is contained in:
@@ -1,21 +1,12 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Garnet;
|
||||
using MiniExcelLibs;
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Garnet;
|
||||
using MiniExcelLibs;
|
||||
using ExcelKv.Core; // Use Shared Library
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Garnet;
|
||||
using MiniExcelLibs;
|
||||
using ExcelKv.Core; // Use Shared Library
|
||||
|
||||
namespace ExcelKvPoC;
|
||||
|
||||
@@ -29,17 +20,24 @@ public class GarnetClientAdapter : IStorageWrapper, IDisposable
|
||||
private readonly List<Task> _tasks = new();
|
||||
|
||||
public GarnetClientAdapter(string connectionString = "localhost:3278")
|
||||
{
|
||||
_redis = StackExchange.Redis.ConnectionMultiplexer.Connect(connectionString);
|
||||
_db = _redis.GetDatabase();
|
||||
_batch = _db.CreateBatch();
|
||||
}
|
||||
|
||||
public async Task SetAsync(string key, string value)
|
||||
{
|
||||
_tasks.Add(_batch.StringSetAsync(key, value));
|
||||
await Task.CompletedTask; // Fire and forget in batch context mainly
|
||||
}
|
||||
{
|
||||
_redis = StackExchange.Redis.ConnectionMultiplexer.Connect(connectionString);
|
||||
_db = _redis.GetDatabase();
|
||||
_batch = _db.CreateBatch();
|
||||
}
|
||||
|
||||
public async Task SetAsync(string key, string value)
|
||||
{
|
||||
_tasks.Add(_batch.StringSetAsync(key, value));
|
||||
await Task.CompletedTask; // Fire and forget in batch context mainly
|
||||
}
|
||||
|
||||
public async Task SetAsync(string key, string value, int row, int col)
|
||||
{
|
||||
// For this adapter we store only key/value; row/col metadata can be added later if needed.
|
||||
_tasks.Add(_batch.StringSetAsync(key, value));
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
|
||||
public async Task IncrementAsync(string key, double value)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user