CN105550206A - Version control method and device for structured query language - Google Patents

Version control method and device for structured query language Download PDF

Info

Publication number
CN105550206A
CN105550206A CN201510870519.XA CN201510870519A CN105550206A CN 105550206 A CN105550206 A CN 105550206A CN 201510870519 A CN201510870519 A CN 201510870519A CN 105550206 A CN105550206 A CN 105550206A
Authority
CN
China
Prior art keywords
version
sql statement
statement
version number
sql
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510870519.XA
Other languages
Chinese (zh)
Other versions
CN105550206B (en
Inventor
陈武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZHUHAI DUOWAN INFORMATION TECHNOLOGY Ltd
Original Assignee
ZHUHAI DUOWAN INFORMATION TECHNOLOGY Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZHUHAI DUOWAN INFORMATION TECHNOLOGY Ltd filed Critical ZHUHAI DUOWAN INFORMATION TECHNOLOGY Ltd
Priority to CN201510870519.XA priority Critical patent/CN105550206B/en
Publication of CN105550206A publication Critical patent/CN105550206A/en
Application granted granted Critical
Publication of CN105550206B publication Critical patent/CN105550206B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1873Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages

Abstract

Embodiments of the invention disclose a version control method for a structured query language. The version control method comprises the following steps of receiving a structured query language SQL storage request, extracting an SQL, version description information and corresponding language identifiers carried in the SQL storage request; allocating increasing version numbers to the language identifiers, and correspondingly storing the language identifiers, the SQL, the version description information and the allocated version numbers in a data list; and receiving an SQL version rollback request, extracting language identifiers and version numbers carried in the SQL version rollback request, and inquiring the SQL and the version description information corresponding to the language identifiers and the version numbers in the data list. The invention also discloses a version control device for the structured query language.The version control method and device for the structured query language disclosed by the invention can be used for controlling the version of the SQL submitted by the list to improve the execution efficiency.

Description

The edition control method of structured query sentence and device
Technical field
The present invention relates to image identification technical field, particularly relate to a kind of edition control method and device of structured query sentence.
Background technology
Along with the development of Internet technology, increasing user data is recorded in the record of server, therefore arises at the historic moment to the large Data Analysis Platform of the user data of server record.And in large data platform in the conventional technology, user uses SQL (StructuredQueryLanguage, Structured Query Language (SQL)) to carry out treatment and analysis as retrieval type to the user data in large data platform usually.But along with the change upgrading that this business demand is follow-up, for same SQL, period may occur repeatedly to revise, and may be different user's amendments in team collaboration, but amendment is below not necessarily correct, at this time just needs that old version is carried out to this SQL and check, contrast and rolling back action.
Version control tool in conventional art uses SVN (abbreviation of Subversion) usually, is the Version Control of an open source code.It for target be file, the background server of SVN is committed to after the file of user changes, the background server of SVN can be each version submitting to generation unique of user, such user, when needs, just can carry out old version inquiry, contrast and rolling back action to corresponding file.
But in large data platform in the conventional technology, what need to carry out Version Control is the structured query sentence that user inputs, and SVN can only act on file, manages FileVersion, can not implement the list submitted at webpage.Therefore, do not provide the method for the list submitted to by webpage being carried out to Version Control in conventional art, can not control the version of the structured query sentence of user's input in large data platform.
Summary of the invention
Based on this, SVN instrument cannot be used to carry out the technical matters of Version Control to the SQL statement by submission of sheet for solving in the above-mentioned conventional art mentioned, spy proposes a kind of edition control method of structured query sentence.
An edition control method for structured query sentence, comprising:
Receive structuralized query SQL statement storage resource request, extract the statement mark of SQL statement, Version Description information and the correspondence that described SQL statement storage resource request carries;
For described statement mark distributes the version number increased progressively, by version number's corresponding stored of described statement mark, SQL statement, Version Description information and described distribution in tables of data;
Receive the request of SQL statement version rollback, extract statement mark and version number that the request of described SQL statement version rollback carries, inquiry and the SQL statement that described statement identifies and version number is corresponding and Version Description information in described tables of data.
Wherein in an embodiment, the step of the statement mark of the SQL statement that the described SQL statement storage resource request of described extraction carries and correspondence comprises:
Obtain the page iden-tity of the page corresponding to described SQL statement storage resource request and the object identity of page object corresponding in the described page;
The statement mark that the SQL statement of page iden-tity and described object identity being carried as described SQL statement storage resource request is corresponding.
Wherein in an embodiment, described version number's corresponding stored by described statement mark, SQL statement, Version Description information and described distribution also comprised before the step in tables of data:
The SQL statement of described extraction and Version Description information sequence are changed into json object.
Wherein in an embodiment, described the SQL statement of described extraction and Version Description information sequence are changed into the step of json object after also comprise:
The json object changed into using the SQL statement sequence of described statement mark, version number and extraction as the corresponding Version Control object of attribute value generation, by described Version Control target cache in internal memory.
Wherein in an embodiment, described version number's corresponding stored by described statement mark, SQL statement, Version Description information and described distribution also comprises to the step in tables of data:
According to the mapping relations of property value of the Version Control object's property value preset and described tables of data, described Version Control object's property value to be stored in described tables of data in each self-corresponding field.
Wherein in an embodiment, the described json object changed into using the SQL statement sequence of described statement mark, version number and extraction also comprises as the step of the corresponding Version Control object of attribute value generation:
Obtain submission user ID corresponding to described SQL statement storage resource request and submission time, described submission user ID and submission time are added in described Version Control object as property value.
Wherein in an embodiment, also comprise before the step of described reception SQL statement version rollback request:
Receive SQL statement version and check request, extract described SQL statement version and check the statement mark of asking to carry, search in described tables of data and identify corresponding version number and the Version Description information corresponding with this version number with described statement, show described version number and the Version Description information corresponding with this version number in the form of a list;
The step of described reception SQL statement version rollback request is:
Receive the SQL statement version rollback request by choosing version number to generate in described list, the statement that the request of described SQL statement version rollback is carried is designated statement mark corresponding to described list, and the version number that the request of described SQL statement version rollback is carried is the version number chosen.
In addition, SVN instrument cannot be used to carry out the technical matters of Version Control to the SQL statement by submission of sheet for solving in the above-mentioned conventional art mentioned, spy proposes a kind of Version Control device of structured query sentence.
A Version Control device for structured query sentence, comprising:
SQL statement receiver module, for receiving structuralized query SQL statement storage resource request, extracts the statement mark of SQL statement, Version Description information and the correspondence that described SQL statement storage resource request carries;
SQL statement memory module, for distributing for described statement mark the version number increased progressively, by version number's corresponding stored of described statement mark, SQL statement, Version Description information and described distribution in tables of data;
SQL statement roll-back module, for receiving the request of SQL statement version rollback, extract statement mark and version number that the request of described SQL statement version rollback carries, inquiry and the SQL statement that described statement identifies and version number is corresponding and Version Description information in described tables of data.
Wherein in an embodiment, described SQL statement receiver module is also for the object identity of the page iden-tity and page object corresponding in the described page that obtain the page corresponding to described SQL statement storage resource request; The statement mark that the SQL statement of page iden-tity and described object identity being carried as described SQL statement storage resource request is corresponding.
Wherein in an embodiment, described SQL statement memory module is also for changing into json object by the SQL statement of described extraction and Version Description information sequence.
Wherein in an embodiment, described SQL statement memory module also for the json object that changes into using the SQL statement sequence of described statement mark, version number and extraction as the corresponding Version Control object of attribute value generation, by described Version Control target cache in internal memory.
Wherein in an embodiment, described Version Control object's property value, also for the mapping relations of property value according to the Version Control object's property value preset and described tables of data, to be stored in described tables of data in each self-corresponding field by described SQL statement memory module.
Wherein in an embodiment, described submission user ID and submission time also for obtaining submission user ID corresponding to described SQL statement storage resource request and submission time, are added in described Version Control object as property value by described SQL statement memory module.
Wherein in an embodiment, described SQL statement receiver module also checks request for receiving SQL statement version, extract described SQL statement version and check the statement mark of asking to carry, search in described tables of data and identify corresponding version number and the Version Description information corresponding with this version number with described statement, show described version number and the Version Description information corresponding with this version number in the form of a list;
Receive the SQL statement version rollback request by choosing version number to generate in described list, the statement that the request of described SQL statement version rollback is carried is designated statement mark corresponding to described list, and the version number that the request of described SQL statement version rollback is carried is the version number chosen.
Implement the embodiment of the present invention, following beneficial effect will be had:
After the edition control method that have employed said structure query statement and device, the repeatedly SQL statement that user inputs at same SQL statement input position by page submission of sheet, and the SQL statement that server can be the plurality of version distributes corresponding version number separately, and then according to version number, the SQL statement of the plurality of version is stored in a database.When needs carry out rollback to SQL statement, then can obtain the SQL statement of respective version according to corresponding version number.Compared with conventional art, do not need to use SVN instrument, server does not need first form data to be extracted rear spanned file yet and stores, and then carries out version management by the interface function of SVN instrument, thus achieve the version management of the SQL statement to submission of sheet, improve execution efficiency.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Wherein:
Fig. 1 is the process flow diagram of the edition control method of a kind of structured query sentence in an embodiment;
Fig. 2 is the interface schematic diagram that in an embodiment, terminal input SQL statement carries out the page preserved;
Fig. 3 is the procedure chart in an embodiment, the SQL statement of input being converted into Version Control object;
Fig. 4 selects certain version to carry out the interface schematic diagram of the page of rollback in multi version in an embodiment;
Fig. 5 is the schematic diagram of the Version Control device of a kind of structured query sentence in an embodiment;
Fig. 6 is the structural representation running the computer equipment of the edition control method of aforementioned structure query statement in an embodiment.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
SVN instrument cannot be used to carry out the technical matters of Version Control to the SQL statement by submission of sheet for solving in the above-mentioned conventional art mentioned, in the present embodiment, spy proposes a kind of edition control method of structured query sentence, the method can be dependent on computing machine and realizes, and can run in the computer system based on von Neumann system.This computer program can be data analysis tool, large Data Analysis Platform, the weblication (B/S framework) with the internet, applications of a large number of users data or server-side application (C/S framework).This computer system can be data analysis tool, greatly Data Analysis Platform, have the server apparatus of the internet, applications of a large number of users data.
Concrete, as shown in Figure 1, the method comprises:
Step S102: receive structuralized query SQL statement storage resource request, extracts the statement mark of SQL statement, Version Description information and the correspondence that described SQL statement storage resource request carries.
Structuralized query SQL statement storage resource request is user when using large Data Analysis Platform, to the request that the SQL statement of input stores.In large data platform, data analysis user is to analyze the behavioural characteristic of certain class user, then can input SQL statement to obtain corresponding retrieve data in large data platform, thus the analysis completed user behavior feature, in analytic process, the multiple SQL statement of trial input may be needed to obtain optimum retrieve data and to analyze.
Such as, data analysis user is when inputting SQL statement in trial, attempt multiple age key word to retrieve, it is the retrieval type age being less than 20 that first time attempts input key word, search the user that the age is less than 20, it is the retrieval type age being less than 21 that second time attempts input key word, search the user that the age is less than 21, it is the retrieval type age being less than 22 that third time attempts input key word, search the user that the age is less than 22, if learn through retrieval, 20 carry out retrieving the most applicable user of retrieve data obtained behavioural characteristic analysis as key word is less than using the age, then needing to re-enter key word is the SQL statement age being less than 20.
Therefore, as shown in Figure 2, in the present embodiment, providing structuralized query SQL statement memory page, this page can comprising Version Description information input frame (for the task ID relevant to concrete analysis business and the task names for distinguishing version of analyst's input in such as Fig. 2) and SQL statement.Version Description information is user's descriptor that Gong the user inputted reads in order to distinguish the difference inputting SQL statement at every turn, subsequent user can know to have changed in which perhaps perform which kind of extra task when this utilizes this SQL statement to retrieve according to this Version Description information, thus distinguishes the SQL statement of each input.User adds the SQL statement of input when retrieving each time to structuralized query SQL statement memory page, then clicks to store namely to have submitted SQL statement storage resource request.
In another embodiment, also can automatically complete the storage of SQL statement, that is, can in the data retrieval page of large data platform, carry out that additions and deletions are carried out to user data in tables of data change the operation of looking into, after have submitted operation requests if user have input SQL statement, server not only performs this SQL statement, also automatically generate SQL statement storage resource request, the SQL statement inputted is stored, is equivalent to the operation note storing user.
Statement mark is the mark corresponding with the input position inputting SQL statement.In the present embodiment, the page iden-tity of the page corresponding to described SQL statement storage resource request and the object identity of page object corresponding in the described page can be obtained; The statement mark that the SQL statement of page iden-tity and described object identity being carried as described SQL statement storage resource request is corresponding.
That is, if have input SQL statement in user's certain SQL statement input frame in certain SQL statement memory page or certain SQL statement searching page to carry out user data in tables of data and carry out additions and deletions and change the operation of looking into, have submitted SQL statement storage resource request, then can obtain the mark of SQL statement input frame in the page iden-tity (can be url link) of SQL statement memory page corresponding to this SQL statement storage resource request or SQL statement searching page and this page, then it can be used as the statement of the SQL statement of input to identify.If have input different SQL statement in the follow-up identical SQL statement input frame in the same page of user, then this SQL statement and the SQL statement of previous input have identical statement and identify.
Step S104: for described statement mark distributes the version number increased progressively, is stored into the version number of described statement mark, SQL statement, Version Description information and described distribution in tables of data.
Version number is the identifier for distinguishing the SQL statement that user inputs at every turn.Adopt the version number that increases progressively, can be used for distinguishing user identical SQL statement input frame input SQL statement formula batch.Such as, user is for the first time when inputting SQL statement and storing, and version number can be assigned as 1; User's second time is when inputting SQL statement and storing, and version number can be assigned as 2.In the present embodiment, version number can be distributed by weblication, also can by weblication distributing from increasing function by database interface function call database self.
After being assigned with version number, then can identify as major key by statement, SQL statement is stored in database, wherein, statement identity property (Attribute) in statement mark and corresponding data table, the corresponding contents attribute of SQL statement then in corresponding data table, the descriptor attribute of Version Description information then in corresponding data table, the corresponding version number attribute of version number then in corresponding data table.
That is, user's first time have input SQL statement A in the input frame of corresponding statement mark S, and with the addition of Version Description information A when storing, by interpolation entry in tables of data, the statement identity property of this entry is S, contents attribute is SQL statement A, and descriptor attribute is Version Description information A, and version number's attribute is 1; User's second time have input SQL statement B in the input frame of corresponding statement mark S, and with the addition of Version Description information B when storing, an entry will be added again in tables of data, the statement identity property of this entry is S, contents attribute is SQL statement B, descriptor attribute is Version Description information B, and version number's attribute is 2.
Preferably, also comprise before the version number of described SQL statement and described distribution being stored into the step in tables of data:
The SQL statement of described extraction and Version Description information sequence are changed into json object.
As shown in Figures 2 and 3, if Version Description information comprises taskID and taskName two attributes, then, json object can be generated, wherein taskID is " DemoID " that input in the page, taskName is " the demonstration task " that input in the page, thus can generate the character string of the json object of key-value pair formula, this character string can be stored into as a whole in the contents attribute in tables of data.
Further, the SQL statement of described extraction and Version Description information sequence are changed into the step of json object after also comprise:
The json object changed into using the SQL statement sequence of described statement mark, version number and extraction as the corresponding Version Control object of attribute value generation, by described Version Control target cache in internal memory.
Preferably, also can obtain submission user ID corresponding to described SQL statement storage resource request and submission time, described submission user ID and submission time are added in described Version Control object as property value.
Such as, in an application scenarios, Version Control object can comprise multiple property value type:
1) svnId: version number, unique expression version, adopts from increasing ID
2) pageId: page iden-tity, unique expression page
3) objectId: page object identifies, and represents the unique page object under a page
4) content: sequence changes into SQL statement and the Version Description information of json string content
5) submitUser: submit user to, submits the user account of SQL statement storage resource request to
6) submitTime: submission time, receives the system time of SQL statement storage resource request
Again as shown in Figure 3, the page iden-tity pageId extracted according to SQL statement storage resource request, page object mark objectId, sequence can be changed into the SQL statement of json string content and the content of Version Description information, version number svnId and submission user submitUser, the submission time submitTime of distribution are encapsulated in an object svn.Add in Version Control object and submit to user and submission time can make to write analyst in scene many people can to know each SQL statement submitted to and by which user submitted to, thus easy-to-look-up mistake and Cooperative Analysis.
Create this svn object and after being buffered in internal memory, then can be stored in tables of data according to the Object Relation Mapping (ORM, ObjectRelationalMapping) preset.Namely according to the mapping relations of property value of the Version Control object's property value preset and described tables of data, described Version Control object's property value to be stored in described tables of data in each self-corresponding field.
Such as, the mapping of the ORM that can be pre-created is configured to, the svnId field (Attribute) of the svnId mapping (enum) data table of Version Control object svn object, the pageId field (Attribute) of the pageId mapping (enum) data table of Version Control object svn object, the objectId field (Attribute) of the objectId mapping (enum) data table of Version Control object svn object, the content field (Attribute) of the content mapping (enum) data table of Version Control object svn object, the submitTime field (Attribute) of the submitUser field (Attribute) of the submitUser mapping (enum) data table of Version Control object svn object and the submitTime mapping (enum) data table of Version Control object svn object.Each property value of svn is mapped in field by the mapping configuration of the ORM that then can be pre-created according to this, thus completes the storage of persistence.
Step S106: receive the request of SQL statement version rollback, extracts statement mark and version number that the request of described SQL statement version rollback carries, inquiry and the SQL statement that described statement identifies and version number is corresponding and Version Description information in described tables of data.
Analysis user also inquires about the SQL statement and corresponding Version Description information that input under certain version in the specific SQL statement input frame in specific webpage by read statement mark and version number.As shown in Figure 4, if the SQL statement that user inputs in certain SQL statement input area has existed version 11 in tables of data, wherein the SQL statement of version 11 and the SQL statement of version 5 have been had any different, and Version Description information is also different.If then user is when hope rolls back to version 5, version 5 and statement mark corresponding to this SQL statement input area the request of SQL statement version rollback can be generated as input parameter.After server receives this SQL statement version rollback request, then can this statement mark and version 5 inquire about as parameter, obtain corresponding json character string, then this json character string antitone sequence is changed into json object, then wherein corresponding on page SQL statement input frame and content corresponding to Version Description information input frame is extracted, fill it into corresponding position, as in Fig. 4, namely task names in version information has been rolled back to by " the demonstration task XXXXX " of version 11 " the demonstration task " of version 5, and SQL statement is also corresponding obtains rollback.
Preferably, receive SQL statement version and check request, extract described SQL statement version and check the statement mark of asking to carry, search in described tables of data and identify corresponding version number and the Version Description information corresponding with this version number with described statement, show described version number and the Version Description information corresponding with this version number in the form of a list.
The step receiving the request of SQL statement version rollback then can be specially: receive the SQL statement version rollback request by choosing version number to generate in described list, the statement that the request of described SQL statement version rollback is carried is designated statement mark corresponding to described list, and the version number that the request of described SQL statement version rollback is carried is the version number chosen.
That is, at certain SQL statement input frame I place of page P, drop-down menu can be shown, the version number list corresponding with page P and SQL statement input frame I is included in this drop-down menu, this version number's list by server by with pageID=P and objectID=I for parameter query tables of data obtains, wherein contain the value of the version number field of all data item corresponding with pageID=P and objectID=I.User by selecting version number to determine the version of SQL statement that is that show or that perform in drop-down menu.If user have selected version number V, then the terminal of user operation generates the request of SQL statement version rollback according to pageID=P, objectID=I and svnID=V, server can be that search condition searches corresponding json character string according to pageID=P, objectID=I and svnID=V, then after this json character string antitone sequence being changed into json object, by corresponding SQL statement and Version Description information display in the position of the SQL statement input frame I of page P, thus facilitate user to check or again the user data in tables of data processed.
In addition, SVN instrument cannot be used to carry out the technical matters of Version Control to the SQL statement by submission of sheet for solving in the above-mentioned conventional art mentioned, in one embodiment, as shown in Figure 5, spy proposes a kind of Version Control device of structured query sentence, comprise: SQL statement receiver module 102, SQL statement memory module 104 and SQL statement roll-back module 106, wherein:
SQL statement receiver module 102, for receiving structuralized query SQL statement storage resource request, extracts the statement mark of SQL statement, Version Description information and the correspondence that described SQL statement storage resource request carries.
SQL statement memory module 104, for distributing for described statement mark the version number increased progressively, by version number's corresponding stored of described statement mark, SQL statement, Version Description information and described distribution in tables of data.
SQL statement roll-back module 106, for receiving the request of SQL statement version rollback, extract statement mark and version number that the request of described SQL statement version rollback carries, inquiry and the SQL statement that described statement identifies and version number is corresponding and Version Description information in described tables of data.
In the present embodiment, SQL statement receiver module 102 is also for the object identity of the page iden-tity and page object corresponding in the described page that obtain the page corresponding to described SQL statement storage resource request; The statement mark that the SQL statement of page iden-tity and described object identity being carried as described SQL statement storage resource request is corresponding.
In the present embodiment, SQL statement memory module 104 is also for changing into json object by the SQL statement of described extraction and Version Description information sequence.
In the present embodiment, SQL statement memory module 104 also for the json object that changes into using the SQL statement sequence of described statement mark, version number and extraction as the corresponding Version Control object of attribute value generation, by described Version Control target cache in internal memory.
In the present embodiment, described Version Control object's property value, also for the mapping relations of property value according to the Version Control object's property value preset and described tables of data, to be stored in described tables of data in each self-corresponding field by SQL statement memory module 104.
In the present embodiment, described submission user ID and submission time also for obtaining submission user ID corresponding to described SQL statement storage resource request and submission time, are added in described Version Control object as property value by SQL statement memory module 104.
In the present embodiment, SQL statement receiver module 106 also checks request for receiving SQL statement version, extract described SQL statement version and check the statement mark of asking to carry, search in described tables of data and identify corresponding version number and the Version Description information corresponding with this version number with described statement, show described version number and the Version Description information corresponding with this version number in the form of a list; Receive the SQL statement version rollback request by choosing version number to generate in described list, the statement that the request of described SQL statement version rollback is carried is designated statement mark corresponding to described list, and the version number that the request of described SQL statement version rollback is carried is the version number chosen.
Implement the embodiment of the present invention, following beneficial effect will be had:
After the edition control method that have employed said structure query statement and device, the repeatedly SQL statement that user inputs at same SQL statement input position by page submission of sheet, and the SQL statement that server can be the plurality of version distributes corresponding version number separately, and then according to version number, the SQL statement of the plurality of version is stored in a database.When needs carry out rollback to SQL statement, then can obtain the SQL statement of respective version according to corresponding version number.Compared with conventional art, do not need to use SVN instrument, server does not need first form data to be extracted rear spanned file yet and stores, and then carries out version management by the interface function of SVN instrument, thus achieve the version management of the SQL statement to submission of sheet, improve execution efficiency.
In one embodiment, as shown in Figure 6, Fig. 6 illustrates a kind of computer system 10 based on von Neumann system running the edition control method of said structure query statement.This computer system 10 can be smart mobile phone, panel computer, palm PC, the terminal device such as notebook computer or PC.Concrete, the outer input interface 1001, processor 1002, storer 1003 and the output interface 1004 that are connected by system bus can be comprised.Wherein, outer input interface 1001 optionally at least can comprise network interface 10012.Storer 1003 can comprise external storage 10032 (such as hard disk, CD or floppy disk etc.) and internal storage 10034.Output interface 1004 can comprise the equipment such as display screen 10042 and sound equipment/loudspeaker 10044.
In the present embodiment, the operation of this method is based on computer program, the program file of this computer program is stored in the external storage 10032 of the aforementioned computer system 10 based on von Neumann system, operationally be loaded in internal storage 10034, then be passed to after being compiled as machine code in processor 1002 and perform, thus make the SQL statement receiver module 102, SQL statement memory module 104 and the SQL statement roll-back module 106 that are formed in the computer system 10 based on von Neumann system in logic.And in the edition control method implementation of said structure query statement, the parameter of input is all received by outer input interface 1001, and be passed to buffer memory in storer 1003, then be input in processor 1002 and process, the result data or be cached in storer 1003 of process subsequently processes, or is passed to output interface 1004 and exports.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.

