Skip to main content

3 posts tagged with "validation"

View All Tags

Task Runner Framework and Batch Operations

· One min read
TeaQL Code Gen
Core Contributor

Async task framework, batch operations, and entity update API improvements.

TaskRunner Framework

+ TaskRunner: execute tasks within TeaQL context
+ Support for async and scheduled tasks
+ Integration with permission and data scoping

Entity-Level Update API

Q.orders().updateOnEntity(order, ctx);

Pre-Action Validation

+ validateForSave(): runs before persistence
+ validateForDelete(): runs before deletion
+ Custom validation logic per entity type

Excel Export

XLSX block support in the view rendering system for data export.

Batch Operations

The code generator now produces batch operation templates for efficient bulk processing.

Other Improvements

  • Compact request/response logging
  • BaseService error handling enhancements
  • China administrative region data support

Code Generator Goes Production with Validation Framework

· One min read
TeaQL Code Gen
Core Contributor

The code generator evolved from a prototype into a production-ready Spring Boot generation engine.

Code Generator

Spring Boot Generation Engine

  • 26 files changed, 467 lines added
  • Templates migrated to Spring Boot STG (StringTemplate)
  • Support for lib and ZIP file imports
  • Auto-generated UserContext

Domain Model Reuse

DomainParser now supports importing domain models from local filesystem paths, ZIP archives, and remote library references.

Runtime Enhancements

Checker Validation Framework

Automatically validates domain objects before persistence to ensure data integrity:

+ SQLRepositorySchemaHelper: added checker validation (66 lines)
+ Checker: validates entity constraints before save/update

EntityDescriptor Metadata

A metadata object describing the full structure of an entity, including children, properties, and relationships.

Other Improvements

  • TypeCriteriaParser: Filter entities by type hierarchy
  • Smart IN Optimization: Single-value IN automatically becomes =, NOT IN becomes !=
  • SmartList: Supports get(index) and size()
  • GitHub Actions CI/CD: Automated publishing to GitHub Packages

Generated View Runtime

· 2 min read
TeaQL Code Gen
Core Contributor

Historical note: This article documents an earlier TeaQL generation target. Early versions emitted backend templates, UI pages, mobile clients, and service scaffolding directly into application workspaces. Modern TeaQL has moved to a clearer boundary: generation produces versioned libraries, deterministic business APIs, query DSLs, and runtime capabilities that applications consume as artifacts. This is more friendly to AI-assisted coding and DevOps because AI agents can focus on business workflows, integrations, tests, and product behavior, while generated capabilities are reviewed, tested, published, upgraded, and rolled back through normal dependency and release pipelines.

In 2019 the generated frontend and backend started to look more like a runtime, not a collection of pages.

The diff shows work around java_view_base_view_page.jsp, generated checker templates, generated scripts, event processors, base constants, locale services, React object base components, dashboards, tables, profile pages, permission pages, and step forms.

Base View Pages

The generated Java view layer introduced reusable base view concepts:

  • object view pages
  • list-of view pages
  • view models
  • profile and preference views
  • permission-aware presentation

This helped separate generated page behavior from individual object templates. Repeated page mechanics moved into base templates, while object-specific code stayed small.

Generated Validation Surface

Checker generation also became more visible:

  • base checker templates
  • object checker templates
  • checker manager templates
  • update parameter checks
  • reference parameter update checks

Validation was moving closer to generated domain behavior. Instead of relying on handwritten service guards, the generator could emit repeatable checks from model metadata.

Events and Step Forms

Event and step-form templates appeared beside the normal CRUD forms.

That mattered because real business apps rarely stop at simple create/update pages. The generator began to support process-shaped UI and backend hooks, such as change events, staged forms, and generated action wiring.

Locale and Presentation Polish

The React templates also gained more presentation behavior:

  • locale lookup
  • permission-based action display
  • generated operation columns
  • table sorter state
  • dashboard and profile variants

These were not model additions. They were generated application capabilities that made the output closer to something teams could use directly.