PostgresByteA
public struct PostgresByteA:
PostgresValueConvertible, Equatable, Decodable, CustomStringConvertible
Represents a Postgres BYTEA
value (a byte array).
-
Creates a
PostgresByteA
from the specifiedData
.Declaration
Swift
public init(data: Data)
Parameters
data
the data
-
Creates a
PostgresByteA
from the specified hex format string.The Postgres hex format encodes binary data as
\x
followed by two hex digits per byte, most significant nibble first. Hex digitsa
tof
can be uppercase or lowercase.Declaration
Swift
public init?(_ hexEncoded: String)
Parameters
hexEncoded
the hex format string
-
The
BYTEA
value, as aData
.Declaration
Swift
public let data: Data
-
A
PostgresValue
for thisPostgresByteA.
Declaration
Swift
public var postgresValue: PostgresValue { get }
-
True if
lhs.data == rhs.data
.Declaration
Swift
public static func == (lhs: PostgresByteA, rhs: PostgresByteA) -> Bool
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
A short string that describes this
PostgresByteA
.Declaration
Swift
public var description: String { get }