Open nfedyashev opened 4 years ago
Actually this brings to my attention a problem with the interface defined by this gem, a simpler class that takes a database connection and the copy parameters would be a more solid base to build the ActiveRecord behaviour upon.
The PR withe example in the README is a good idea. But I'm also keeping this open to improve on the interface exposed by the gem.
I'm using postgres-copy for importing CSV files in tempory tables that are later used for parsing line by line(record by record).
That's why such ActiveRecord models & tables could not be created upfront. I believe that might be not such a rare use case.
That's the workaround that I'm currently using:
Please let me know if you may need this as an example in README, so I'll prepare a PR. HTH