Mybatis -- optimize configuration file based on annotation CR

This article mainly focuses on the optimization of write configuration files, such as jdbc.properties configuration file, files introduced into database, such as driver,url,username,password, etc., and then introduce the corresponding file in SqlMapConfig.xml to simplify the configuration file. In SqlMapConfig.xml, use < typealiases > &lt ...

Posted on Fri, 01 May 2020 15:14:59 -0700 by aaadee

Oracle foundation 5-PL/SQL

1, PLSQL programming language 1. Concept: Procedure Language/SQL,ORACLE's extension to sql; 2. Program structure:   declare --Description part variable description, cursor description, exception description begin --Statement sequence DML Sentence exception --Exception handling statement end; / 3. Description of variables and constants:  va ...

Posted on Fri, 01 May 2020 11:09:12 -0700 by jeger003

Some suggestions on writing high quality SQL

1. Try not to use select * to query SQL, but select specific fields. Counter example: select * from employee; Positive example: selectid,namefrom employee; reason: Only take the required fields, save resources and reduce network overhead. When select * is used for query, it is likely that the overwrite index will not be used, r ...

Posted on Thu, 30 Apr 2020 19:55:20 -0700 by adi

[java operation mysql] java connects mysql database and queries data

It's inevitable to deal with the database in java development, so here's an article about connecting mysql with jdbc, The main contents include: 1. java connect mysql 2. java queries mysql data. 3. java inserts mysql data. 4. java updates mysql data. 5. java deletes mysql data. 6. java executes mysql stored procedures. ide: IntelliJ IDEA201 ...

Posted on Thu, 30 Apr 2020 19:11:38 -0700 by Gugel

Install and configure Oracle12c in Docker and realize data persistence

Install and configure Oracle12c in Docker and realize data persistence Press install Docker Ce in ubuntu Getting oracle image information in docker $ docker search oracle Select the image and pull it into the system. Make sure to configure acceleration first, or it will be super slow eric@userver:~$ docker pull sath89/oracle-12c Using d ...

Posted on Thu, 30 Apr 2020 16:27:56 -0700 by jrd

Using SpecificationBuilder to simplify the dynamic query of Spring Data Jpa

SpecificationBuilder See source code Github Existing problems Suppose there is a domain with the following fields: * Long id * String name * Integer age * String school * LocalDateTime birthday If we want to make a dynamic query that supports matching by logo (accurate), age (accurate), school (batch), birthday (interval), and name ...

Posted on Thu, 30 Apr 2020 05:19:03 -0700 by why2k

Sample PreparedStatement usage code in JDBC

In order to prevent the user from using sql statements to inject and attack the database, the sub interface of the Statement interface can be used java.sql.PreparedStatement extends Statement This interface represents the object of the precompiled SQL statement, which is precompiled and stored in the PreparedStatement object. You can then use ...

Posted on Thu, 30 Apr 2020 05:14:46 -0700 by Spekta

shell script 14: Enterprise case

14. Enterprise Actual Warfare Cases (1) Use the for loop to create 10 html files in batch in the / oldboy directory, where the file name contains 10 random lowercase letters to reinforce the fixed string 0ldoby. Idea analysis to generate random numbers: The core is to create 10 random lower case letters. Method 1: echo $RANDOM range is 0-32767 ...

Posted on Wed, 29 Apr 2020 09:37:56 -0700 by kparker

ProxySQL official file translation

20_Mirroring Note: during the writing time of the article from April 201904 to may 201905, subsequent official updates in github were not written ~~Mirroringbe careful:1) Its rules can be changed at any time;2) It does not support prepare statements; 1, Extensions to MySQL query rules Modify MySQL query rules table and add 2 columns:1) mirror_ ...

Posted on Tue, 28 Apr 2020 04:27:53 -0700 by Hebbs

gorm series - create record and field defaults

Catalog Gorm create record and field defaults Establish Default Using pointer to save zero value into database Using Scanner/Valuer interface to store zero value into database Gorm create record and field defaults CRUD usually refers to the operation of adding, deleting, modifying and querying the database Establish package main import ( ...

Posted on Mon, 27 Apr 2020 08:46:32 -0700 by Vasko