-
Notifications
You must be signed in to change notification settings - Fork 14
DatabaseRow
Josh Wright edited this page Jan 14, 2021
·
3 revisions
A row of data returned from a database. Various database packages can use this as an abstraction around their internal row types.
public protocol DatabaseRow
The String
names of all columns that have values in this
DatabaseRow
.
var allColumns: [String]
Get the DatabaseField
of a column from this row.
func getField(column: String) throws -> DatabaseField
- column: The column to get the value for.
A DatabaseError
if the column does not exist on this row.
The field at column
.
Decode a Model
type D
from this row.
func decode<D: Model>(_ type: D.Type) throws -> D
The default implementation of this function populates the
properties of D
with the value of the column named the
same as the property.
- type: The type to decode from this row.
Generated at 2021-01-13T22:24:59-0800 using swift-doc 1.0.0-beta.5.
Alchemy
Types
- AlterTableBuilder
- BCryptDigest
- BasicAuthMiddleware
- BcryptError
- BelongsToRelationship
- CORSMiddleware
- CORSMiddleware.AllowOriginSetting
- CORSMiddleware.Configuration
- ColumnType
- CreateColumn
- CreateColumnBuilder
- CreateIndex
- CreateTableBuilder
- DatabaseConfig
- DatabaseError
- DatabaseField
- DatabaseKeyMappingStrategy
- DatabaseValue
- DayUnit
- Env
- FrequencyTyped
- Grammar
- HTTPAuth
- HTTPAuth.Basic
- HTTPAuth.Bearer
- HTTPBody
- HTTPError
- HasManyRelationship
- HasOneRelationship
- HasRelationship
- HourUnit
- JoinClause
- JoinType
- Launch
- Log
- MIMEType
- MinuteUnit
- ModelQuery
- MySQLDatabase
- Operator
- OrderClause
- OrderClause.Sort
- OrderedDictionary
- PapyrusClientError
- PathParameter
- PathParameter.DecodingError
- PostgresDatabase
- Query
- Request
- Response
- Router
- RuneError
- SQL
- SQLJSON
- Scheduler
- Schema
- SecondUnit
- Services
- Socket
- StaticFileMiddleware
- StringLength
- Thread
- TokenAuthMiddleware
- WeekUnit
- Weekday
- WhereBoolean
- WhereColumn
- WhereIn
- WhereIn.InType
- WhereNested
- WhereRaw
- WhereValue