Skip to content

Access to DbConnection #155

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
merged 17 commits into from
Aug 27, 2021
Merged

Access to DbConnection #155

merged 17 commits into from
Aug 27, 2021

Conversation

alex-kulakov
Copy link
Contributor

@alex-kulakov alex-kulakov commented Jul 19, 2021

This PR adds an ability to execute certain code on connection opening. It adds IDbConnectionAccessor and its default abstract implementation with following access points

  • ConnectionOpening/ConnectionOpeningAsync - when DbConnection is created but not opened;
  • ConnectionInitialization/ConnectionInitializationAsync - when DbConnection is already opened but connection initialization script is not executed, raises when initialization script exists;
  • ConnectionOpened/ConnectionOpenedAsync - when DbConnection is successfully opened and initialized
  • ConnectionOpeningFailed/ConnectionOpeningFailedAsync - when DbConnection opening or initialization went wrong.

This API allows to fill in connection's AccessToken like it was required by Denis in #143

@alex-kulakov alex-kulakov requested a review from AlexUstinov July 19, 2021 09:16
StorageDriver: ConcurrentDictionary replaced with regular Distionary,
SqlDriver: Removed unused property
SqlServer driver factory: reorganized connection opening w/ and w/o notification
Other minor changes
@alex-kulakov alex-kulakov merged commit 7b23854 into master Aug 27, 2021
@alex-kulakov alex-kulakov deleted the master-connection-handlers branch August 27, 2021 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant