AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
JSON, B to Records in PostgreSQL
Trying to translate raw SQL into ECTO also proved to have a couple of challenges off its own. We found a function that's kind of a native function within Postgres called JSON, B to records That where we can look at like taking that array ofJSON objects with like however deeply nested it might be in the column. So trying to find a way to coherently write like reusable query was another challenge for us. And one of the things with Ecto is that each time you're doing a from statement or a join it automatically appends its own as keyword on do it.