From d6eb192bd8491ff9696e070f26de98ad706c7180 Mon Sep 17 00:00:00 2001 From: TheHandyOwl <24987271+TheHandyOwl@users.noreply.github.com> Date: Sun, 1 Jun 2025 00:51:22 +0200 Subject: [PATCH 1/2] Refactor: model.es.md translation to Spanish (#1082) --- docs/fluent/model.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fluent/model.es.md b/docs/fluent/model.es.md index f5721031..0c6e6378 100644 --- a/docs/fluent/model.es.md +++ b/docs/fluent/model.es.md @@ -68,7 +68,7 @@ let id = try planet.requireID() ### Exists -`@ID` tiene una propiedad `exists` que representa si el modelo existe o no en la base de datos. Cuando inicializas un modelo, el valor es `false`. Después de guardar un modelo o recuperarlo de la base de datos, the value is `true`. Esta propiedad es mutable. +`@ID` tiene una propiedad `exists` que representa si el modelo existe o no en la base de datos. Cuando inicializas un modelo, el valor es `false`. Después de guardar un modelo o recuperarlo de la base de datos, el valor `true`. Esta propiedad es mutable. ```swift if planet.$id.exists { From 2336e613dc7057d22df8a2bfba9d16b901cc5371 Mon Sep 17 00:00:00 2001 From: Holly Schilling Date: Mon, 16 Jun 2025 02:49:18 -0500 Subject: [PATCH 2/2] Added `any` qualifier to code examples on Migrations page (#1083) Swift 5.6 added the `any` keyword as an existential type qualifier. This PR updates the code examples on the Migrations page to correctly incorporate this keyword. The following languages are effected: EN, ES, NL, IT, and ZH. --- docs/fluent/migration.es.md | 8 ++++---- docs/fluent/migration.it.md | 8 ++++---- docs/fluent/migration.md | 8 ++++---- docs/fluent/migration.nl.md | 8 ++++---- docs/fluent/migration.zh.md | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/fluent/migration.es.md b/docs/fluent/migration.es.md index 37f213ab..6ae72794 100644 --- a/docs/fluent/migration.es.md +++ b/docs/fluent/migration.es.md @@ -5,11 +5,11 @@ Las migraciones son una especie de control de versiones para tu base de datos. C ```swift // Una migración de ejemplo. struct MyMigration: Migration { - func prepare(on database: Database) -> EventLoopFuture { + func prepare(on database: any Database) -> EventLoopFuture { // Haz un cambio en la base de datos. } - func revert(on database: Database) -> EventLoopFuture { + func revert(on database: any Database) -> EventLoopFuture { // Deshaz el cambio hecho en `prepare`, si es posible. } } @@ -19,11 +19,11 @@ Si estás usando `async`/`await` deberías implementar el protocolo `AsyncMigrat ```swift struct MyMigration: AsyncMigration { - func prepare(on database: Database) async throws { + func prepare(on database: any Database) async throws { // Haz un cambio en la base de datos. } - func revert(on database: Database) async throws { + func revert(on database: any Database) async throws { // Deshaz el cambio hecho en `prepare`, si es posible. } } diff --git a/docs/fluent/migration.it.md b/docs/fluent/migration.it.md index 48d9d86b..442bfab9 100644 --- a/docs/fluent/migration.it.md +++ b/docs/fluent/migration.it.md @@ -5,11 +5,11 @@ Le migrazioni sono come un sistema di controllo versione per il tuo database. Og ```swift // Un esempio di migrazione. struct MyMigration: Migration { - func prepare(on database: Database) -> EventLoopFuture { + func prepare(on database: any Database) -> EventLoopFuture { // Fai una modifica al database. } - func revert(on database: Database) -> EventLoopFuture { + func revert(on database: any Database) -> EventLoopFuture { // Disfai le modifiche fatte in `prepare`, se possibile. } } @@ -19,11 +19,11 @@ Se usi `async`/`await` devi implementare il protocollo `AsyncMigration`: ```swift struct MyMigration: AsyncMigration { - func prepare(on database: Database) async throws { + func prepare(on database: any Database) async throws { // Fai una modifica al database. } - func revert(on database: Database) async throws { + func revert(on database: any Database) async throws { // Disfai le modifiche fatte in `prepare`, se possibile. } } diff --git a/docs/fluent/migration.md b/docs/fluent/migration.md index 8e4f0036..9c7e8e8b 100644 --- a/docs/fluent/migration.md +++ b/docs/fluent/migration.md @@ -5,11 +5,11 @@ Migrations are like a version control system for your database. Each migration d ```swift // An example migration. struct MyMigration: Migration { - func prepare(on database: Database) -> EventLoopFuture { + func prepare(on database: any Database) -> EventLoopFuture { // Make a change to the database. } - func revert(on database: Database) -> EventLoopFuture { + func revert(on database: any Database) -> EventLoopFuture { // Undo the change made in `prepare`, if possible. } } @@ -19,11 +19,11 @@ If you're using `async`/`await` you should implement the `AsyncMigration` protoc ```swift struct MyMigration: AsyncMigration { - func prepare(on database: Database) async throws { + func prepare(on database: any Database) async throws { // Make a change to the database. } - func revert(on database: Database) async throws { + func revert(on database: any Database) async throws { // Undo the change made in `prepare`, if possible. } } diff --git a/docs/fluent/migration.nl.md b/docs/fluent/migration.nl.md index 5c515ec4..95ba51c1 100644 --- a/docs/fluent/migration.nl.md +++ b/docs/fluent/migration.nl.md @@ -5,11 +5,11 @@ Migraties zijn als een versiebeheersysteem voor uw database. Elke migratie defin ```swift // Een voorbeeld migratie. struct MyMigration: Migration { - func prepare(on database: Database) -> EventLoopFuture { + func prepare(on database: any Database) -> EventLoopFuture { // Breng een wijziging aan in de database. } - func revert(on database: Database) -> EventLoopFuture { + func revert(on database: any Database) -> EventLoopFuture { // Maak de verandering in `prepare` ongedaan, indien mogelijk. } } @@ -19,11 +19,11 @@ Als je `async`/`await` gebruikt moet je het `AsyncMigration` protocol implemente ```swift struct MyMigration: AsyncMigration { - func prepare(on database: Database) async throws { + func prepare(on database: any Database) async throws { // Breng een wijziging aan in de database. } - func revert(on database: Database) async throws { + func revert(on database: any Database) async throws { // Maak de verandering in `prepare` ongedaan, indien mogelijk. } } diff --git a/docs/fluent/migration.zh.md b/docs/fluent/migration.zh.md index 095364a5..a0869dd1 100644 --- a/docs/fluent/migration.zh.md +++ b/docs/fluent/migration.zh.md @@ -5,11 +5,11 @@ ```swift // An example migration. struct MyMigration: Migration { - func prepare(on database: Database) -> EventLoopFuture { + func prepare(on database: any Database) -> EventLoopFuture { // Make a change to the database. } - func revert(on database: Database) -> EventLoopFuture { + func revert(on database: any Database) -> EventLoopFuture { // Undo the change made in `prepare`, if possible. } } @@ -19,11 +19,11 @@ struct MyMigration: Migration { ```swift struct MyMigration: AsyncMigration { - func prepare(on database: Database) async throws { + func prepare(on database: any Database) async throws { // Make a change to the database. } - func revert(on database: Database) async throws { + func revert(on database: any Database) async throws { // Undo the change made in `prepare`, if possible. } }