Skip to content
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

chore: fix bin/mongodb-schema script #206

Merged
merged 2 commits into from
Oct 25, 2023
Merged

chore: fix bin/mongodb-schema script #206

merged 2 commits into from
Oct 25, 2023

Conversation

lerouxb
Copy link
Contributor

@lerouxb lerouxb commented Oct 25, 2023

The sample option wasn't working because mongodb-collection-sample's returned stream wasn't iterating. I switched it to using a sample aggregation and now that dep can be gone from our dependencies here and in compass.

The repeat argument wasn't doing anything.

This is much simpler with just async iterators over the cursor we get when either doing a find or a sample aggregation.

The schemaStats functions weren't working because the export is now the default object.

We weren't using the new analyzer methods.

@lerouxb
Copy link
Contributor Author

lerouxb commented Oct 25, 2023

We should probably convert that script to typescript, but I don't think anyone uses it. It is sometimes handy for testing locally, though.

@lerouxb lerouxb merged commit c7b07ea into main Oct 25, 2023
18 checks passed
@lerouxb lerouxb deleted the fix-script branch October 25, 2023 12:25
@lerouxb lerouxb changed the title chore: Fix bin/mongodb-schema script chore: fix bin/mongodb-schema script Oct 25, 2023
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