70 lines
2.4 KiB
C#
70 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
using Amazon.DynamoDBv2.DocumentModel;
|
|
using Amazon.DynamoDBv2.Model;
|
|
|
|
|
|
namespace ServerBase;
|
|
|
|
//=============================================================================================
|
|
// DB 쿼리를 실행해 주는 인터페이스 이다.
|
|
//=============================================================================================
|
|
public interface IQueryRunner
|
|
{
|
|
void setQueryBatch(QueryBatchBase queryBatch);
|
|
|
|
Task<Result> onTryCommitQueryRunner();
|
|
Task<Result> onCommitQueryRunner();
|
|
Task onRollbackQueryRunner();
|
|
Task<(Result, Result)> onHandleTransactionCancelException(TransactionCanceledException exception);
|
|
|
|
Task<(Result, IQueryContext?)> tryCreateQueryContext(IRowData rowData, QueryType toApplyQueryType = QueryType.None);
|
|
|
|
Task<Result> tryRegisterQueryContext(IQueryContext queryContext);
|
|
}
|
|
|
|
//=============================================================================================
|
|
// DB Row 형태의 정보를 관리하는 인터페이스 이다.
|
|
//=============================================================================================
|
|
public interface IRowData
|
|
{
|
|
string toBasicString();
|
|
}
|
|
|
|
//=============================================================================================
|
|
// DB 쿼리를 요청하는 인터페이스 이다.
|
|
//=============================================================================================
|
|
public interface IQueryDbRequester
|
|
{
|
|
Task<Result> doDbRequestAsync();
|
|
|
|
void setQueryBatch(QueryBatchBase queryBatch);
|
|
|
|
Int32 getQueryCount();
|
|
|
|
DynamoDbQueryExceptionNotifier getDynamoDbQueryExceptionNotifier();
|
|
}
|
|
|
|
//=============================================================================================
|
|
// Document 기반으로 생성해 주는 인터페이스 이다.
|
|
//=============================================================================================
|
|
public interface IWithDocumentModel
|
|
{
|
|
void onCreateDocumentModel(Table table);
|
|
}
|
|
|
|
//=============================================================================================
|
|
// DB 쿼리 정보를 담는 인터페이스 이다.
|
|
//=============================================================================================
|
|
public interface IQueryContext
|
|
{
|
|
QueryType getQueryType();
|
|
string toBasicString();
|
|
}
|