In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "weed3-2.6. what is the inventory of the four interfaces". The explanation in the article is simple and clear and easy to learn and understand. now please follow the editor's train of thought to study and learn "weed3-2.6. what is the inventory of the four interfaces?"
Weed3 A miniature ORM framework
Source code: https://github.com/noear/weed3 source code: https://gitee.com/noear/weed3
1. Mapper () execution: get the mapping agent
This is the interface that will be explained in more detail later, to support xml sql and annotation sql.
UserDao ud = db.mapper (UserDao.calss); ud.getUser (12); II. Table () execution: chain ORM operation
Here is a little bit (this interface is mainly talked about earlier)
3. Call (..) Execute: stored procedure or query procedure / execute stored procedure db.call ("user_get"). Set ("_ user_id", 1). GetMap (); / execute query procedure (as I temporarily call it) db.call ("select * from user where id=@user_id"). Set ("@ user_id", 1) .getMap (); IV, sql (..) Execute: SQL statement db.sql ("select * from user where id=?", 1) .getMap ()
Db.sql (..) There is also an express version: db.exe (..). Equivalent to: db.sql (...). Execute (); / / when batch processing, you can quickly write add, delete, and change actions example: db.exe ("DELETE FROM test where aplomb 1")
Unified return: IQuery (ensures the unity of the experience)
Db.table (..) .select (..)-> IQuery
Db.call (..)-> IQuery
Db.sql (..)-> IQuery
Public interface IQuery extends ICacheController {long getCount () throws SQLException; Object getValue () throws SQLException; T getValue (T def) throws SQLException; Variate getVariate () throws SQLException; Variate getVariate (Act2 cacheCondition) throws SQLException; T getItem (T model) throws SQLException; T getItem (T model, Act2 cacheCondition) throws SQLException; List getList (T model) throws SQLException; List getList (T model, Act2 cacheCondition) throws SQLException; T getItem (Class cls) throws SQLException T getItem (Class cls,Act2 cacheCondition) throws SQLException; List getList (Class cls) throws SQLException; List getList (Class cls,Act2 cacheCondition) throws SQLException; DataList getDataList () throws SQLException; DataList getDataList (Act2 cacheCondition) throws SQLException; DataItem getDataItem () throws SQLException; DataItem getDataItem (Act2 cacheCondition) throws SQLException; List getMapList () throws SQLException; Map getMap () throws SQLException; List getArray (String column) throws SQLException; List getArray (int columnIndex) throws SQLException Thank you for your reading. This is weed3-2.6a. What is the inventory of the four major interfaces? after the study of this article, I believe that you are interested in weed3-2.6. The question of what is the inventory of the four major interfaces has a deeper understanding, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.