Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Ibatis-based SQL script dynamic loading method

A dynamic loading and scripting technology, applied in special data processing applications, instruments, electrical digital data processing, etc., can solve the problems caused by code and transaction conflicts, conflicts between centralized management and modular development, and inability to automatically identify different databases, etc. , to achieve easy management and improve system performance

Inactive Publication Date: 2012-06-27
上海明想电子科技有限公司
View PDF1 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] (1) There must be only one sqlmapConfig configuration file, which configures all sqlmap files that need to access the database, and there is a conflict between centralized management and modular development;
[0005] (2) During project development, multiple people jointly maintain this sqlmapConfig file, and code submission is likely to cause conflicts;
[0007] (4) Different databases cannot be automatically identified, and the sqlmap file corresponding to the database type is loaded

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
  • Ibatis-based SQL script dynamic loading method
  • Ibatis-based SQL script dynamic loading method
  • Ibatis-based SQL script dynamic loading method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0018] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0019] figure 2 It is a schematic diagram of the dynamic loading process of the SQL script based on ibatis in the present invention.

[0020] See figure 2 , the SQL script dynamic loading method based on ibatis provided by the present invention comprises the following steps: a) configure a plurality of independent sql configuration files, and uniformly set the cache area of ​​all sql configuration files; b) when the script caller searches for sql information, First go to the cache to read the sql script configuration information, if it exists, the startup program will automatically load the corresponding sql configuration file to the cache, otherwise an exception will be thrown, prompting an error, and the matching sql configuration file will be searched to update the cache; c) load Then remove the file information from the sql configuration file; 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 an ibatis-based SQL script dynamic loading method. The method comprises the following steps of: a) configuring multiple independent SQL configuration files, and uniformly setting the cache regions of all the SQL configuration files; b) when a script calling party searches the SQL information, firstly, reading the SQL configuration information from the cache region, if the SQL script configuration information exists, starting a program to automatically load the corresponding SQL configuration file to the cache region, otherwise, searching the SQL configuration and updating the cache region; c) removing the file information from the SQL configuration file after loading; d) finally, reading corresponding SQL script information from the cache region, and returning the read SQL script information to the calling party. In the ibatis-based SQL script dynamic loading method provided by the invention, multiple independent SQL configuration files are configured and corresponding configuration files are loaded as needed, thus, a master control SQL configuration file is saved, which is easy for management and realizing modularized development, and improves system performance.

Description

technical field [0001] The invention relates to a method for dynamically loading SQL scripts, in particular to a method for dynamically loading SQL scripts based on ibatis. Background technique [0002] At present, the database access methods in the Java field are widely used, mainly hibernate and iBATIS, both of which are open source software. The word iBATIS comes from the combination of "internet" and "abatis", and is an open source project initiated by Clinton Begin in 2001. Initially focused on the development of cryptographic software, it is now a Java-based persistence layer framework. The persistence layer framework provided by iBATIS includes SQL Maps and Data Access Objects (DAO), and also provides a JPetStore instance developed using this framework. Compared with "one-stop" ORM solutions such as Hibernate and Apache OJB, ibatis is a "semi-automated" ORM implementation. The so-called "semi-automated" refers to the "full-automatic" ORM implementation that provide...

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): G06F17/30
Inventor 杨飞
Owner 上海明想电子科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products