DapperMaticFunction
Namespace: MJCZone.DapperMatic.AspNetCore.Models
Assembly: MJCZone.DapperMatic.AspNetCore
Summary
A function callers may run through <c>POST /d/{datasourceId}/f/{name}</c>, with the Execute action: SQL the application writes, or a routine of the database. Nothing is callable unless declared here; the SQL is the application's, and is never assembled from the request.
sealed public
Contents
Constructors (1) | Methods (4) | Properties (8)
Constructors
DapperMaticFunction
DapperMaticFunction()Methods
GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()Properties
Name
Gets or sets the name callers run it by, in the route and in policies' <c>Functions</c>.
Type: string
DatasourceId
Gets or sets the datasource it runs in, or null for every datasource.
Type: string?
Description
Gets or sets a description, for the caller's OpenAPI document.
Type: string?
Sql
Gets or sets the SQL to run, its parameters written <c>@name</c>; or null to run Routine.
Type: string?
Routine
Gets or sets a routine of the database to run with the parameters, in their order, as written (quoted or schema-qualified as the database needs): a PostgreSQL function (<c>SELECT * FROM routine(...)</c>), a SQL Server stored procedure (<c>EXEC routine @name = ...</c>) or a MySQL procedure (<c>CALL routine(...)</c>). SQLite has none.
Type: string?
Parameters
Gets the parameters, in order: those the caller gives, and those taken from the request's context.
Type: List<DapperMaticFunctionParameter>
Writes
Gets or sets the tables it writes to, whose cached query results its runs make stale (<c>table</c> or <c>schema.table</c>); <c>*</c> for every table of the datasource.
Type: string[]
MaxRows
Gets or sets the most rows it may return, or null for MaxTop.
Type: int?