← Questions

Parse SQL strings into ORM objects, then serve them from an endpoint

0
LangChainCodingLast asked Apr 2026

You work in an older branch of the company's real codebase, with little documentation and AI tools allowed; it can be done in a day on site or over about a week.

  1. Write a parser that takes a raw SQL string and turns it into the in-memory query objects (the ORM representation) the codebase already uses.
  2. Add a service endpoint that accepts a SQL string, runs it through your parser and maps the result onto the right schema and database objects, following a written spec. Expect the code and the spec not to match everywhere (missing fields, changed types, tables that differ); ask questions where it matters.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding