You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/FluentData/Documentation.docc/Documentation.md
+6-3
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,17 @@
1
-
# FluentData
1
+
# Getting started with FluentData
2
2
3
3
Add managed persistence to your SwiftUI app using the Fluent ORM.
4
4
5
5
## Overview
6
6
7
-
Combining Fluent's proven ORM technology and Swift's modern concurrency features, FluentData enables you to add persistence to your app quickly, with minimal code. Inspired by SwiftData, FluentData gives additional control and features over data persistence in your SwiftUI app.
7
+
Combining Fluent's proven ORM technology and Swift's modern concurrency features, FluentData enables you to add persistence to your app quickly, with minimal
8
+
code. Inspired by SwiftData, FluentData gives additional control and features over data persistence in your SwiftUI app.
9
+
10
+
Browsing the [Fluent](https://docs.vapor.codes/fluent/overview/) documentation will prove to be useful as well, since FluentData relies on this library.
/// Recovery policy FluentData should adopt when a migration fails to execute
4
+
///
5
+
/// When using ``startFresh`` or ``backupAndStartFresh(backupHandler:)``, the process will crash if a new database cannot be created (similar to ``abort``)
6
+
publicenumMigrationFailurePolicy{
7
+
/// ``startFresh`` will wipe the database content and recreate a new database. This is not recommended in production as it brings data losses
8
+
case startFresh
9
+
10
+
/// ``abort`` the process will crash voluntarily. Reasons why the migration failed to execute will be available in the logs.
11
+
case abort
12
+
13
+
/// ``backupAndStartFresh(backupHandler:)`` will call the speccified closure with the URL to a copy of the database file which failed to migrate.
14
+
/// After the backup handler returns, the behaviour will be equivalent to ``startFresh``.
15
+
case backupAndStartFresh(backupHandler:(URL)->Void)
0 commit comments