FunctionCallinterfaceno test imports itinterface FunctionCallOne call of a function.
| Member | Type | What it is |
|---|---|---|
name | readonly string[] | |
node | Call |
Named analyses of a syntax tree (commons lang-sql 0003-sql-ast-tools FR-007, FR-008): the tables a script reads, writes, creates, alters and drops, the functions it calls, and whether it is read-only.
A single name that is the name of a common table expression in scope is not a table. A common table expression is in scope in the body of its WITH, in the common table expressions after it, and, where the WITH is recursive, in its own and the others'. Names are compared without regard to case where they are not quoted, and as written where they are.
readOnlyProblem(parse("DELETE FROM t").script); // "it holds a DELETE"Spec: 0003-sql-ast-tools FR-007, FR-008
FunctionCallinterfaceno test imports itinterface FunctionCallOne call of a function.
| Member | Type | What it is |
|---|---|---|
name | readonly string[] | |
node | Call |
functionsCalledfunctionfunction functionsCalled(root: Node): readonly FunctionCall[]Every call of a function in a tree, in the order of the text.
| Parameter | What it is |
|---|---|
root | a script, a statement or any node |
Returns: the calls
readOnlyProblemfunctionfunction readOnlyProblem(script: Script): string | undefinedWhy a script is not read-only, or nothing where it is: it holds one statement, and that is a query.
| Parameter | What it is |
|---|---|
script | the script |
Returns: one sentence, or undefined
TableAccesstypeno test imports ittype TableAccess = "read" | "write" | "create" | "alter" | "drop";What a script does to a table.
TableUseinterfaceno test imports itinterface TableUseOne use of a table: its name as written, what is done to it, and the node.
| Member | Type | What it is |
|---|---|---|
name | readonly string[] | |
access | TableAccess | |
node | Node |
tableUsesfunctionfunction tableUses(root: Node): readonly TableUse[]Every use of a table in a tree, in the order of the text.
| Parameter | What it is |
|---|---|
root | a script, a statement or any node |
Returns: the uses