gorm series - Update
Catalog
Gorm update operation
Update all fields
Update modified fields
Update selected fields
No Hooks updates
Batch update
Update with SQL expression
Modify values in Hooks
Other update options
Gorm update operation
Update all fields
Save() updates all fields of the object by default, even if you don't have an assignment.
package main
im ...
Added by deft on Mon, 27 Apr 2020 18:54:52 +0300
MyBatis L2 cache implementation details and precautions
Introduction to L2 cache
In the first level cache mentioned above, the largest sharing range is within a SqlSession. If multiple sqlsessions need to share cache, they need to use the second level cache. After the second level cache is enabled, the cachenexecutor will be used to decorate the Executor. Before entering the query process of the fir ...
Added by sabien on Mon, 27 Apr 2020 12:20:29 +0300
CentOS7 Installation\Uninstall MySQL
1. Download and install MySQL's official Yum Repository
[root@localhost ~]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
Install MySQL Server
root@localhost ~]# yum -y install mysql-community-server
2. MySQL database settings
Start MySQL
[root@localhost ~]# systemctl start mysqld.service
View MySQL r ...
Added by tweet on Sun, 26 Apr 2020 19:48:31 +0300
Search elastic4s search filter mode
Now we can start to explore the core part of es: search. Search has two modes: filter and query. Filter mode is the filter mode: find the records that meet the filter conditions as the results. Query mode is divided into two steps: first filter, and then calculate the similarity of each eligible record. It's just a lot of scoring. If we want to ...
Added by phppaper on Sun, 26 Apr 2020 16:51:34 +0300
Word vector representation: word2vec and word embedding
In NLP tasks, the training data is usually one sentence (Chinese or English), and each step of input sequence data is one letter. We need to preprocess the data: first use the unique heat code for these letters, and then input it into RNN. For example, the letter a represents (1, 0, 0, 0,...) , 0), the letter b is (0, 1, 0, 0 , 0). If only the ...
Added by Garth Farley on Sun, 26 Apr 2020 07:51:24 +0300
Spring entry to see this one enough!!! Not enough to find me!
Today, let's have some good guys. There are some java basics in front of us,
How to say also need to have some frame right, don't say much, Huang sir takes you to open dry!
It's over
Spring framework
1, Spring Brief
Why learn spring?
Advantages of traditional projects: easy to build
Disadvantages of traditional projects: ...
Added by Rob2005 on Sat, 25 Apr 2020 19:20:44 +0300
java jdbc ResultSet results are assigned to Java objects through java reflection
In the case of unconformity framework, when using jdbc to read data from the database, we have to get and set one by one, which is not only tedious but also not concise. So we write a tool class using java reflection mechanism, so it is not so troublesome to use jdbc to get data from the database.
Because in many cases there is more than one p ...
Added by jdpatrick on Fri, 24 Apr 2020 19:05:46 +0300
Java local cache framework series-Caffeine-1. Introduction and use
Caffeine is a high-performance local cache framework based on Java 8. Its structure is basically the same as that of Guava Cache, and its api is also the same. It is basically easy to replace. Caffeine is actually based on Guava Cache, using some new features of Java 8 to improve the performance efficiency in some scenarios.
In this chapter, we ...
Added by paparanch on Fri, 24 Apr 2020 12:56:46 +0300
Security mode of MYSQL: introduction to SQL safe updates
What is safe mode
In mysql, if the where condition is not added to update and delete, all data will be modified. It's not only the developers who are new to MySQL that will encounter this problem, but also the engineers who have some experience will inevitably forget to write where conditions. In order to avoid all data modification and deleti ...
Added by tyler on Thu, 23 Apr 2020 17:03:38 +0300
oracle Operations and Maintenance Personal Common Check Statements
1. Find the most ordered SQL
SQL>
SELECT HASH_VALUE, SQL_TEXT, SORTS, EXECUTIONS FROM V$SQLAREA ORDER BY SORTS DESC;
2. Find the SQL with the most reads and writes on the disk
SQL>
SELECT * FROM (SELECT sql_text,disk_reads "total disk" , executions "total exec",disk_reads/executions "disk/exec"
FROM v$sql WHERE executions>0
and is_o ...
Added by millesm on Tue, 21 Apr 2020 20:37:12 +0300