This commit is contained in:
2026-05-28 02:30:32 +03:30
parent f179e315c5
commit 7aa60b5e6e
2 changed files with 39 additions and 14 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ namespace xDataService.GraphQL
private readonly XDataServiceConfiguration configuration; private readonly XDataServiceConfiguration configuration;
// //
public XBaseGraphQLTypeHelper( protected XBaseGraphQLTypeHelper(
XDataServiceConfiguration configuration = null XDataServiceConfiguration configuration = null
) )
{ {
+38 -13
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using xDataService.Models; using xDataService.Models;
using xModels.Dtos; using xModels.Dtos;
@@ -30,41 +31,57 @@ namespace xDataService.Interfaces
/// </summary> /// </summary>
/// <param name="providedForId"></param> /// <param name="providedForId"></param>
/// <param name="forIndex"></param> /// <param name="forIndex"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns> /// <returns></returns>
Task<TModel> GetReference( Task<TModel> GetReference(
TKey providedForId, TKey providedForId,
int forIndex = 0 int forIndex = 0,
CancellationToken cancellationToken = default
); );
/// <summary> /// <summary>
/// Retrieve all Exists References of Specific Provided ID ... /// Retrieve all Exists References of Specific Provided ID ...
/// </summary> /// </summary>
/// <param name="providedForId"></param> /// <param name="providedForId"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns> /// <returns></returns>
Task<IEnumerable<TModel>> GetAllReferences(TKey providedForId); Task<IEnumerable<TModel>> GetAllReferences(
TKey providedForId,
CancellationToken cancellationToken = default
);
/// <summary> /// <summary>
/// Extract all Referencing Models for Specified Key ... /// Extract all Referencing Models for Specified Key ...
/// </summary> /// </summary>
/// <param name="providedForId"></param> /// <param name="providedForId"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns> /// <returns></returns>
Task<IEnumerable<XReference<TKey>>> GetAllReferencings(TKey providedForId); Task<IEnumerable<XReference<TKey>>> GetAllReferencings(
TKey providedForId,
CancellationToken cancellationToken = default
);
/// <summary> /// <summary>
/// Count References ... /// Count References ...
/// </summary> /// </summary>
/// <param name="providedForId"></param> /// <param name="providedForId"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns> /// <returns></returns>
Task<int> CountReferences(TKey providedForId); Task<int> CountReferences(
TKey providedForId,
CancellationToken cancellationToken = default
);
/// <summary> /// <summary>
/// Retrieve References of Specific Provided ID as Query ... /// Retrieve References of Specific Provided ID as Query ...
/// </summary> /// </summary>
/// <param name="providedForId"></param> /// <param name="providedForId"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns> /// <returns></returns>
Task<XQueryResult<TModel>> QueryReferences( Task<XQueryResult<TModel>> QueryReferences(
XQuery query, XQuery query,
TKey providedForId TKey providedForId,
CancellationToken cancellationToken = default
); );
/// <summary> /// <summary>
@@ -72,13 +89,14 @@ namespace xDataService.Interfaces
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="providedForId"></param> /// <param name="providedForId"></param>
/// <param name="forIndex"></param>
/// <param name="connectionId"></param> /// <param name="connectionId"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns> /// <returns></returns>
Task<bool> AddReference( Task<bool> AddReference(
TModel model, TModel model,
TKey providedForId, TKey providedForId,
string connectionId = null string connectionId = null,
CancellationToken cancellationToken = default
); );
/// <summary> /// <summary>
@@ -87,11 +105,13 @@ namespace xDataService.Interfaces
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="reference"></param> /// <param name="reference"></param>
/// <param name="connectionId"></param> /// <param name="connectionId"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns> /// <returns></returns>
Task<bool> AddReference( Task<bool> AddReference(
TModel model, TModel model,
XReference<TKey> reference, XReference<TKey> reference,
string connectionId = null string connectionId = null,
CancellationToken cancellationToken = default
); );
/// <summary> /// <summary>
@@ -99,26 +119,29 @@ namespace xDataService.Interfaces
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="providedForId"></param> /// <param name="providedForId"></param>
/// <param name="forIndex">if null, removes all</param>
/// <param name="connectionId"></param> /// <param name="connectionId"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns> /// <returns></returns>
Task<bool> RemoveReference( Task<bool> RemoveReference(
TModel model, TModel model,
TKey providedForId, TKey providedForId,
string connectionId = null string connectionId = null,
CancellationToken cancellationToken = default
); );
/// <summary> /// <summary>
/// Remove Reference a Model for Specific XRefence<TKey> ... /// Remove Reference a Model for Specific XRefence<TKey> ...
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="providedForId"></param> /// <param name="reference"></param>
/// <param name="connectionId"></param> /// <param name="connectionId"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns> /// <returns></returns>
Task<bool> RemoveReference( Task<bool> RemoveReference(
TModel model, TModel model,
XReference<TKey> reference, XReference<TKey> reference,
string connectionId = null string connectionId = null,
CancellationToken cancellationToken = default
); );
/// <summary> /// <summary>
@@ -126,10 +149,12 @@ namespace xDataService.Interfaces
/// </summary> /// </summary>
/// <param name="providedForId"></param> /// <param name="providedForId"></param>
/// <param name="connectionId"></param> /// <param name="connectionId"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns> /// <returns></returns>
Task<bool> RemoveReferences( Task<bool> RemoveReferences(
TKey providedForId, TKey providedForId,
string connectionId = null string connectionId = null,
CancellationToken cancellationToken = default
); );
#endregion #endregion
} }