A kind of SQL parser and method

A parsing method and parser technology, applied in the direction of instruments, structured data retrieval, calculation, etc., can solve the problems of limited application scope, low parsing efficiency of SQL parser, inability to modify the content of parser, etc., to improve the scope of application. Effect

Active Publication Date: 2020-09-04
CHINA MOBILE GROUP ZHEJIANG +1
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] An object of the embodiments of the present invention is to solve the problems in the prior art that the SQL parser has low parsing efficiency due to the development of the SQL parser for a specific large-scale project, and cannot modify the content of the parser, resulting in a limited application range

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
  • A kind of SQL parser and method
  • A kind of SQL parser and method
  • A kind of SQL parser and method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] The embodiment of the present invention provides a SQL parser, such as figure 1 As shown, the SQL parser includes: an input interface module 1, a SQL analysis engine 2, and an output interface module 3; the input interface module 1 is in communication connection with the SQL analysis engine 2, and the output interface module 3 is in communication connection with the SQL analysis engine 2. among them,

[0042] The input interface module 1 is used to map the received multi-type data into a data stream in a preset format according to a preset conversion rule, and send it to the SQL parsing engine 2;

[0043] The SQL parsing engine 2 is used to sequentially process the data stream in the above preset format into a character stream, a format file and an abstract syntax tree object, and send it to the output interface module 3;

[0044] The output interface module 3 is used to map the above-mentioned abstract syntax tree object into a data stream output of the required type.

[0045]...

Embodiment 2

[0056] The embodiment of the present invention provides a SQL parsing method, which is implemented based on the SQL parser described in the first embodiment, such as figure 2 As shown, the method includes:

[0057] S1. The input interface module is used to map the received multi-type data into a data stream in a preset format according to a preset conversion rule, and send it to the SQL parsing engine;

[0058] S2. The SQL parsing engine is used to sequentially process the data stream in the above preset format into a character stream, a format file and an abstract syntax tree object, and send it to the output interface module;

[0059] S3. The output interface module is used to map the abstract syntax tree object into a data stream output of the required type.

[0060] Such as image 3 As shown, in step S1 of the embodiment of the present invention, the input interface module receives common types of data such as text and host program interface. When multiple types of data are recei...

Embodiment 3

[0067] Figure 4 The structural block diagram of the SQL parsing device in the third embodiment of the present invention is shown. Reference Figure 4 , The SQL parsing device includes: a processor (processor) 401, a memory (memory) 402, a communication interface (Communications Interface) 403, and a bus 404;

[0068] among them,

[0069] The processor 401, the memory 402, and the communication interface 403 communicate with each other through the bus 404;

[0070] The communication interface 403 is used for information transmission between the communication devices of the SQL analysis device;

[0071] The processor 401 is configured to call program instructions in the memory 402 to execute the methods provided in the foregoing method embodiments, for example, including: an input interface module for mapping the received multiple types of data according to preset conversion rules It is a data stream in a preset format and sent to the SQL parsing engine; the SQL parsing engine is us...

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 embodiment of the invention discloses an SQL (Structured Query Language) resolver and method. The device comprises an input interface module, an SQL parsing engine and an output interface module,wherein the input interface module, the SQL paring engine and the output interface module are in communication connection in sequence; the above input interface module is used for mapping received multiple types of data into a data stream of a preset form according to a preset conversion rule, and sending to the SQL parsing engine; the SQL parsing engine is used for processing the data stream of the above preset format into a grapheme stream, a format file and an abstract syntax tree object in sequence, and sending to the output interface module; and the output interface module is used for mapping the abstract syntax tree object into a required type of data stream to be output. The method is realized on the basis of the above device. The resolver and the method can be in loose coupling connection with other large-scale projects, and SQL can be independently operated for parsing. In addition, the resolver and the method can be integrated to an API (Application Program Interface) so as to bring convenience for the SQL resolver to be subjected to seamless connection with other applications, and a parsing result is quickly shown.

Description

Technical field [0001] The embodiment of the present invention relates to the field of database technology, in particular to a SQL parser and method. Background technique [0002] With the continuous development of database business, database development requirements are also changing with each passing day, and SQL statements are becoming increasingly complex. At present, the database business volume is increasing explosively, which requires the database to have better overall performance. However, during database development, the overall performance of the database is poor due to the uneven level of developers and the lack of attention to development specifications, as well as the incomplete maintenance of subsequent SQL. [0003] However, in the process of implementing the embodiments of the present invention, the inventor found that: in order to facilitate SQL examiners to screen out SQL that does not meet the specification, there is a SQL parser in the prior art, and a module ...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/2455G06F16/25G06F40/253G06F40/284
CPCG06F16/24564G06F16/25G06F40/253G06F40/284
Inventor 郭岳张式勤王晓征卢进文
Owner CHINA MOBILE GROUP ZHEJIANG
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products