I don't typically write "lifehack" posts, but this question has come up repeatedly over the last few weeks:
Building things is very, very fun!
I have to start out each post this way: I have no idea what I'm doing, but dammit am I having fun. In the fist few posts I ham-handedly threw some code against the wall to see what would ... stick? Anyway It worked, but I realized (as I did with Ruby, wonderfully) that there just has to be a better way.
I don't know anything about elixir but I very much want to learn it. I like learning new things - I feel it's required for our industry. It's easy to feel a twinge of snark about this, I feel that too, every day. But every now and again something comes along and I just find myself getting pulled right in.
In parts 1 and 2 of this little series I showed various ways to save a document and then update its search field. I also showed how to do a Bulk Saves of many documents transactionally. In this post I'll explore options for running queries.
In part 1 of this series I setup a nice save function, as well as another function to create an opinionated document storage table on the fly. This works well and does what's needed, but we can do so much more. Specifically: I want Full Text Indexing on the fly and bulk saves within a transaction.
One thing that drives me absolutely over the cliff is how ORMs try so hard (and fail) to abstract the power and expressiveness of SQL. Before I write further let me say that Frans Bouma reminded me yesterday there's a difference between ORMs and the people that use them. They're just tools (the ORMs) - and I agree with that in the same way I agree that crappy fast food doesn't make people fat - it's the people that eat too much of it.