-
-
Notifications
You must be signed in to change notification settings - Fork 612
optimize ExecuteQueryFn,SqlSelctFn #1290
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
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
|
reviewed |
PR Type
Enhancement
Description
Extract database query execution logic into reusable
SqlExecuteServiceRefactor
ExecuteQueryFnandSqlSelectFnto use centralized serviceConvert database operations to async/await pattern
Add MongoDB support to
SqlSelectFnand create constants for state keysDiagram Walkthrough
File Walkthrough
StateKeys.cs
Create state keys constants filesrc/Plugins/BotSharp.Plugin.SqlDriver/Constants/StateKeys.cs
DBTypeandDataSourcestring constantsSqlDriverPlugin.cs
Register SqlExecuteService in DIsrc/Plugins/BotSharp.Plugin.SqlDriver/SqlDriverPlugin.cs
SqlExecuteServiceas scoped dependency in DI containerSqlDriverController.cs
Use StateKeys constants in controllersrc/Plugins/BotSharp.Plugin.SqlDriver/Controllers/SqlDriverController.cs
StateKeysconstants namespaceStateKeys.DBTypeandStateKeys.DataSourceExecuteQueryFn.cs
Refactor to use SqlExecuteServicesrc/Plugins/BotSharp.Plugin.SqlDriver/Functions/ExecuteQueryFn.cs
SqlExecuteServicedependencySqlExecuteServicemethodsSqlSelectFn.cs
Create new SqlSelectFn with service injectionsrc/Plugins/BotSharp.Plugin.SqlDriver/Functions/SqlSelectFn.cs
SqlExecuteServicefor database operationsSqlExecuteService.cs
Create centralized SqlExecuteServicesrc/Plugins/BotSharp.Plugin.SqlDriver/Services/SqlExecuteService.cs
MongoDB
SqlSelect.cs
Remove old SqlSelect implementationsrc/Plugins/BotSharp.Plugin.SqlDriver/Functions/SqlSelect.cs
SqlSelectFn.csSqlExecuteService