Claims (14)

1. an edition control method for structured query sentence, is characterized in that, comprising:
Receive structuralized query SQL statement storage resource request, extract the statement mark of SQL statement, Version Description information and the correspondence that described SQL statement storage resource request carries;
For described statement mark distributes the version number increased progressively, by version number's corresponding stored of described statement mark, SQL statement, Version Description information and described distribution in tables of data;
Receive the request of SQL statement version rollback, extract statement mark and version number that the request of described SQL statement version rollback carries, inquiry and the SQL statement that described statement identifies and version number is corresponding and Version Description information in described tables of data.
2. the edition control method of structured query sentence according to claim 1, is characterized in that, the step of the statement mark of the SQL statement that the described SQL statement storage resource request of described extraction carries and correspondence comprises:
Obtain the page iden-tity of the page corresponding to described SQL statement storage resource request and the object identity of page object corresponding in the described page;
The statement mark that the SQL statement of page iden-tity and described object identity being carried as described SQL statement storage resource request is corresponding.
3. the edition control method of structured query sentence according to claim 1 and 2, it is characterized in that, described version number's corresponding stored by described statement mark, SQL statement, Version Description information and described distribution also comprised before the step in tables of data:
The SQL statement of described extraction and Version Description information sequence are changed into json object.
4. the edition control method of structured query sentence according to claim 3, is characterized in that, described the SQL statement of described extraction and Version Description information sequence are changed into the step of json object after also comprise:
The json object changed into using the SQL statement sequence of described statement mark, version number and extraction as the corresponding Version Control object of attribute value generation, by described Version Control target cache in internal memory.
5. the edition control method of structured query sentence according to claim 4, is characterized in that, described version number's corresponding stored by described statement mark, SQL statement, Version Description information and described distribution also comprises to the step in tables of data:
According to the mapping relations of property value of the Version Control object's property value preset and described tables of data, described Version Control object's property value to be stored in described tables of data in each self-corresponding field.
6. the edition control method of structured query sentence according to claim 4, it is characterized in that, the described json object changed into using the SQL statement sequence of described statement mark, version number and extraction also comprises as the step of the corresponding Version Control object of attribute value generation:
Obtain submission user ID corresponding to described SQL statement storage resource request and submission time, described submission user ID and submission time are added in described Version Control object as property value.
7. the edition control method of the structured query sentence according to any one of claim 1 to 6, is characterized in that, also comprises before the step of described reception SQL statement version rollback request:
Receive SQL statement version and check request, extract described SQL statement version and check the statement mark of asking to carry, search in described tables of data and identify corresponding version number and the Version Description information corresponding with this version number with described statement, show described version number and the Version Description information corresponding with this version number in the form of a list;
The step of described reception SQL statement version rollback request is:
Receive the SQL statement version rollback request by choosing version number to generate in described list, the statement that the request of described SQL statement version rollback is carried is designated statement mark corresponding to described list, and the version number that the request of described SQL statement version rollback is carried is the version number chosen.
8. a Version Control device for structured query sentence, is characterized in that, comprising:
SQL statement receiver module, for receiving structuralized query SQL statement storage resource request, extracts the statement mark of SQL statement, Version Description information and the correspondence that described SQL statement storage resource request carries;
SQL statement memory module, for distributing for described statement mark the version number increased progressively, by version number's corresponding stored of described statement mark, SQL statement, Version Description information and described distribution in tables of data;
SQL statement roll-back module, for receiving the request of SQL statement version rollback, extract statement mark and version number that the request of described SQL statement version rollback carries, inquiry and the SQL statement that described statement identifies and version number is corresponding and Version Description information in described tables of data.
9. the Version Control device of structured query sentence according to claim 1, it is characterized in that, described SQL statement receiver module is also for the object identity of the page iden-tity and page object corresponding in the described page that obtain the page corresponding to described SQL statement storage resource request; The statement mark that the SQL statement of page iden-tity and described object identity being carried as described SQL statement storage resource request is corresponding.
10. the Version Control device of structured query sentence according to claim 8 or claim 9, it is characterized in that, described SQL statement memory module is also for changing into json object by the SQL statement of described extraction and Version Description information sequence.
The Version Control device of 11. structured query sentence according to claim 10, it is characterized in that, described SQL statement memory module also for the json object that changes into using the SQL statement sequence of described statement mark, version number and extraction as the corresponding Version Control object of attribute value generation, by described Version Control target cache in internal memory.
The Version Control device of 12. structured query sentence according to claim 11, it is characterized in that, described Version Control object's property value, also for the mapping relations of property value according to the Version Control object's property value preset and described tables of data, to be stored in described tables of data in each self-corresponding field by described SQL statement memory module.
The Version Control device of 13. structured query sentence according to claim 11, it is characterized in that, described submission user ID and submission time also for obtaining submission user ID corresponding to described SQL statement storage resource request and submission time, are added in described Version Control object as property value by described SQL statement memory module.
The Version Control device of the structured query sentence described in 14. any one of according to Claim 8 to 13, it is characterized in that, described SQL statement receiver module also checks request for receiving SQL statement version, extract described SQL statement version and check the statement mark of asking to carry, search in described tables of data and identify corresponding version number and the Version Description information corresponding with this version number with described statement, show described version number and the Version Description information corresponding with this version number in the form of a list;
Receive the SQL statement version rollback request by choosing version number to generate in described list, the statement that the request of described SQL statement version rollback is carried is designated statement mark corresponding to described list, and the version number that the request of described SQL statement version rollback is carried is the version number chosen.
CN201510870519.XA 2015-12-01 2015-12-01 The edition control method and device of structured query sentence Active CN105550206B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510870519.XA CN105550206B (en) 2015-12-01 2015-12-01 The edition control method and device of structured query sentence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510870519.XA CN105550206B (en) 2015-12-01 2015-12-01 The edition control method and device of structured query sentence

