We often come across use cases in a Rails application where we need to create, update, or delete records in bulk. Most ORMs naively update or insert each record individually by executing N+1 database queries. To address this problem, Rails 6 added the upsert_all method that provides a faster way to update and insert a large number of records. upsert_all uses a single SQL INSERT statement for updating/inserting the records. And it does so without instantiating any models. Nor does it trigger any Active Record callbacks or validations ! How upsert_all works? If we check the
Rails 7 adds ComparisonValidator to compare and validate numeric, date and string values. It provides comparisons options that accept value, procs, or symbol.
This article introduces to GIN index in the Postgres database and how to use it in the Rails application.
Rails 7 puts forward an alternative approach to bundling JS called Import Maps. Read this blog to find out more about it.
Let’s know why to use PNS with Azure Notification Hub push engine that allows us to send notifications from any platform to any platform.
This article gives insights on Realm Extension Functions, through which time taken for a filter on the database is drastically reduced.
Handling localization is a tedious process in Android, but what if I tell you it can be done in a much simpler and effective way using Restring.
Efficient & robust search functionality is a necessity of any software application, may it be web, mobile, or desktop. It's a "must" to improve user experience (UX) and adoption. The search feature may seem very simple to a user but its very complex and challenging behind the scene to implement especially deep search. For one of our web applications, we had a challenging requirement to add several nested filters on search result pages. The primary data was sourced through Azure search on these web pages. In this article, I am sharing our learnings about Azure search and the power of