Skip to main content

Monthly Update - 2025-10

Β· 2 min read
TeaQL Code Gen
Core Contributor

A big month for TeaQL with internationalization support, SQLite enhancements, and a significant code generation grammar change.

Changes​

teaql-code-gen​

πŸš€ Change has to have by default, with backward compatibility​

The code generator now uses have instead of has as the default naming convention for boolean properties. This is a more natural language choice for most domain models. Existing projects can opt into the old behavior by setting use_has='true'.

- Default boolean naming: hasXxx β†’ haveXxx
- Old projects: set use_has='true' to keep hasXxx convention
+ Added system-types.xml with boolean naming configuration
+ Updated Domain, DomainWrapper, FieldDescriptor, ObjectDescriptor
+ Enhanced DomainNaming and FieldDescriptorNaming with convention logic

Before:

user.hasPermission()
order.hasItems()

After (default):

user.havePermission()
order.haveItems()

This change touches 16 files and represents a thoughtful balance between improving defaults and maintaining backward compatibility.

teaql-spring-boot-starter​

🌐 Traditional Chinese language support is done​

Completed the Traditional Chinese (繁體中文) translation for TeaQL's built-in messages, error codes, and generated code comments. This is part of the broader internationalization effort.

+ Full Traditional Chinese (zh-TW) translation coverage
+ Optimized translator code: inherit from BaseLanguageTranslator
+ Adjusted language detection and selection logic

πŸš€ Add alter column support for SQLite​

SQLite has limited ALTER TABLE support compared to other databases. This update implements a workaround for SQLite's inability to modify column types β€” TeaQL now recreates the table with the correct schema when column alterations are needed.

+ SQLiteRepository: implemented alter column via table recreation
+ SQLRepository: added helper methods for SQLite-specific schema migration
+ Handles data preservation during table recreation

πŸš€ Use CODE_AS_IS for constants​

Code generation for constants now uses the CODE_AS_IS strategy, meaning constant values are emitted exactly as defined in the domain model without additional transformation or escaping.

- Previous: constant values could be transformed during code generation
+ Now: constants are emitted as-is from the domain model definition
Language Support Details

TeaQL now supports multiple languages for generated code comments and error messages:

  • English (en) β€” default
  • Simplified Chinese (zh-CN)
  • Traditional Chinese (zh-TW) β€” new

The BaseLanguageTranslator base class makes adding new languages straightforward.