Publications (2)

Publication Number Publication Date
CN105550206A true CN105550206A (en) 2016-05-04
CN105550206B CN105550206B (en) 2019-10-29

Family

ID=55829395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510870519.XA Active CN105550206B (en) 2015-12-01 2015-12-01 The edition control method and device of structured query sentence

Country Status (1)

Country Link
CN (1) CN105550206B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930506A (en) * 2016-05-10 2016-09-07 乐视控股(北京)有限公司 Object retrieval method and object storage system
CN107491454A (en) * 2016-06-13 2017-12-19 百度在线网络技术(北京)有限公司 Data query method and device
CN109033381A (en) * 2018-07-27 2018-12-18 郑州云海信息技术有限公司 A kind of execution method, device and equipment of service request
CN109240735A (en) * 2018-07-27 2019-01-18 平安科技(深圳)有限公司 Demand rollback scheme filling method, device, terminal and readable storage medium storing program for executing
CN109299067A (en) * 2018-08-22 2019-02-01 北京百度网讯科技有限公司 Page access method, apparatus and storage medium
CN109977026A (en) * 2019-04-04 2019-07-05 天津字节跳动科技有限公司 Test webpage rollback method and device
CN111651364A (en) * 2020-07-01 2020-09-11 中国银行股份有限公司 SQL (structured query language) checking method and device under parallel development
CN115344585A (en) * 2022-08-03 2022-11-15 盐城金堤科技有限公司 Data version management method and device, storage medium and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043648A (en) * 2007-03-09 2007-09-26 中国移动通信集团福建有限公司 Business service switching system
CN101127045A (en) * 2007-09-25 2008-02-20 中兴通讯股份有限公司 Database repeatable reading implement method, device and database management system
CN101136783A (en) * 2007-10-15 2008-03-05 中兴通讯股份有限公司 Backup, recovery method and apparatus for network management system to configure data
CN101692205A (en) * 2009-05-27 2010-04-07 上海文广新闻传媒集团 Three-dimensional financial analytic software
CN101923573A (en) * 2010-08-09 2010-12-22 哈尔滨工程大学 Rapid database data recovery method aiming at data loss
CN102193922A (en) * 2010-03-04 2011-09-21 杭州华三通信技术有限公司 Method and device for accessing database
CN102541884A (en) * 2010-12-10 2012-07-04 中国移动通信集团贵州有限公司 Method and device for database optimization
US20130091181A1 (en) * 2011-10-05 2013-04-11 International Business Machines Corporation Monitoring stored procedure execution
CN103198071A (en) * 2012-01-06 2013-07-10 中国移动通信集团山东有限公司 Data report generation method and device adopting same
CN103514166A (en) * 2012-06-15 2014-01-15 阿里巴巴集团控股有限公司 Method and device for SQL inspection

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043648A (en) * 2007-03-09 2007-09-26 中国移动通信集团福建有限公司 Business service switching system
CN101127045A (en) * 2007-09-25 2008-02-20 中兴通讯股份有限公司 Database repeatable reading implement method, device and database management system
CN101136783A (en) * 2007-10-15 2008-03-05 中兴通讯股份有限公司 Backup, recovery method and apparatus for network management system to configure data
CN101692205A (en) * 2009-05-27 2010-04-07 上海文广新闻传媒集团 Three-dimensional financial analytic software
CN102193922A (en) * 2010-03-04 2011-09-21 杭州华三通信技术有限公司 Method and device for accessing database
CN101923573A (en) * 2010-08-09 2010-12-22 哈尔滨工程大学 Rapid database data recovery method aiming at data loss
CN102541884A (en) * 2010-12-10 2012-07-04 中国移动通信集团贵州有限公司 Method and device for database optimization
US20130091181A1 (en) * 2011-10-05 2013-04-11 International Business Machines Corporation Monitoring stored procedure execution
CN103842973A (en) * 2011-10-05 2014-06-04 国际商业机器公司 Monitoring stored procedure execution
CN103198071A (en) * 2012-01-06 2013-07-10 中国移动通信集团山东有限公司 Data report generation method and device adopting same
CN103514166A (en) * 2012-06-15 2014-01-15 阿里巴巴集团控股有限公司 Method and device for SQL inspection

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930506A (en) * 2016-05-10 2016-09-07 乐视控股(北京)有限公司 Object retrieval method and object storage system
CN107491454A (en) * 2016-06-13 2017-12-19 百度在线网络技术(北京)有限公司 Data query method and device
CN109033381A (en) * 2018-07-27 2018-12-18 郑州云海信息技术有限公司 A kind of execution method, device and equipment of service request
CN109240735A (en) * 2018-07-27 2019-01-18 平安科技(深圳)有限公司 Demand rollback scheme filling method, device, terminal and readable storage medium storing program for executing
WO2020019536A1 (en) * 2018-07-27 2020-01-30 平安科技(深圳)有限公司 Method and apparatus for filling in requirement rollback scheme, and terminal and readable storage medium
CN109240735B (en) * 2018-07-27 2021-09-24 平安科技(深圳)有限公司 Requirement rollback scheme filling method and device, terminal and readable storage medium
CN109299067A (en) * 2018-08-22 2019-02-01 北京百度网讯科技有限公司 Page access method, apparatus and storage medium
CN109977026A (en) * 2019-04-04 2019-07-05 天津字节跳动科技有限公司 Test webpage rollback method and device
CN111651364A (en) * 2020-07-01 2020-09-11 中国银行股份有限公司 SQL (structured query language) checking method and device under parallel development
CN111651364B (en) * 2020-07-01 2023-04-28 中国银行股份有限公司 SQL (structured query language) checking method and device under parallel development
CN115344585A (en) * 2022-08-03 2022-11-15 盐城金堤科技有限公司 Data version management method and device, storage medium and electronic equipment
CN115344585B (en) * 2022-08-03 2024-03-19 盐城天眼察微科技有限公司 Data version management method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN105550206B (en) 2019-10-29

Similar Documents

Publication Publication Date Title
CN105550206A (en) Version control method and device for structured query language
JP6761112B2 (en) Methods and systems for server-side rendering of native content for presentation
AU2016302371B2 (en) Building and managing data-processing attributes for modeled data sources
CA2684822C (en) Data transformation based on a technical design document
US11620444B2 (en) Providing action associated with event detected within communication
CN108197091B (en) Method, system and related equipment for creating data table
CN112883030A (en) Data collection method and device, computer equipment and storage medium
CN112256772A (en) Data service method, device and readable storage medium
CN111047434B (en) Operation record generation method and device, computer equipment and storage medium
WO2023134134A1 (en) Method and apparatus for generating association viewing model, and computer device and storage medium
US11513876B2 (en) Resolving data location for queries in a multi-system instance landscape
WO2023040530A1 (en) Webpage content traceability method, knowledge graph construction method and related device
US20220284371A1 (en) Method, device and medium for a business function page
CN114065765A (en) Weapon equipment text processing method and device combining AI and RPA and electronic equipment
US20170161359A1 (en) Pattern-driven data generator
CN110851517A (en) Source data extraction method, device and equipment and computer storage medium
CN111310088A (en) Page rendering method and device
CN110019547B (en) Method, device, equipment and medium for acquiring association relation between clients
CN112347748A (en) Data report generation method and device, computer equipment and readable storage medium
CN111221917A (en) Intelligent partition storage method and device and computer readable storage medium
US9679010B2 (en) Methods, systems, and apparatus for search of electronic information attachments
CN113515504B (en) Data management method, device, electronic equipment and storage medium
US11900110B2 (en) Increasing user interaction with deep learning agent
CN112732742B (en) Query page creating method and device, computer equipment and storage medium
CN114356946A (en) Data table updating method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 519000 High-tech Zone, Zhuhai City, Guangdong Province, Unit 1, Fourth Floor C, Building A, Headquarters Base No. 1, Qianwan Third Road, Tangjiawan Town

Applicant after: ZHUHAI DUOWAN INFORMATION TECHNOLOGY LIMITED

Address before: 511442 29 floors, B-1 Building, Wanda Commercial Square North District, Wanbo Business Center, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Applicant before: ZHUHAI DUOWAN INFORMATION TECHNOLOGY LIMITED

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant