java-do

Map SQL column types to Java DO field types during file generation.

36|10|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/jie023/trae-setting --skill java-do
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-do
Source: https://github.com/jie023/trae-setting/tree/main/skills/java-do
Command: npx skills add https://github.com/jie023/trae-setting --skill java-do

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes the mapping from common SQL data types to Java DO field types, enabling consistent generation of DO classes from database schemas.

Core Features & Use Cases

  • Standard type mappings for varchar/char to String, int/tinyint/smallint to Integer, bigint to Long, decimal to BigDecimal, text types to String.
  • Special-field handling guidance (ignore auto_increment, create_time/update_time, and logic for composite keys) and annotation hints.
  • Use Case: When generating DO files from a SQL table, apply these mappings to ensure correct Java types and nullability.

Quick Start

Use this skill during DO file generation from SQL definitions. For example, mapping a table with columns id int, amount decimal(10,2), name varchar(255) results in fields: id -> Integer, amount -> BigDecimal, name -> String.

Frequently Asked Questions about java-do

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I map SQL column types to Java DO field types?

Special-field handling for DO generation involves ignoring auto_increment fields and applying specific logic for composite keys. Annotation hints guide the correct nullability and constraint mapping during SQL to Java DO transformation.

What is the correct Java type for decimal and text SQL columns in DO classes?

Yes, nullability is handled during SQL to Java DO type conversion by applying concrete conversion rules based on column constraints. This ensures generated DO fields reflect the correct nullability and precision from the original schema.

What is the best way to generate Java DO files from database schemas?

Special-field handling for DO generation involves ignoring auto_increment fields and applying specific logic for composite keys. Annotation hints guide the correct nullability and constraint mapping during SQL to Java DO transformation.

How do I handle auto_increment and composite keys in Java DO generation?

Handling auto_increment and composite keys in Java DO generation requires ignoring auto_increment fields and applying specific logic for composite keys. Annotation hints provide guidance for maintaining consistency across generated DO classes.

Can I use this SQL to Java type mapping for tables with precision constraints?

Yes, this SQL to Java type mapping applies to tables with precision constraints, such as decimal(10,2) mapping to BigDecimal. It handles typical schema constraints during DO file generation to ensure correct Java types and nullability.