DataRaft swift package
This commit is contained in:
parent
d64c6b2ef2
commit
1b2cdaf23e
23 changed files with 1862 additions and 0 deletions
17
Sources/DataRaft/Protocols/RowDatabaseServiceProtocol.swift
Normal file
17
Sources/DataRaft/Protocols/RowDatabaseServiceProtocol.swift
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import Foundation
|
||||
import DataLiteCoder
|
||||
|
||||
/// A protocol for database services that support row encoding and decoding.
|
||||
///
|
||||
/// Conforming types provide `RowEncoder` and `RowDecoder` instances for serializing
|
||||
/// and deserializing model types to and from SQLite row representations.
|
||||
///
|
||||
/// This enables strongly typed, reusable, and safe access to database records
|
||||
/// using Swift's `Codable` system.
|
||||
public protocol RowDatabaseServiceProtocol: DatabaseServiceProtocol {
|
||||
/// The encoder used to serialize values into database rows.
|
||||
var encoder: RowEncoder { get }
|
||||
|
||||
/// The decoder used to deserialize database rows into typed models.
|
||||
var decoder: RowDecoder { get }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue