Skip to main content

2 posts tagged with "mssql"

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

Multi-Database Support: Oracle, DB2, HANA, MSSQL

· One min read
TeaQL Code Gen
Core Contributor

TeaQL gained four new database backends in a single sprint.

New Databases

+ teaql-oracle: Oracle database support
+ teaql-db2: IBM DB2 support
+ teaql-hana: SAP HANA support
+ teaql-mssql: Microsoft SQL Server support

Each module includes:

  • Database-specific DDL generation (ensureTables)
  • Java ↔ SQL type mapping
  • Custom SQL syntax handling

JdbcTemplate Migration

Migrated from raw JDBC to Spring JdbcTemplate for better resource management, connection pooling, and exception handling.

MySQL Improvements

  • tinyintBoolean mapping
  • intInteger mapping
  • timestampLocalDateTime mapping
  • GBK charset ORDER BY sorting fix
  • Semicolon handling fix

Oracle Customizations

  • Primary table INNER JOIN, auxiliary table LEFT JOIN
  • Partition fix
  • Column label handling

Pagination

Native pagination with page and pageSize:

Q.orders()
.filter(Q.orders().status().eq("ACTIVE"))
.page(1, 20)
.executeForList(ctx);