Skip to content

SQLJ in large projects (and what changes with the plugin)

This page is for teams maintaining a large, established SQLJ codebase, and for evaluators deciding whether IDE assistance is worth introducing. It describes what working on SQLJ in a big project looks like without plugin support, what the SQLJ plugin changes in daily work, and what honestly remains with your translator, build and database pipeline.

Large SQLJ codebases usually share a few traits: SQLJ sources sit next to a large Java codebase, iterator declarations and host variables connect both languages, schemas evolve under many hands, and the translator runs late in the build. None of this is a problem for the compiler. It is a problem for the person editing the file.

Day to day without IDE support

1. SQLJ parts inside Java are invisible to the IDE

Without the plugin: IntelliJ treats .sqlj files as plain text. Java that calls SQLJ classes shows unresolved references, imports cannot be fixed with a quick-fix, and any error in the SQLJ half of the codebase is discovered only when the translator runs - often minutes later, often in CI, not while editing. Developers keep a second window with the translated .java files open, or search by hand.

With the plugin: .sqlj files open as first-class Java. Members, imports and call sites resolve without a translation run; errors appear while typing, with quick-fixes where the situation is unambiguous. See editor features.

Boundary: the plugin does not translate, compile or bind. The translator remains the build authority for semantics that require a database or runtime.

2. Iterator and column names live only in your head

Without the plugin: iterator accessors (iter.title(), iter.next()) and host-variable names have no completion, no navigation and no rename support. In a project with dozens of iterators, developers copy accessors from other files or from memory. A wrong accessor name is, again, a translator error found late - or worse, a change to the SQL text that silently stops matching the iterator declaration.

With the plugin: named and positional iterator accessors, modeled context members and host variables complete from the declaration, and Ctrl+B navigates to them, including nested declarations. Renames of modeled references are supported with preview; cross-language rename coverage is documented honestly in editor features.

3. Refactorings are disproportionately expensive

Without the plugin: a rename that touches SQLJ means a manual search across .java and .sqlj, editing by hand, then a full translator run to see what broke. On a large codebase this makes developers avoid renames altogether - names drift, duplication grows, and the codebase gets harder to read over the years. This cost is invisible in any report because it is paid in small increments, every week.

With the plugin: navigation between Java callers and SQLJ declarations works in both directions, modeled references rename with preview, and Java errors surface immediately instead of at the next build. Find Usages and cross-language rename cover the modeled cases; the limits are listed in the editor features so you can evaluate exactly what applies to your code.

4. Iterator-field and database-column types drift apart

Without the plugin: the Java type of an iterator accessor and the DB2 column type it receives are connected only at runtime. A column changed from SMALLINT to INTEGER, or DECIMAL precision adjusted, does not break anything visibly. The mismatch surfaces as a conversion surprise in production logs, or as a translator warning nobody connected to the actual read site.

With the plugin: modeled iterator and context members carry Java types into the editor, so assignment mismatches are flagged at the read site while editing. Schema-aware assistance - with the plugin's schema settings or the IDE's database tooling - adds table/column completion and inspections inside #sql blocks. The translator and the database remain authoritative; the plugin moves discovery from "run and see" to "see while typing".

What stays with your build

The plugin is editor and debugger assistance. Translation, binding, customization, deployment and privileges remain in your existing Maven/build pipeline; the plugin never rewrites an established build. This is deliberate: a large project cannot afford an IDE tool that changes what CI produces. See capabilities and compatibility and build tool integration.

Evaluating in a large project

  1. Try the wizard demo to see editor, completion and debugging behavior on a small, self-contained project.
  2. Import one real module as a Maven project, register the .sqlj source root and your translator-compatible runtime, and compare editor feedback with your current workflow: existing-project setup.
  3. Walk through the debugging setup with one real configuration; source-map debugging is where most teams feel the difference first.
  4. Hand administration and deployment to your platform team for rollout, entitlement and update planning.

Summary

Pain without IDE support What the plugin changes Where it does not help
Errors found at translator/CI run Errors while typing, quick-fixes Translation, binding, deployment
No completion for iterators/host variables Completion and navigation from declarations Non-modeled SQL text semantics
Manual cross-language renames Modeled rename with preview, bidirectional navigation Unrestricted cross-language Find Usages
Iterator/DB type drift found late Type-aware reads in the editor; schema assistance with database tooling Live database validation of every statement

For scope and limits in detail, see capabilities. For questions, use troubleshooting and support.