[pgsql.connect]

pgsql.connect is a slot in the pgsql namespace, in Hyperlambda, the language of Magic Cloud. Opens a PostgreSQL connection.

  • Value (database-name,connection-string), optional: Optional DATABASE_NAME or [CONNECTION_STRING DATABASE_NAME] override
  • Scope: provides pgsql.connection - Creates an open PostgreSQL connection scope for pgsql.* slots

Arguments

Required arguments come first, then the optional ones in the order they are declared.

Argument Type Required Description
any node name lambda no Executable child slot evaluated while the database connection is open. Can be repeated.

JSON declaration

This is the complete declaration of pgsql.connect, as the running system describes it. It is also published as slot.json.

JSON declaration
{
  "name": "pgsql.connect",
  "description": "Opens a PostgreSQL connection",
  "signature": {
    "input": {
      "kind": "database-name,connection-string",
      "description": "Optional DATABASE_NAME or [CONNECTION_STRING|DATABASE_NAME] override",
      "required": false,
      "mode": "ValueOrExpression"
    },
    "children": {
      "*": {
        "type": "lambda",
        "description": "Executable child slot evaluated while the database connection is open",
        "required": false,
        "mode": "ExecutableLambda",
        "cardinality": "ZeroOrMore",
        "role": "ExecutableBody",
        "evaluation": "EvalSelf",
        "projection": "Self"
      }
    },
    "scope": {
      "provides": "pgsql.connection",
      "description": "Creates an open PostgreSQL connection scope for pgsql.* slots"
    }
  }
}

all pgsql.* slots pgsql.create →