초기커밋
This commit is contained in:
69
ServerBase/DB/QueryInterface.cs
Normal file
69
ServerBase/DB/QueryInterface.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user