Mybatis paging
Preface
Paging can be said to be a very common function. Most mainstream databases provide physical paging methods, such as Mysql's limit keyword, Oracle's ROWNUM keyword, etc.; as an ORM framework, Mybatis also provides paging functions. Next, the paging functions of Mybatis are introduced in detail.
RowBounds page
1. Introduction to rowb ...
Posted by pankirk on Tue, 10 Dec 2019 11:49:56 -0800
General paging of hibernate
First of all, look at a business requirement: fuzzy query data by book name and paging function. Usually, you can write the query method as follows, but it is troublesome if there are many query dimensions.
A new BaseDao is written to deal with this problem. The BaseDao code is as follows:
package com.zking.eight.util;
import j ...
Posted by kporter.porter on Mon, 09 Dec 2019 16:28:17 -0800
Magic SQL Join Table Details_MySQL JOIN Execution Process
a moment of fun
Me: Hey, madam, there's Iced Black TeaMadame: YesMe: How much is a bottleEmpress: 3 piecesMe: Give me a bottle, give it, three piecesMadame: Come on, your iced black teaMe: Play, I want Iced Black tea. Do you want a cap for me?Mrs. Boss: This is another bottle. My family is sold out. Go to the next house and have a change.
Q ...
Posted by fansphp on Mon, 09 Dec 2019 08:22:15 -0800
Words randomly connect three phrases
In the technical forum, I saw a question like this:
Now I have a table. There are 100 different words in it. Each word corresponds to about 20 phrases. I want to get 3 phrases randomly for each word through sql. How can I write it?
I feel that the subject matter is very novel and the angle is very tricky. I haven't met similar needs in the in ...
Posted by johnsiilver on Mon, 09 Dec 2019 05:56:19 -0800
Installation and use of percona Toolkit
1. For the installation of percona toolkit, please refer to: https://blog.csdn.net/yuanyk1222/article/details/100066788
2. Here are some uses of this tool:
pt-online-schema-change
The function can organize the table structure online, collect fragments, and add fields and indexes to large tables. Avoid blocking read and write operations by lo ...
Posted by btubalinal on Sun, 08 Dec 2019 17:14:52 -0800
Deep understanding of MDL metadata locks
Foreword:
When you execute a SQL in MySQL, the statement is not completed within the time you expect. We usually log in to the MySQL database to see if something is wrong. One of the commands we usually use is show processlist to see which session s are there and what they are doing.When you see waiting for table metadata lock, you encounter an ...
Posted by MytHunter on Sun, 08 Dec 2019 15:15:07 -0800
Traditional way and plug-in way realize paging function pageHelper plug-in respectively
Implement paging: there are two ways: traditional paging and classification based on pageHelper plug-in. The latter is recommended
First, create a pageUtil tool manually to record all kinds of information of paging, and then use the tedious way to call data
pageUtil class can be customized as required
package com.imooc.project.util;
/**
...
Posted by lwq on Sun, 08 Dec 2019 07:44:01 -0800
PHP MySQL series functions
How to connect a mysql database with mysqli series functions?
1. PHP mysqli connect() function: mysqli connect() function opens a new connection to MySQL server.
Syntax: mysqli connect (host (specify host name or IP address), username(mysql user name), password(mysql password), dbname (default database))
Open a new connection to the MySQL se ...
Posted by healthnut on Sun, 08 Dec 2019 04:30:37 -0800
MySql table partition (based on datetime)
timestamp type partition, please move = > MySql table partition (based on time timestamp)Environmental Science:MySQL 8.0.18 (unverified for 5.6 and 5.7)The field type of partition condition is datetimeThe complete sql operation table partition statement is as follows:
-- 1.Delete table
drop table t_test;
-- ============================== ...
Posted by Brokenhope on Sun, 08 Dec 2019 03:47:37 -0800
Feel different CRUD with expression tree
Intro
Recently, there is an idea that if you want to do something similar to ORM without writing sql statements, you can parse the expression tree, generate the sql statements to be executed, and finally execute the sql statements to return the corresponding results.
Train of thought analysis
The common sql statements basically have a certain m ...
Posted by rsmarsha on Fri, 06 Dec 2019 15:08:38 -0800