-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: move filter interfaces to abstractions * refactor: do not expose inner repositories on entity repository instead, add a method to get the most recent snapshot, distinguish from method that returns current state * refactor: require a snapshotting strategy to add redis snapshotting * refactor: prune unused query bring your own queries * refactor: move constructing strategy to proper home * refactor: remove reject files * refactor: get snapshot or default, not or construct if there's no snapshot, we want it to return null, not the newly constructed entity * chore: parameter is actually ILogger not IServiceProvider, rename * refactor: snapshotting changes 1. remove PreviousSnapshot from ITransactionCommand 2. test mode passes an object that controls disposal; we need this because we will be separating recording snapshots from pulling them, and end up with two different instances of ISnapshotRepository; it should not remove the entries created until all instances have been disposed * refactor: stop injecting IServiceProvider ask for the required dependencies explicitly * feature: async transaction subscriber in test mode, will run synchronously * feature: snapshotting transaction subscriber store transaction snapshots asynchronously, don't block or allow a failure to cause problems :)
- Loading branch information
1 parent
f540d20
commit 324865f
Showing
65 changed files
with
978 additions
and
932 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/EntityDb.Abstractions/Entities/IEntityRepositoryFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using EntityDb.Abstractions.Snapshots; | ||
using EntityDb.Abstractions.Transactions; | ||
using System.Threading.Tasks; | ||
|
||
namespace EntityDb.Abstractions.Entities | ||
{ | ||
public interface IEntityRepositoryFactory<TEntity> | ||
{ | ||
Task<IEntityRepository<TEntity>> CreateRepository(ITransactionSessionOptions transactionSessionOptions, | ||
ISnapshotSessionOptions? snapshotSessionOptions = null); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/EntityDb.Abstractions/Queries/Filters/ICommandFilter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using EntityDb.Abstractions.Queries.FilterBuilders; | ||
|
||
namespace EntityDb.Abstractions.Queries.Filters | ||
{ | ||
/// <summary> | ||
/// Represents a type that supplies filtering for a <see cref="ICommandQuery" />. | ||
/// </summary> | ||
public interface ICommandFilter | ||
{ | ||
/// <summary> | ||
/// Returns a <typeparamref name="TFilter" /> built from a command filter builder. | ||
/// </summary> | ||
/// <typeparam name="TFilter">The type of filter used by the repository.</typeparam> | ||
/// <param name="builder">The command filter builder.</param> | ||
/// <returns>A <typeparamref name="TFilter" /> built from <paramref name="builder" />.</returns> | ||
TFilter GetFilter<TFilter>(ICommandFilterBuilder<TFilter> builder); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using EntityDb.Abstractions.Queries.FilterBuilders; | ||
|
||
namespace EntityDb.Abstractions.Queries.Filters | ||
{ | ||
/// <summary> | ||
/// Represents a type that supplies filtering for a <see cref="IFactQuery" />. | ||
/// </summary> | ||
public interface IFactFilter | ||
{ | ||
/// <summary> | ||
/// Returns a <typeparamref name="TFilter" /> built from a fact filter builder. | ||
/// </summary> | ||
/// <typeparam name="TFilter">The type of filter used by the repository.</typeparam> | ||
/// <param name="builder">The fact filter builder.</param> | ||
/// <returns>A <typeparamref name="TFilter" /> built from <paramref name="builder" />.</returns> | ||
TFilter GetFilter<TFilter>(IFactFilterBuilder<TFilter> builder); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using EntityDb.Abstractions.Queries.FilterBuilders; | ||
|
||
namespace EntityDb.Abstractions.Queries.Filters | ||
{ | ||
/// <summary> | ||
/// Represents a type that supplies filtering for a <see cref="ILeaseQuery" />. | ||
/// </summary> | ||
public interface ILeaseFilter | ||
{ | ||
/// <summary> | ||
/// Returns a <typeparamref name="TFilter" /> built from a lease filter builder. | ||
/// </summary> | ||
/// <typeparam name="TFilter">The type of filter used by the repository.</typeparam> | ||
/// <param name="builder">The lease filter builder.</param> | ||
/// <returns>A <typeparamref name="TFilter" /> built from <paramref name="builder" />.</returns> | ||
TFilter GetFilter<TFilter>(ILeaseFilterBuilder<TFilter> builder); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/EntityDb.Abstractions/Queries/Filters/ISourceFilter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using EntityDb.Abstractions.Queries.FilterBuilders; | ||
|
||
namespace EntityDb.Abstractions.Queries.Filters | ||
{ | ||
/// <summary> | ||
/// Represents a type that supplies filtering for a <see cref="ISourceQuery" />. | ||
/// </summary> | ||
public interface ISourceFilter | ||
{ | ||
/// <summary> | ||
/// Returns a <typeparamref name="TFilter" /> built from a source filter builder. | ||
/// </summary> | ||
/// <typeparam name="TFilter">The type of filter used by the repository.</typeparam> | ||
/// <param name="builder">The source filter builder.</param> | ||
/// <returns>A <typeparamref name="TFilter" /> built from <paramref name="builder" />.</returns> | ||
TFilter GetFilter<TFilter>(ISourceFilterBuilder<TFilter> builder); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using EntityDb.Abstractions.Queries.FilterBuilders; | ||
|
||
namespace EntityDb.Abstractions.Queries.Filters | ||
{ | ||
/// <summary> | ||
/// Represents a type that supplies filtering for a <see cref="ITagQuery" />. | ||
/// </summary> | ||
public interface ITagFilter | ||
{ | ||
/// <summary> | ||
/// Returns a <typeparamref name="TFilter" /> built from a tag filter builder. | ||
/// </summary> | ||
/// <typeparam name="TFilter">The type of filter used by the repository.</typeparam> | ||
/// <param name="builder">The tag filter builder.</param> | ||
/// <returns>A <typeparamref name="TFilter" /> built from <paramref name="builder" />.</returns> | ||
TFilter GetFilter<TFilter>(ITagFilterBuilder<TFilter> builder); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/EntityDb.Abstractions/Transactions/ITransactionSubscriber.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace EntityDb.Abstractions.Transactions | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <typeparam name="TEntity"></typeparam> | ||
public interface ITransactionSubscriber<TEntity> | ||
{ | ||
/// <summary> | ||
/// Foo | ||
/// </summary> | ||
/// <param name="transaction"></param> | ||
void Notify(ITransaction<TEntity> transaction); | ||
} | ||
} |
64 changes: 0 additions & 64 deletions
64
src/EntityDb.Common.Tests/Extensions/IServiceProviderExtensionsTests.cs
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/EntityDb.Common.Tests/Projections/ProjectionServiceProviderTests.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.