Skip to main content

SQL is king!

In the realm of data operations, SQL reigns supreme. That's why the primary workflow in Typo revolves around writing SQL in dedicated SQL files.

Here's why this approach is a game-changer:

1. Fully Exploded Queries: Forget about the hassle of converting SQL queries to and from source code. With Typo, your queries reside in their pure form, ready to be executed as intended.

2. Superb Tooling Support: Typo's SQL-first approach unlocks unparalleled tooling support. Whether you're using an IDE or language model (LLM), you'll experience seamless integration, enhanced autocompletion, and precise error messages.

3. Parameter Support: Typo embraces the flexibility of SQL by allowing parameterization within your queries. It's not just about static SQL; you can dynamically pass parameters to tailor your database interactions.

4. Centralization: Picture this—you can now gather and manage all your queries used across (or within parts of) a system in one centralized location. This is more than just convenience; it's a game-changer for collaboration and analysis. Your DBA can effortlessly script analyses and optimizations.

But let's not stop at words—let's dive right into a live example! In the video below, witness the magic as the generated code seamlessly updates in real-time as you edit your SQL file. Experience the fluidity and power of Typo's SQL-first approach for yourself.

Parameters

This video shows how you can use parameters.

It also shows the syntax to override inferred nullability and types. While PostgreSQL is pretty good at both, it's not always exactly what you want. In particular, parameters are optional by default.

Updates

You can also update, delete and so on in sql scripts. Those statements can also return columns, see this video