The invention discloses a method and a
system for generating
SQL (Structured
Query Language) statements in a template configuration manner, and belongs to the technical field of
database access. The method comprises the following steps: firstly, solidifying four tuples of stmttype, field,: tbl and where on a template side by using
XML /
JSON, locking one of four styles of% s,-, {} and: name at one time by using a placeholder style
arbiter, and generating a golden sequence vector after DOM /
JSON double analysis and regular global scanning; then, parameters are obtained on the data side through db / file / API three-state routing, a single quotation is automatically added to string /
data class values through a
silicon-level quotation hardening circuit, number class values are directly transmitted in an unvarnished mode, and object-by-object fusing check is conducted through a key integrity sniffer in a batch scene; and finally, performing
mmap original text re-loading on each
record by a template hot loading
isolator on a generation side, and realizing page-level isolation and zero-residue output by combining
SIMD replacement and cache line scouring. The method is suitable for high-security, high-
concurrency and high-real-time scenes such as cloud, edges and production lines.