This post started as a grumpy tweet:
yaml is easy to type and easy to read. json is fiddly and fussy. So why is json in so many places where humans have to edit it?
This post started as a grumpy tweet:
yaml is easy to type and easy to read. json is fiddly and fussy. So why is json in so many places where humans have to edit it?
This code will transfer data between two different databases. mysql to postgresql is my personal favourite. It’s very loosely based on the sequel command code for copying databases, whence the ordering of: transfer schema; then table data; then recreate indexes and constraints.
One of the big slowdowns with postgres (and RDBMSs in general) is writing data to disk and ensuring data integrity. So to make that process faster, here’s a way to put a postgres db on a ram disk and turn off some of the data integrity in favour of faster operation.
I prefer Sequel::Dataset capabilities to Arel’s Relation for several reasons, not least of which is Sequel’s row_proc. Which lets you bend reality and perhaps time itself when you want the best of both worlds: