Skip to main content

Runtime Overview

TeaQL runtime execution starts after a generated API request is built. The runtime is responsible for turning business intent into storage operations while applying application policies.

Runtime Responsibilities

The runtime layer handles:

  • Query execution
  • Repository resolution
  • Entity metadata lookup
  • Transaction boundaries
  • Validation and error translation
  • Caching, logging, locking, and metrics hooks
  • Database/provider-specific SQL or repository execution
  • Graph loading, relation enhancement, aggregation, and graph writes

Six Generated Runtimes

TeaQL currently generates executable runtime APIs for Java, Rust, Go, Python, C#/.NET and TypeScript. They share Request intent, UserContext, expression, relation, aggregation, optimistic locking and audit semantics while using language-native casing and async conventions.

Start with the Language Support Overview to choose a target and see its verified database boundary.

Java Runtime

The Java runtime is built around UserContext. Existing docs already describe this surface in detail:

Rust Runtime

The Rust runtime is designed around provider-backed repositories and generated business APIs.

Important Rust runtime concepts:

  • teaql-core
  • teaql-runtime
  • teaql-sql
  • teaql-macros
  • RuntimeModule and module!
  • Repository API
  • Relation enhancement
  • Relation aggregate enhancement
  • Graph save
  • Schema bootstrap
  • MemoryRepository
  • teaql-provider-postgres
  • teaql-provider-mysql
  • teaql-provider-sqlite (implemented with rusqlite in the verified 4.1.1 combination)
  • teaql-provider-meilisearch

These names describe current provider families, not equal evidence levels. The first provider-focused page is Rust database providers; use Database Provider Compatibility before selecting a production combination.

Go, Python, .NET and TypeScript

The additional generated runtimes are documented here:

All four executed the complete Order Search Feature against PostgreSQL, MySQL and SQLite. .NET also completed the Feature on SQL Server. TypeScript additionally passed real protocol federation to a Rust backend.

Data Services

TeaQL models can declare data-service targets. Existing Java-oriented data-service docs are reused here because the concept is shared:

Execution Shape

Generated Q request
-> Runtime context
-> Repository API
-> Provider implementation
-> Database / Memory / Embedded storage

The goal is to keep the generated business API stable while allowing runtime providers to change underneath.