stripe-archive / mosql

MongoDB → PostgreSQL streaming replication
MIT License
1.63k stars 225 forks source link

Adding array selector array[0] #126

Open houshuang opened 8 years ago

houshuang commented 8 years ago

I have not written Ruby for a while, but I needed this for a project, and it seems to work. This adds the possibility of selecting a specific value using an array selector [0]. This is especially useful for projects where there are arrays where you always just want the first value, rather than creating a Postgres array.

houshuang commented 8 years ago

Note that currently this only works if the array selector is the final element. Ideally something like supervisor[0].id should also work.

laurentrivard commented 7 years ago

@houshuang Looking into converting our MongoDB data with postgres but we have arrays inside our documents. Would you PR help us import arrays into their own tables?

houshuang commented 7 years ago

No, this only selects a specific value from an array, it does not import the whole array.

CLAassistant commented 4 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.