Experiment. Sequel.#15
Open
woller wants to merge 8 commits into
Open
Conversation
traels
reviewed
Aug 1, 2025
|
|
||
| if input_connection_pool.lease_connection.current_database == output_connection_pool.lease_connection.current_database | ||
| raise Witsec::InputAndOutputDatabasesAreTheSame, "You've probably forgotten to setup the output database. It must be named anonymized." | ||
| if Witsec.config.output == Witsec.config.input |
Contributor
There was a problem hiding this comment.
Ved du at man kan sammenligne dry-configurable objects?
Så vidt jeg ved har vi ikke en test for dette, så tænker det måske er lidt relevant lige at tjekke inden vi sletter flere databaser ;)
|
|
||
| anonymized_rows = Witsec::Alias.new(table_name, columns:, schema:).anonymize(rows) | ||
|
|
||
| row_batches = anonymized_rows.in_groups_of(BATCH_SIZE, false) |
Contributor
There was a problem hiding this comment.
Så vidt jeg lige kan se er in_groups_of en Rails method. Bemærker bare at du senere har tjekket på defined?(Rails) - hvis planen er at det kan køre uden Rails tror jeg det kræver lidt mere.
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.
Replaces ActiveRecord with Sequel. This paves the way for making the gem framework agnostic and reduces external dependencies. The Rails integration can be moved into an adapter gem.