Skip to content

Commit

Permalink
revert code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lindseymoore committed Jul 19, 2024
1 parent c0a0ac1 commit 6bb8891
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/dotnet/Examples/Compact.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public async Task Compacts()
/* totalBytes refers to the size of the file on disk in
* bytes (data + free space).
* usedBytes refers to the number of bytes used by
* the file
* the realm file
*/

// Compact if the file is over 100MB in size and less
Expand Down
4 changes: 2 additions & 2 deletions examples/ios/Examples/Compacting.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ - (void)testCompacting {
};

NSError *error = nil;
// The database is compacted on the first open if the configuration block conditions were met.
// Realm is compacted on the first open if the configuration block conditions were met.
RLMRealm *realm = [RLMRealm realmWithConfiguration:config error:&error];
if (error) {
// handle error compacting or opening database
// handle error compacting or opening Realm
}
// :snippet-end:
}
Expand Down
8 changes: 4 additions & 4 deletions examples/ios/Examples/Compacting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class Compacting: XCTestCase {
return (totalBytes > oneHundredMB) && (Double(usedBytes) / Double(totalBytes)) < 0.5
})
do {
// The database is compacted on the first open if the configuration block conditions were met.
// Realm is compacted on the first open if the configuration block conditions were met.
let realm = try Realm(configuration: config)
} catch {
// handle error compacting or opening the database
// handle error compacting or opening Realm
}
// :snippet-end:
}
Expand All @@ -34,11 +34,11 @@ class Compacting: XCTestCase {
})

do {
// The database is compacted asynchronously on the first open if the
// Realm is compacted asynchronously on the first open if the
// configuration block conditions were met.
let realm = try await Realm(configuration: config)
} catch {
// handle error compacting or opening the database
// handle error compacting or opening Realm
}
}
// :snippet-end:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ func testAsyncCompact() async {
})

do {
// The database is compacted asynchronously on the first open if the
// Realm is compacted asynchronously on the first open if the
// configuration block conditions were met.
let realm = try await Realm(configuration: config)
} catch {
// handle error compacting or opening the database
// handle error compacting or opening Realm
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
};

NSError *error = nil;
// The database is compacted on the first open if the configuration block conditions were met.
// Realm is compacted on the first open if the configuration block conditions were met.
RLMRealm *realm = [RLMRealm realmWithConfiguration:config error:&error];
if (error) {
// handle error compacting or opening database
// handle error compacting or opening Realm
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ let config = Realm.Configuration(shouldCompactOnLaunch: { totalBytes, usedBytes
return (totalBytes > oneHundredMB) && (Double(usedBytes) / Double(totalBytes)) < 0.5
})
do {
// The database is compacted on the first open if the configuration block conditions were met.
// Realm is compacted on the first open if the configuration block conditions were met.
let realm = try Realm(configuration: config)
} catch {
// handle error compacting or opening the database
// handle error compacting or opening Realm
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* totalBytes refers to the size of the file on disk in
* bytes (data + free space).
* usedBytes refers to the number of bytes used by
* the file
* the realm file
*/

// Compact if the file is over 100MB in size and less
Expand Down

0 comments on commit 6bb8891

Please sign in to comment.