-
Notifications
You must be signed in to change notification settings - Fork 935
Allow custom query loader #3209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
fredericDelaporte
merged 20 commits into
nhibernate:master
from
micmerchant:QueryLoader_Dependency_Inversion
Jan 28, 2023
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
691d080
interfaces extracted for Dependency Inversion Principle
69e4da5
NHibernate version changes to build internal custom NuGet package rev…
a2009d4
reverted formatting changes
4b82fa0
Generate async files
github-actions[bot] 44072ea
reverted evaluation of cacheable query expression
67a1aac
various review issues solved
49f5a53
test fixed
cc27627
tests added
0ecd914
review issue fixed
d5a782a
Generate async files
github-actions[bot] bd09320
Avoid some possible binary breaking change
fredericDelaporte fc918a7
Generate async files
github-actions[bot] 5b33104
Revert an undue change
fredericDelaporte 6ec4a45
Update src/NHibernate/Loader/Hql/QueryLoaderFactory.cs
micmerchant 6567805
Update src/NHibernate/Persister/IPersister.cs
micmerchant 1f3ac95
- adds a future query test
d219fdf
- async code generated
2c8bcc6
Implement the transitional interface on each translator
fredericDelaporte 6e1626d
Generate async files
github-actions[bot] 34ac8f7
Merge branch 'master' into QueryLoader_Dependency_Inversion
fredericDelaporte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,24 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by AsyncGenerator. | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
|
||
using System.Collections; | ||
using NHibernate.Engine; | ||
using NHibernate.Event; | ||
|
||
namespace NHibernate.Loader.Hql | ||
{ | ||
using System.Threading.Tasks; | ||
using System.Threading; | ||
public partial interface IQueryLoader: ILoader | ||
{ | ||
Task<IList> ListAsync(ISessionImplementor session, QueryParameters queryParameters, CancellationToken cancellationToken); | ||
Task<IEnumerable> GetEnumerableAsync(QueryParameters queryParameters, IEventSource session, CancellationToken cancellationToken); | ||
} | ||
} |
This file contains hidden or 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 hidden or 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,57 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by AsyncGenerator. | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
|
||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Data.Common; | ||
using NHibernate.Cache; | ||
using NHibernate.Engine; | ||
using NHibernate.Persister; | ||
using NHibernate.Persister.Entity; | ||
using NHibernate.SqlCommand; | ||
using NHibernate.Transform; | ||
using NHibernate.Type; | ||
|
||
namespace NHibernate.Loader | ||
{ | ||
using System.Threading.Tasks; | ||
using System.Threading; | ||
public partial interface ILoader | ||
{ | ||
|
||
Task<object> GetRowFromResultSetAsync(DbDataReader resultSet, ISessionImplementor session, | ||
QueryParameters queryParameters, LockMode[] lockModeArray, | ||
EntityKey optionalObjectKey, IList hydratedObjects, EntityKey[] keys, | ||
bool returnProxies, IResultTransformer forcedResultTransformer, | ||
QueryCacheResultBuilder queryCacheResultBuilder, | ||
Action<IEntityPersister, CachePutData> cacheBatchingHandler, CancellationToken cancellationToken); | ||
|
||
Task InitializeEntitiesAndCollectionsAsync(IList hydratedObjects, | ||
DbDataReader reader, | ||
ISessionImplementor session, | ||
bool readOnly, | ||
CacheBatcher cacheBatcher, CancellationToken cancellationToken); | ||
|
||
/// <summary> | ||
/// Called by subclasses that load collections | ||
/// </summary> | ||
Task LoadCollectionAsync(ISessionImplementor session, | ||
object id, | ||
IType type, CancellationToken cancellationToken); | ||
|
||
/// <summary> | ||
/// Called by wrappers that batch initialize collections | ||
/// </summary> | ||
Task LoadCollectionBatchAsync(ISessionImplementor session, | ||
object[] ids, | ||
IType type, CancellationToken cancellationToken); | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.