- Notifications
You must be signed in to change notification settings - Fork0
initial idea on a dbtool#185
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
christianparpart wants to merge2 commits intomasterChoose a base branch fromfeature/dbtool
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Draft
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
9af1aac to010c539Comparea1b24d0 to9de17adCompare0f4ce0e todc74b9eComparedc74b9e tob04c406Compareb04c406 to6b9000eCompare… public APISigned-off-by: Christian Parpart <christian@parpart.family>
6b9000e to11cbcb0CompareSign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
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.
This pull request introduces several enhancements and refactors to the SQL schema handling, debugging configuration, and type definitions in the codebase. The key changes include adding a new debugging configuration for
vimspector, refactoring schema-related functions to useSqlConnectionfor better encapsulation, introducing a utility function for mapping ODBC data types, and improving type safety in migration plans.Debugging Enhancements:
.vimspector.json: Added a new debugging configuration fordbtoolto enable launching and debugging thedbtoolprogram with predefined arguments and settings.Schema Handling Refactors:
src/Lightweight/SqlSchema.cpp: Refactored schema-related functions (ReadAllTables,AllTables, etc.) to useSqlConnectioninstead of raw database and schema strings for improved encapsulation and clarity. Added logging for SQL execution and ensured cursors are closed after use.[1][2][3]src/Lightweight/SqlSchema.hpp: Updated function signatures to reflect the use ofSqlConnectionin schema-related functions.[1][2]Type Mapping Improvements:
src/Lightweight/SqlColumnTypeDefinitions.hpp: Introduced theMakeColumnTypeFromNativefunction to map ODBC data types toSqlColumnTypeDefinitionin a concise and reusable way. This replaces the previous implementation that was scattered across multiple files.src/Lightweight/SqlSchema.cpp: Replaced the oldFromNativeDataTypeimplementation with the newMakeColumnTypeFromNativeutility for better maintainability and consistency.Migration Plan Improvements:
src/Lightweight/SqlQuery/MigrationPlan.hpp: Changed thetableNamefield inSqlCreateTablePlanfromstd::string_viewtostd::stringto ensure better memory safety and ownership.src/Lightweight/SqlQuery/Migrate.cpp: Updated theCreateTablemethod to reflect the change intableNametype.Logging and Error Handling:
src/Lightweight/SqlConnection.cpp: Added a call toRequireSuccessfor better error handling when establishing a connection.src/Lightweight/SqlSchema.cpp: Added detailed logging for SQL commands and error handling for unsupported data types using the new utility function.[1][2]These changes improve the maintainability, debugging capabilities, and robustness of the codebase, particularly in handling SQL schema operations and type mappings.