[sql.create]
sql.create is a slot in the sql namespace, in Hyperlambda, the language of Magic Cloud. Builds a parameterized INSERT SQL statement.
- 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. |
[values] |
lambda | yes | Column values to insert or update. |
[values] / any node name |
object | yes | Column name and value. Can be repeated. |
Guide: How to use [sql.create]
JSON declaration
This is the complete declaration of sql.create, as the running system describes it. It is also published as slot.json.
JSON declaration
{
"name": "sql.create",
"description": "Builds a parameterized INSERT SQL statement",
"signature": {
"children": {
"table": {
"type": "string",
"kind": "table-name",
"description": "Table name to use in the SQL statement",
"required": true,
"mode": "ValueOrExpression",
"cardinality": "ExactlyOne"
},
"values": {
"type": "lambda",
"description": "Column values to insert or update",
"required": true,
"mode": "DynamicNamedValues",
"cardinality": "ExactlyOne",
"children": {
"*": {
"type": "object",
"kind": "sql-column-value,text,number,boolean,date,guid,content,value",
"description": "Column name and value",
"required": true,
"mode": "ValueOrExpression",
"cardinality": "OneOrMore"
}
}
}
},
"output": {
"mode": "Both",
"description": "Resolves to the generated SQL string in value and the generated parameter nodes as children"
}
}
}
all sql.* slots |
sql.delete → |