Skip to content

erikaemma/java_orm_study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Java ORM code for study

Usage:

  1. Add annotation to the table class: Table, Id and Column;
  2. Add a child class for the JdbcUtils class;
  3. Initialization the child class by uri, username, password and parameters array;
  4. Use JdbcUtils#Connection() function to connect to the MySQL database;
  5. You can use insert, updateById, deleteById and selectById;
  6. You can use delete and select function;
  7. NOW you can use setAutoCommit(), commit(), rollback(), rollback(sp) and getSavepoint() to transactional.

Note:

  1. If you MySQL database have used datetime, it can only be converted into String;
  2. It supports int, Integer, double, 'DoubleandString`.
  3. The function select has a parameter where, equals SQL's, but now it is only support =. The delete function also.

Thanks:

This code is mainly referenced 【Java进阶】实现自己的ORM框架.

About

Java ORM without xml configure file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages