SQL (Structured Query Language) statement generation method and device, equipment and storage medium

The invention discloses an SQL (Structured Query Language) statement generation method and device, equipment and a storage medium. The method comprises the following steps: acquiring an original SQL statement; the original SQL statement comprises main table metadata; analyzing the original SQL state...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: FAN YUNBO, QIN HUACHAN, LIAO GUANGXIAN, TAO JIE
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention discloses an SQL (Structured Query Language) statement generation method and device, equipment and a storage medium. The method comprises the following steps: acquiring an original SQL statement; the original SQL statement comprises main table metadata; analyzing the original SQL statement to generate a first syntax tree; on the basis of a preset mapping relation between main table metadata and M groups of sub-table metadata, replacing the main table metadata in the first syntax tree by using the M groups of sub-table metadata to obtain M second syntax trees; and carrying out inverse analysis on the M second syntax trees to generate M sub-SQL statements. Thus, according to the preset unified mapping relation, the original SQL statement issued by the center cluster is converted, the sub-SQL statements matched with the M edge clusters can be automatically generated, manual intervention is not needed in the conversion process, the conversion standard is unified, the correctness of the sub-SQL state