Skip to main content

Dynamic SQL: Rules and XML Compared

Dynamic SQL can be expressed with XML tags or written directly in SQL using dbVisitor rules. Both approaches require clear semantics for condition activation, parameter binding, and empty collections. This article covers common rule patterns and explains which forms are not interchangeable.

Unifying the Database Dialect Layer

As dbVisitor expanded from RDBMS to NoSQL, the dialect system's abstractions became fragmented. This post explains a deep architectural refactoring that unifies dialect metadata and command building into a cohesive design — no functional changes, pure structural improvement.

Inside dbVisitor's Two-Layer Adapter

dbVisitor's "Two-Layer Adapter" unifies RDBMS and NoSQL access through two abstractions: Layer 1 — a unified API (LambdaTemplate / Mapper) hiding syntax differences; Layer 2 — JDBC-compliant drivers wrapping NoSQL protocols. Use the full stack, or integrate the driver with an existing MyBatis project after checking its required JDBC capabilities.

MongoDB the MyBatis Way

In hybrid projects with both MySQL and MongoDB, the data access layer often feels fragmented — MyBatis Mapper on one side, MongoTemplate on the other. dbVisitor lets you operate MongoDB using the same Mapper interfaces and XML, achieving a unified architecture.