Patent ID: 11928106
Assignee: INTUIT INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A system for automatically documenting queries comprising:
a server comprising one or more processors; and
a non-transitory memory, in communication with the server, storing instructions that when executed by the one or more processors, causes the one or more processors to implement a method comprising:
receiving a query entered and created on a graphical user interface (GUI) and determining whether the query is a candidate for auto-documentation by automatically:
parsing the query for one or more strings matching a phrase of, or indicating a command for, create table or drop table, wherein parsing further comprises:
separating the query into one or more sub-queries based on one or more statement terminators included in the query; and
determining whether the phrases create table or drop table are recited or indicated in the one or more sub-queries;

in response to determining that the phrase drop table is recited or indicated in the one or more sub-queries, automatically:
identifying a first table name associated with the phrase drop table;
traversing a first syntax tree structure corresponding to the phrase drop table, wherein the phrase drop table is limited to syntax elements corresponding to tree paths for dropping a table from a key-value data structure;
identifying where the first table name is located within the first syntax tree structure;
dynamically populating the GUI with selectable syntax options associated with the phrase drop table;
receiving an input associated with the selectable syntax options;
identifying, based on the input, table data associated with the first table name by referencing a key-value data structure; and
modifying a table status of the first table name in the key-value data structure to deleted;

in response to determining that the phrase create table is recited or indicated in the one or more sub-queries, automatically:
identifying a second table name associated with the phrase create table;
traversing a second syntax tree structure corresponding to the phrase create table, wherein the phrase create table is limited to syntax elements corresponding to tree paths for creating the table from the key-value data structure;
identifying (i) where the second table name is located within the second syntax tree structure corresponding to the phrase create table, and (ii) where content associated with query is located;
dynamically populating the GUI with selectable syntax options associated with the phrase create table;
receiving an input associated with the selectable syntax options;
extracting metadata from the query, based on the input, wherein the metadata includes an identifier associated with a user that created the query;
modifying a table status of the second table name in the key-value data structure to exists; and
storing the second table name as a key and the metadata as table data in the key-value data structure.