Unlock instant, AI-driven research and patent intelligence for your innovation.

Configuration method and system based on SQL sentences of MyBatis

A configuration method and statement technology, applied in the field of SQL processing, can solve problems such as increasing development flexibility, cumbersome configuration, and shortening development time

Active Publication Date: 2018-06-05
GUANGDONG EFLYCLOUD COMPUTING CO LTD
View PDF4 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The purpose of the present invention is to propose a configuration method and system for SQL statements based on MyBatis, use the SQL statement parameter analysis function of MyBatis to solve the problem of multiple cumbersome configurations when configuring SQL when using MyBatis, and realize shortened development Time, the effect of increasing development flexibility and improving development efficiency

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Configuration method and system based on SQL sentences of MyBatis
  • Configuration method and system based on SQL sentences of MyBatis

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and through specific implementation methods.

[0031] A method for configuring a SQL statement based on MyBatis, comprising a MyBatis framework 1, a core configuration file 2, a mapping configuration file 3 and a database 4, including the process in which the MyBatis framework 1 operates on the database 4, such as figure 1 Shown:

[0032] Step A: Introduce the driver of the MyBatis framework 1 dependent library and the database 4 in the java project;

[0033] Step B: writing the core configuration file 2;

[0034] Step C: Create the mapping configuration file 3, the mapping configuration file 3 transmits the SQL statement as a parameter into the MyBatis framework 1, and the MyBatis framework 1 performs parameter analysis on the SQL statement and performs operations on the database 4 ;

[0035] Step D: According to the different types of the d...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a configuration method and system based on SQL sentences of Mybatis. The system includes a MyBatis framework, a core configuration file, a mapping configuration file and a database. The method includes a process that the MyBatis framework operates the database. The process includes the steps of introducing a MyBatis framework dependence base and a drive of the database in ajava project; programming the core configuration file; creating the mapping configuration file, wherein the mapping configuration file adopts the SQL sentences as parameters to be transmitted into the MyBatis framework, and the MyBatis framework carries out parameter parsing on the SQL sentences and executes an operation on the database; according to different types of databases, creating different SQL sentences through IDs, reading and executing the configured SQL sentences, and obtaining a result at last. The method and system solve the problem that during application of the MyBatis, complex configuration needs to be carried out in multiple parts when SQL is configured. The effects of shortening the development time and improving development flexibility and development efficiency are achieved.

Description

technical field [0001] The invention relates to the technical field of SQL processing of the MyBatis framework, in particular to a configuration method and a system of SQL statements based on MyBatis. Background technique [0002] MyBatis is a Java-based persistence layer framework that supports custom SQL, storage procedures, and advanced mapping. MyBAtis avoids almost all JDBC code and manually setting parameters and getting result sets. MyBAtis can use simple XML or annotations to configure and map native information, and map interfaces and Java POJOs to records in the database. [0003] In the process of using MyBAtis, every time you use a new SQL statement, you need to check whether there is a corresponding mapping file and the entity class corresponding to the data table. If not, you need to create it, and configure SQL and Related settings, the configuration process is very cumbersome. Contents of the invention [0004] The purpose of the present invention is to ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/41G06F17/30
CPCG06F8/427G06F16/2433
Inventor 黄劲聪黄衍博叶浩斌黄燕飞
Owner GUANGDONG EFLYCLOUD COMPUTING CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More