Skip to content
Sharp

Data Access · interview question

What does a strong engineer do when reasoning through repository boundaries code?

Multiple choiceHardchapter-11-curatedpremiumdata-accessrepository-boundaries
python
class OrderRepository:
    def by_id(self, order_id: str) -> tuple | None:
        return connection.execute("SELECT id FROM orders WHERE id = ?", (order_id,)).fetchone()
Choose one answer
Answer and explanation

Correct answer

D. Narrate the data shape, the state changes, and the exact rule order step by step.

Why

Interviewers often use simple code to test whether you can reason through execution without bluffing.

Test yourself on Data Access

A free test with instant, explained results. No account needed.

Start free test
All Data Access questions →