Frends.PostgreSQL.ExecuteQuery / 2.0.0
Summary
Runs SQL against PostgreSQL and returns the result, with parameters passed separately from the statement text.
Typical use — reading from and writing to PostgreSQL; parameterising rather than concatenating is also what keeps injection out of the query
Input-class for ExecuteQuery-task.
| Name | Type | Default | Example | Description |
|---|---|---|---|---|
| Query | String |
SELECT * FROM Users |
SELECT * FROM Users |
Query. Note: Normal query requires double quotes around Column and 2 single quotes around Value. |
| Parameters | Parameter[] |
– | [{ Name = "Name", Value = "Erik" }, { Name = "Email", Value = "erik.example@foobar.com" }] |
Query parameters. |
| ConnectionStringSecret | String |
– | Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword; |
Connection string. |
| ExecuteType | ExecuteTypes |
Auto |
ExecuteTypes.Auto |
Specifies how a command string is interpreted. Auto: Automatically detects if the query returns data (SELECT or RETURNING clause) and uses ExecuteReader, otherwise uses NonQuery. ExecuteReader: Use this to execute queries that return a result set (SELECT or INSERT/UPDATE/DELETE with RETURNING clause). NonQuery: Use this to execute commands that don't return a result set (INSERT, UPDATE, DELETE without RETURNING). Returns the number of affected rows. Possible values:
|