MyBatis SQL Viewer Plugin: Features, Installation, and Usage Guide
The MyBatis SQL Viewer plugin for IntelliJ IDEA converts MyBatis XML to executable SQL, offers comprehensive mock data generation, compliance and index checks, execution plans, stress testing, and project‑wide scanning, streamlining CRUD development without repeated application restarts.
MyBatis‑SQL‑Viewer is an IntelliJ IDEA plugin that transforms MyBatis XML files into executable SQL, provides parameter mocking, SQL syntax and compliance checks, index analysis, execution, stress testing, and scanning capabilities.
The plugin addresses common pain points such as frequent application restarts after SQL changes, cumbersome data mocking for related tables, and uncertainty about SQL compliance, index usage, performance, and production‑like data simulation.
Key features include real‑time SQL generation from mapper methods, multiple mock data types (random, name, datetime, integer, etc.), SQL compliance and index checks, execution plans, result preview, and stress testing with configurable concurrency, duration, and value sources.
Installation can be done via the IDEA Marketplace (search “mybatis sql viewer”) or manually by downloading the zip from the releases page and installing from disk.
Usage involves configuring data sources, selecting either MyBatis mode (with mapper‑XML integration) or non‑MyBatis mode (plain SQL), and then using the provided UI tabs (Statement, Result, Stress, Table, Lexicon) to write, execute, mock, and analyze SQL.
Scanning can be performed at file or project level, listing namespaces, methods, and generating corresponding SQL with compliance, index, and execution‑plan information.
Mock data generation supports various types (string, name, datetime, integer, decimal, date, timestamp, time, year, city, url, email, ip, university, phone, lexicon, database, increment, fixed, regex, none) and allows previewing and inserting large batches of mock rows.
Stress testing provides metrics such as success rate, TP99/TP90, max/average RT, max/average TPS, concurrency, errors, and total requests, with visual charts for key indicators.
Configuration is accessible via Preferences → Tools → Mybatis Sql Viewer, and the plugin’s source code is available on GitHub.
SELECT
state
FROM
CITY
WHERE
country_name IN (
SELECT
name
FROM
COUNTRY
WHERE
id IN (1, 2, 3)
)Java Architect Essentials
Committed to sharing quality articles and tutorials to help Java programmers progress from junior to mid-level to senior architect. We curate high-quality learning resources, interview questions, videos, and projects from across the internet to help you systematically improve your Java architecture skills. Follow and reply '1024' to get Java programming resources. Learn together, grow together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.