Parameter
public struct Parameter : Buildable
Query parameter, either numbered, or named, or just marked with a marker.
-
An optional name of the parameter.
Declaration
Swift
public private(set) var name: String? { get }
-
Initialize an instance of Parameter.
Declaration
Swift
public init(_ name: String? = nil)
Parameters
name
An optional name of the parameter.
-
Build the parameter using
QueryBuilder
. If the parameter’s name is set, return it along with the named parameter marker inQueryBuilder
. Otherwise, return the numbered parameter marker inQueryBuilder
.Throws
QueryError.syntaxError if query build fails.Declaration
Swift
public func build(queryBuilder: QueryBuilder) throws -> String
Parameters
queryBuilder
The QueryBuilder to use.
Return Value
A String representation of the parameter.