[sql.delete]
sql.delete is a slot in the sql namespace, in Hyperlambda, the language of Magic Cloud. Builds a parameterized DELETE SQL statement; include a [where] child unless intentionally deleting every row in the table.
- Returns: Resolves to the generated SQL string in value and the generated parameter nodes as children
Arguments
Required arguments come first, then the optional ones in the order they are declared.
| Argument | Type | Required | Description |
|---|---|---|---|
[table] |
string | yes | Table name to use in the SQL statement. |
[where] |
lambda | no | Optional boolean predicate tree. |
[where] / [and] |
lambda | no | Boolean AND group. |
[where] / [and] / any node name |
object | yes | Column condition; suffix the name with .eq, .neq, .gt, .gte, .lt, .lte, .like, .ilike, or .in to select an operator. Can be repeated. |
[where] / [and] / any node name / unnamed child node |
object | no | Value item used by operators such as .in. |
[where] / [and] / [or] |
lambda | no | Boolean OR group. Can be repeated. |
[where] / [and] / [or] / any node name |
object | yes | Column condition; suffix the name with .eq, .neq, .gt, .gte, .lt, .lte, .like, .ilike, or .in to select an operator. Can be repeated. |
[where] / [and] / [or] / any node name / unnamed child node |
object | no | Value item used by operators such as .in. |
[where] / [or] |
lambda | no | Boolean OR group. |
[where] / [or] / any node name |
object | yes | Column condition; suffix the name with .eq, .neq, .gt, .gte, .lt, .lte, .like, .ilike, or .in to select an operator. Can be repeated. |
[where] / [or] / any node name / unnamed child node |
object | no | Value item used by operators such as .in. |
[where] / [or] / [and] |
lambda | no | Boolean AND group. Can be repeated. |
[where] / [or] / [and] / any node name |
object | yes | Column condition; suffix the name with .eq, .neq, .gt, .gte, .lt, .lte, .like, .ilike, or .in to select an operator. Can be repeated. |
[where] / [or] / [and] / any node name / unnamed child node |
object | no | Value item used by operators such as .in. |
Nodes nested deeper than 6 levels, and nodes that repeat one of their own ancestors, are not listed. The JSON declaration below has all of them.
Guide: How to use [sql.delete]
JSON declaration
This is the complete declaration of sql.delete, as the running system describes it. It is also published as slot.json.
JSON declaration (loads when opened)
← sql.create |
all sql.* slots |
sql.read → |