In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
DBLayer, my recently open source database lightweight orm framework, currently supports sqlserver, mysql, oracle, especially paged encapsulation.
This framework has been gradually upgraded since seven or eight years ago, and has gone through a lot of projects, hoping to liberate everyone from the sql string.
Open source address
Https://github.com/wutao0315/DBLayer
Access code case
Var id = TheService.InsertEntity (() = > new SysLog () {LogId =-1, LogContentJson = "Test", LogCreater = "Test", LogCreateTime = DateTime.Now, LogType = "1"})
Paging operation
/ paged query / public IEnumerable Seach (SysUserCondition.Search condition) {var page = new Pager () {Condition = condition, Table = "sys_user", Key = "user_id" Order = string.Empty, Field = "*", WhereAction = (Condition, Where, Paramters) = > {if (! string.IsNullOrEmpty (Condition.UserName)) {Where.Append ("AND user_name LIKE @ user_name") Paramters.Add (base.CreateParameter ("@ user_name", string.Concat ("%", Condition.UserName, "%"));} if (! string.IsNullOrEmpty (Condition.UserEmail)) {Where.Append ("AND user_email LIKE @ user_email") Paramters.Add (base.CreateParameter ("@ user_email", string.Concat ("%", Condition.UserEmail, "%"));} if (! string.IsNullOrEmpty (Condition.UserMobile)) {Where.Append ("AND user_mobile LIKE @ user_mobile") Paramters.Add (base.CreateParameter ("@ user_mobile", string.Concat ("%", Condition.UserMobile, "%"));}; var result = base.GetResultByPager (page); return result;}
It is recommended to use it with spring. For more information on configuration code, please see the source code.
At the same time, multiple database connections are configured in spring to support database connection string password encryption. You just need to add the key in passwordKey
The unique identification of the database not only can encode the data automatically, but also supports the automatic generation of GUID and time points on the code side. The following code is uuid, an automatic number generated in time and sequentially
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.