Skip to content

Experiment. Sequel.#15

Open
woller wants to merge 8 commits into
mainfrom
experiment/sequel
Open

Experiment. Sequel.#15
woller wants to merge 8 commits into
mainfrom
experiment/sequel

Conversation

@woller

@woller woller commented Jul 4, 2025

Copy link
Copy Markdown
Collaborator

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.

@woller woller requested a review from traels July 4, 2025 15:15
Comment thread lib/witsec/anonymizer.rb

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ;)

Comment thread lib/witsec/anonymizer.rb

anonymized_rows = Witsec::Alias.new(table_name, columns:, schema:).anonymize(rows)

row_batches = anonymized_rows.in_groups_of(BATCH_SIZE, false)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

2 participants