Skip to main content

2 posts tagged with "id-generator"

View All Tags

Snowflake Distributed ID Generator

· One min read
TeaQL Code Gen
Core Contributor

The teaql-snowflake module brings distributed unique ID generation.

Snowflake IDs

+ teaql-snowflake: distributed unique ID generation
+ 64-bit IDs: timestamp + worker node + sequence

Features:

  • Globally unique without coordination
  • Time-ordered for index-friendly storage
  • Configurable worker node IDs

Enhance Children

Automatically load and enrich child collections when querying parent entities:

+ Auto-enrich child collections
+ Recursive enhancement support
+ Fix: enhanced children handle update operations correctly

MSSQL ALTER TABLE

  • ALTER TABLE column support
  • ADD COLUMN SQL generation
  • Order by ID when paging without explicit sort

Dynamic Search and Expression System

· One min read
TeaQL Code Gen
Core Contributor

Over 60 commits in a single month introduced dynamic search, the expression API, event system, and web framework.

DynamicSearchHelper

Build search queries from external input (JSON, request parameters) without writing Java code:

DynamicSearchHelper.search(ctx, "Order", jsonFilter, pageable);

Ideal for generic admin panels, mobile backends, and API gateways.

ValueExpression API

Reference entity properties in a type-safe way:

Q.orders().filter(
ValueExpression.of(Q.orders().amount()).gt(100)
).executeForList(ctx);

ID Generator System

  • Remote ID Generator: Fetch IDs from a remote service
  • Default ID Generator: Local UUID-based fallback
  • Configurable per-entity ID generation strategy

Property Change Events

PropertyChangeEvent tracks which properties changed during an entity update, enabling selective SQL UPDATE and audit logging.

Web Response Framework

  • WebStyle: UI style definitions
  • WebAction: Frontend action descriptors
  • WebResponse: Standardized response objects

Soft Delete

entity.setDeleted(true);  // soft delete
entity.recover(); // restore