Skip Navigation code drift

Databases

Fetch all MongoDB Indexes for Mirroring to Another Database

(1 min read) I needed a reliable way to take the indexes from a staging instance and ensure they're replicated to production. The following _MONGOSH code loops over every collection and then every index in the collection, creating a "createIndex" command for each combination. This makes it trival to

Making nulls distinct in Postgres < 15

(1 min read) From the postgres docs on unique indexes: When an index is declared unique, multiple table rows with equal indexed values are not allowed. Null values are not considered equal. A multicolumn unique index will only reject cases where all indexed columns are equal in multiple rows. Unfortunately, disabling distinct null

Designing A Time-Based Queue for Serverless

(4 min read) Building a serverless-friendly queue system continues to be an adventure. Recently, we had to say goodbye to our Redis queues and replace them with something more durable. The journey there involved a lot about time storage, visibility windows, and how the most popular queue solutions solve these problem. So, if

Complex Hasura Permissions Via Views

(4 min read) When there's no amount of "or", "and", and "exists" that can make your Hasura permissions simple, pull out the postgres view and simplify a huge part of your permissions query.