refactor: remove global database state and introduce Micrate::Runner#94
Open
renich wants to merge 2 commits into
Open
refactor: remove global database state and introduce Micrate::Runner#94renich wants to merge 2 commits into
renich wants to merge 2 commits into
Conversation
- Add and run ameba for linting. - Resolve not_nil! and syntax/style issues reported by ameba. - Ignore pedantic .ameba.yml rules like BlockParameterName. - Rename set_database_to_schema to extract_schema_name for accuracy. Co-developed-by: Gemini AI <renich+gemini@woralelandia.com> Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>
Replaced `Micrate::DB` and its global `@@connection_url` and `@@dialect` with `Micrate::Runner` context objects. This encapsulates connection configuration and allows for concurrent programmatic database operations. Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com> Co-developed-by: Gemini AI <renich+gemini@woralelandia.com>
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
Sign up for free
to 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.
Description
Phase 1 (Stabilization) of the ENHANCEMENT_ROADMAP.md.
Replaced
Micrate::DBand its global@@connection_urland@@dialectwithMicrate::Runnercontext objects. This encapsulates connection configuration and allows for concurrent programmatic database operations, making Micrate easier to use via Crystal's API without clashing singletons.Micrate::RunnerMicrate::Clito instantiate runnerAll existing unit specs have been retained and verified to pass.
Signed-off-by: Rénich Bon Ćirić renich@woralelandia.com
Co-developed-by: Gemini AI renich+gemini@woralelandia.com