atitit.orm的缺點與orm架構市場佔有率,選型attilax總結,ormattilax

來源:互聯網
上載者:User

atitit.orm的缺點與orm架構市場佔有率,選型attilax總結,ormattilax

atitit.orm的缺點與orm架構市場佔有率,選型attilax總結

 

1. attilax的orm架構要求 1

2. orm架構市場佔有率 2

3. spring jdbc templt 3

4. eclipselink /toplink  不好用 4

5. jooq 的總結 4

6. attilax的選擇 atiorm 4

7. 參考 4

 

1. attilax的orm架構要求

 

1.無需設定檔或註解。。直接從map、json產生sql

2.直接擷取sql。。無需串連資料庫。。方便調試。或這sql傳輸。

 

作者:: 老哇的爪子 Attilax 艾龍,  EMAIL:1466519819@qq.com

轉載請註明來源: http://blog.csdn.net/attilax

 

2. orm架構市場佔有率

 

orm frameworks in use

hb 67

jdbc  22

spring jdbc template 20

eclipselink 13

mybatis 7

jooq 2

 

datasource:::REBELLABS (  WEBSITE RESEARCH )

結論。
但無論如何,僅僅就使用ORM架構而言,樓主大可放心去學習,不用擔心時間成本的問題,不會佔太多時間的

 

 

3. spring jdbc templt

2、使用NamedParameterJdbcTemplate類,實現JDBC,參數是用Map集合傳遞的

·    @Override  

·      public void insert(User entity) {  

·          // TODO Auto-generated method stub  

·          String sql="insert into user(name,age,sex) values(:name,:age,:sex)";  

·          Map<String,Object> map=new HashMap<String,Object>();  

·          map.put("name", entity.getName());  

·          map.put("age", entity.getAge());  

·          map.put("sex", entity.getSex());  

·          int temp=npjt.update(sql, map);  

·          if(temp>0){  

·              System.out.println("插入成功!");  

·          }else{  

·              System.out.println("插入失敗!");  

·          }  

·      }  

 

·    @Override  

·      public void update(User entity) {  

·          // TODO Auto-generated method stub  

·          String sql="update user set name=:name,age=:age,sex=:sex where id=:id";  

·          Map<String,Object> map=new HashMap<String,Object>();  

·          map.put("name", entity.getName());  

·          map.put("age", entity.getAge());  

·          map.put("sex", entity.getSex());  

·          map.put("id", entity.getId());  

·          int temp=npjt.update(sql, map);  

·          if(temp>0){  

·              System.out.println("更新成功!");  

·          }else{  

·              System.out.println("更新失敗!");  

·          }  

·      }  

 

4. eclipselink /toplink  不好用5. jooq 的總結

 

1. create.select(T_AUTHOR.FIRST_NAME, T_AUTHOR.LAST_NAME, count())  

2.       .from(T_AUTHOR)  

3.       .join(T_BOOK).on(T_BOOK.AUTHOR_ID.equal(T_AUTHOR.ID))  

4.       .where(T_BOOK.LANGUAGE.equal("DE"))  

5.       .and(T_BOOK.PUBLISHED.greaterThan(parseDate('2008-01-01')))  

6.       .groupBy(T_AUTHOR.FIRST_NAME, T_AUTHOR.LAST_NAME)  

7.       .having(count().greaterThan(5))  

8.       .orderBy(T_AUTHOR.LAST_NAME.asc().nullsFirst())  

9.       .limit(1, 2)  

10.       .forUpdate();  

jooq使用ide會方便。。但是不能自動map json to ,所以,還是麻煩。

6. attilax的選擇 atiorm

看起來spring temple最好使用...使用累掛三,好香要事務才能使用了...馬transac,走不能儲存...

 

子好嘎自orm蘭..

 

7. orm的優點在介面使用中

直接提供的走十json的介面,,直接轉換成個orm走十好用啊..

8. 參考

Spring中使用JDBC做的增刪改查 - - ITeye技術網站.htm

 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.