ijse

轻量级ORM框架ActiveJDBC介绍

别等时光非礼了梦想. 提交于 2019-12-03 04:33:40
在 OSChina 上看到这款开源轻量级的ORM框架,看了下例子,感觉非常小巧轻量简单。 public class Main { public static void main(String[] args) { new DB("corporation").open("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/test", "root", "p@ssw0rd"); new DB("university").open("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@localhost:1521:xe", "activejdbc", "activejdbc"); Employee.deleteAll(); Student.deleteAll(); Employee.createIt("first_name", "John", "last_name", "Doe"); Employee.createIt("first_name", "Jane", "last_name", "Smith"); Student.createIt("first_name", "Mike", "last_name", "Myers"); Student.createIt("first_name",