MyBatis dynamic statements where/if, set, trim, choose/when/otherwise, foreach tag, and sql fragments

1. Environment preparation 1. Prepare the database and insert data CREATE TABLE `t_emp` ( emp_id INT AUTO_INCREMENT, emp_name CHAR(100), emp_salary DOUBLE(10, 5), PRIMARY KEY (emp_id) ); INSERT INTO `t_emp`(emp_name,emp_salary) VALUES(“tom”,200.33); INSERT INTO `t_emp`(emp_name,emp_salary) VALUES(“jerry”,666.66); INSERT INTO `t_emp`(emp_name,emp_salary) VALUES(“andy”,777.77); 2. Write entity classes package com.suchuanlin.pojo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class […]

(02) Cartographer source code analysis without dead ends-(85) Pure positioning mode, sub-graph trimming PureLocalizationTrimmer and PoseGraph2D::TrimmingHandle

Explain the summary link of a series of articles about slam: the most complete slam in history starts from scratch, and explain (02) Cartographer source code without dead ends analysis for this column – the link is as follows: (02) Analysis of Cartographer source code without dead ends – (00) Directory_ Latest explanation without dead […]

How to Precisely Trim Videos Using FFmpeg

?1. Problem description 1.1 Background Previously, I did secondary development based on ffmpeg, completed common video processing functions, and used the ffmpeg command line as a cover. On this basis, a transcoding access and scheduling system is also provided to provide external services. There is a function that needs to be like this: quickly crop […]

Installation and use of TrimGalore software

Table of Contents Installation and use of TrimGalore software 1. Software installation Install dependent software fastqc Install dependent software cutadapt Install TrimGalore 2. Example of use Rawdata download fastqc quality control TrimGalore filter Detailed parameters Result files (four files for each end reads) Installation and use of TrimGalore software Packaging for FastQC and Cutadapt. Applicable […]

C# Replace(), Trim(), Split(), Substring(), IndexOf(), LastIndexOf() functions

Directory 1. Replace() 2. Trim() 3. Split() 4. Substring() 5. IndexOf() 6. LastIndexOf() 1. Replace() In C#, Replace() is a string method used to replace a specified character or substring with another character or string. The following are some common usages and sample codes of the Replace() method: Replace one character in a string with […]

<trim> tag of MyBatis dynamic SQL

Introduction It is mentioned in the article Where tag of MyBatis dynamic SQL: In the case of the if tag and the choose-when-otherwise tag, a condition ‘1=1’ is added to the SQL statement, which not only ensures the success of the condition after where, but also avoids that the first word after where is and […]

MyBatis<3>: The use of dynamic SQL<if><trim><where><set><foreach>

Dynamic SQL is one of the powerful features of MyBatis, which can complete different SQL splicing under different conditions. Refer to the official document: https://mybatis.org/mybatis-3/zh/dynamic-sql.html tag Looking at this scene, there are required fields and non-required fields. When the field is not sure whether it is passed in, how does the programmer implement it? insert […]