Skip to content

Changed _pools initialization to an empty object #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clayzermk1
Copy link
Owner

What happens?

_pools is initialized as an empty array but values are stored and retrieved as object keys.

For example I have an object that looks like this in the inspector:

_pools: Array[0]
  "postgres://<snip>": Object
  length: 0

What did you expect to happen?

I'm not sure if this is by design or not. I was expecting an easily-iterable object of some sort, either an array of objects or a plain object with keys. Sure, I could iterate over the Array instance's own keys but that's messy. It feels like this should just have been instantiated as an object.

Use case

I understand this is a private variable. I use it to inspect the pool level for debugging and performance purposes only.

Thank you for your time and for such a great open source project! 🍻

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.

1 participant