Hint
This article is generated by AI translation.
Name Sensitivity
Some databases treat users and USERS as different tables. Use caseInsensitive or useDelimited to handle these cases in dbVisitor.
Case sensitivity
If your database allows multiple columns that differ only by case, enable case sensitivity on result sets; otherwise they collapse into one.
select
AGE, // 列1,名称为大写
age // 列2,名称为小写
from Users;
@Table(caseInsensitive = false)
public class Users {
@Column("age")
private Integer age1; // Maps to column age
@Column("AGE")
private String age2; // Maps to column AGE
...
}
Reserved words
Set useDelimited to add delimiters when the Fluent API generates SQL, avoiding conflicts with reserved words.
@Table(useDelimited = true)
public class Users {
...
private Integer index;// Maps to column index; reserved in MySQL
...
}
dbVisitor already handles many database keywords automatically and will add delimiters when detected.
You can extend the keyword list by adding /META-INF/custom.keywords to the classpath, one keyword per line. dbVisitor loads them at startup.
Supported databases
- IBM DB2, Derby, DM, H2, Hive, HSQL, Impala, Informix, MySQL, Oracle, PostgreSQL, SQLite, SQL Server, Xugu
- Keywords live in
META-INF/db-keywords/*.keywords.