Realm is a mobile database: a replacement for SQLite & ORMs
APACHE-2.0 License
Bot releases are hidden (Show)
Published by fealebenpae over 4 years ago
userId
and isAdmin
of a user when creating credentials via Credentials.CustomRefreshToken
. Previously these values would be inferred from the JWT itself but as there's no way to enforce the server configuration over which fields in the JWT payload represent the userId
and the isAdmin
field, it is now up to the consumer to determine the values for these.System.Runtime.Serialization.Formatters
and System.Xml.Serialization
serializers. (Issue #1913)[NonSerialized]
and [XmlIgnore]
attributes so that eager opt-outRealm
and ObjectSchema
which contain handles to unmanaged data.[Required]
is applied on IList<string>
property. (Contributed by braudabaugh)results.Filter(...)
) used to need the class_
prefix for class names when querying over backlink properties. This has been fixed so that only the public ObjectSchema
name is necessary. For example, @links.class_Person.Siblings
becomes @links.Person.Siblings
.ClientResyncMode.DiscardLocalRealm
wouldn't reset the schema.Published by nirinchev about 5 years ago
int IndexOf(object)
and bool Contains(object)
to the IRealmCollection
interface. (PR #1893)SyncConfigurationBase.EnableSessionMultiplexing()
that allows toggling session multiplexing on the sync client. (PR 1896)Realm.GetInstanceAsync
. (Issue 1847)cancellationToken
argument to Realm.GetInstanceAsync
enabling clean cancelation of the in-progress download. (PR 1859)FullSyncConfiguration.ClientResyncMode
. (PR #1901)createUser
argument in Credentials.UsernamePassword
optional. If not specified, the user will be created or logged in if they already exist. (PR #1901)RealmCollectionBase<T>.IndexOf
. (Issue #1892)Published by nirinchev about 5 years ago
isAdmin
parameter from Credentials.Nickname
. It doesn't have any effect on new ROS versions anyway as logging in an admin nickname user is not supported - this change just makes it explicit. (Issue #1879)Credentials.Nickname
method as deprecated - support for the Nickname auth provider is deprecated in ROS and will be removed in a future version. (Issue #1879)deleteRealm
parameter from PermissionDeniedException.DeleteRealmInfo
as passing false
has no effect. Calling the method is now equivalent to calling it with deleteRealm: true
. (PR #1890)Credentials.CustomRefreshToken
that can be used to create a user with a custom refresh token. This will then be validated by ROS against the configured refreshTokenValidators
to obtain access tokens when opening a Realm. If creating a user like that, it's the developer's responsibility to ensure that the token is valid and refreshed as necessary to ensure that access tokens can be obtained. To that end, you can now set the refresh token of a user object by calling User.RefreshToken = "my-new-token"
. This should only be used in combination with users obtained by calling Credentials.CustomRefreshToken
. (PR #1889)Subscription.Subscribe
) with includedBacklinks
. (Core upgrade)Published by nirinchev over 5 years ago
Fixed an issue that would prevent iOS apps from being published to the app store with the following error:
This bundle Payload/.../Frameworks/realm-wrappers.framework is invalid. The Info.plist file is missing the required key: CFBundleVersion.
(Issue 1870, since 4.0.0)
Fixed an issue that would cause iOS apps to crash on device upon launching. (Issue 1871, since 4.0.0)
Published by nirinchev over 5 years ago
NOTE!!! You will need to upgrade your Realm Object Server to at least version 3.23.1 or use Realm Cloud to use the path-level Permission API (User.ApplyPermissionsAsync
, User.GetGrantedPermissionsAsync
, etc.). Using them against an older version of ROS will result in 404 NotFound exceptions being thrown.
The Realm.Server and Realm.Database packages have been merged into the main Realm package, so when upgrading, be sure to remove them from your references.
SyncConfiguration
class has been split into FullSyncConfiguration
and QueryBasedSyncConfiguration
. Use one of these classes to connect to the Realm Object Server.TestingExtensions.SimulateProgress
method has been removed as it hasn't worked for some time.Property.IsNullable
property has been removed. To check if a property is nullable, check Property.Type
for the PropertyType.Nullable
flag.Credentials.Provider
class has been removed. Previously, it contained a few constants that were intended for internal use mostly.User.ConfigurePersistance
method has been superseded by SyncConfigurationBase.Initialize
.User.LogOut
has been removed in favor of User.LogOutAsync
.User.GetManagementRealm
has been removed in favor of the User.ApplyPermissionsAsync
set of wrapper API.User.GetPermissionRealm
has been removed in favor of the User.GetGrantedPermissions
wrapper API.IQueryable<T>.Subscribe(string name)
extension method in favor of IQueryable<T>.Subscribe(SubscriptionOptions options)
.IQueryable<T>
has changed to IEnumerable<T>
). (Issue #1863)
User.GetGrantedPermissionsAsync
from IQueryable<PathPermission>
to IEnumerable<PathPermission>
. This means that the collection is no longer observable like regular Realm-backed collections. If you need to be notified for changes of this collection, you need to implement a polling-based mechanism yourself.PathPermission.MayRead/MayWrite/MayManage
have been deprecated in favor of a more-consistent AccessLevel
API.User.ApplyPermissionsAsync
, renamed the realmUrl
parameter to realmPath
.User.OfferPermissionsAsync
, renamed the realmUrl
parameter to realmPath
.PermissionOfferResponse
and PermissionChange
classes.IPermissionObject
interface.ManagementObjectStatus
enum.User.GetPermissionChanges
and User.GetPermissionOfferResponses
methods.millisecondTimeout
argument in User.GetGrantedPermissionsAsync
has been removed.PermissionException
class has been replaced by HttpException
.AuthenticationException
class has been merged into the HttpException
class.Added Session.Start()
and Session.Stop()
methods that allow you to pause/resume synchronization with the Realm Object Server. (Issue #138)
Added an IQueryable<T>.Subscribe(SubscriptionOptions, params Expression<Func<T, IQueryable>>[] includedBacklinks)
extension method that allows you to configure additional options for the subscription, such as the name, time to live, and whether it should update an existing subscription. The includedBacklinks
argument allows you to specify which backlink properties should be included in the transitive closure when doing query-based sync. For example:
class Dog : RealmObject
{
public Person Owner { get; set; }
}
class Person : RealmObject
{
[Backlink(nameof(Dog.Owner))]
public IQueryable<Dog> Dogs { get; }
}
var options = new SubscriptionOptions
{
Name = "adults",
TimeToLive = TimeSpan.FromDays(1),
ShouldUpdate = true
};
var people = realm.All<Person>()
.Where(p => p.Age > 18)
.Subscribe(options, p => p.Dogs);
await people.WaitForSynchronzationAsync();
// Dogs that have an owner set to a person that is over 18
// will now be included in the objects synchronized locally.
var firstPersonDogs = people.Results.First().Dogs;
Added a Realm.GetAllSubscriptions()
extension method that allows you to obtain a collection of all registered query-based sync subscriptions. (Issue #1838)
Added AccessLevel
property to PathPermission
to replace the now deprecated MayRead/MayWrite/MayManage
. (Issue #1863)
Added RealmOwnerId
property to PathPermission
that indicates who the owner of the Realm is. (Issue #1863)
Added support for building with dotnet build
(previously only the msbuild
command line was supported). (PR #1849)
Improved query performance for unindexed string columns when the query has a long chain of OR conditions. (Core upgrade)
Improved performance of encryption and decryption significantly by utilizing hardware optimized encryption functions. (Core upgrade)
Compacting a realm into an encrypted file could take a really long time. The process is now optimized by adjusting the write buffer size relative to the used space in the realm. (Core upgrade)
The string-based query parser (results.Filter("...")
) now supports readable timestamps with a 'T' separator in addition to the originally supported "@" separator. For example: startDate > 1981-11-01T23:59:59:1
(Core upgrade)
StringExtensions.Contains(string, string, StringComparison)
extension method inside a LINQ query would result in an exception being thrown on .NET Core 2.1+ or Xamarin.iOS/Android projects.(Issue #1848)Published by nirinchev almost 6 years ago
NOTE!!! You will need to upgrade your Realm Object Server to at least version 3.11.0 or use Realm Cloud. If you try to connect to a ROS v3.10.x or previous, you will see an error like Wrong protocol version in Sync HTTP request, client protocol version = 25, server protocol version = 24
.
SyncConfigurationBase.CustomLogger
. It must be set before opening a synchronized Realm. (#1824)SyncConfigurationBase.UserAgent
prior to opening a synchronized Realm. If developing a Xamarin app, you can use the Xamarin.Essentials plugin to automate that: SyncConfiguration.UserAgent = $"{AppInfo.Name} ({AppInfo.PackageName} {AppInfo.VersionString})"
.Assertion failed: ndx < size() with (ndx, size()) = [742, 742]
.LogLevel
being sent to Sync when setting SyncConfigurationBase.LogLevel
. (#1824, since 2.2.0)Realm.GetInstanceAsync
from working when used with QueryBasedSyncConfiguration
. (#1827, since 3.1.0)realm.SubscribeToObjectsAsync
has been removed in this version. (#1772)User.ConfigurePersistence
has been deprecated in favor of SyncConfigurationBase.Initialize
.Published by nirinchev almost 6 years ago
OnProgress
property on SyncConfigurationBase
. It allows you to specify a progress callback that will be invoked when using Realm.GetInstanceAsync
to report the download progress. (#1807)Subscription.WaitForSynchronizationAsync
on a background thread (without a SynchronizationContext
) would previously hang indefinitely. Now a meaningful exception will be thrown to indicate that this is not supported and this method should be called on a thread with a synchronization context. (dotnet-private#130, since v3.0.0)Published by nirinchev about 6 years ago
An unknown error has occurred. State: *some-number-larger than 127*
when subscribing to queries. (dotnet-private#128, since 3.0.0
)Published by nirinchev about 6 years ago
RealmObject
inheritors will now raise PropertyChanged
after they have been removed from Realm. The property name in the event arguments will be IsValid
.realm.All<Foo>().Where(f => f.Bar == someBar)
), a meaningful exception will now be thrown rather than an obscure ArgumentNullException.ShouldCompactOnLaunch
to the PCL version of the library. (dotnet-private#125)Published by nirinchev over 6 years ago
ChangeSet.NewModifiedIndices
collection that contains information about the indices of the objects that changed in the new version of the collection (i.e. after accounting for the insertions and deletions).WriteAsync
will no longer perform a synchronous Refresh
on the main thread. (#1729)IList
compliance for Realm collections. This fixes an issue which would cause the app to hang on Android when deselecting an item from a ListView bound to a Realm collection.SyncConfiguration
is now deprecated and will be removed in a future version. Two new configuration classes have been exposed - [QueryBasedSyncConfiguration](https://docs.realm.io/platform/using-synced realms/syncing-data#using-query-based-synchronization) and FullSyncConfiguration. If you were using a SyncConfiguration
with IsPartial = true
, then change your code to use QueryBasedSyncConfiguration
. Similarly, if IsPartial
was not set or was set to false
, use FullSyncConfiguration
.IList
compliance for Realm collections. This will prevent automatic updates of ListViews databound to Realm collections in UWP projects.Published by fealebenpae over 6 years ago
[MapTo]
to be applied on classes to change the name of the table corresponding to that class. (#1712)IQueryable<T>.Subscribe
can be usedSubscription<T>
object can be used to observe the state of the subscriptionIQueryable<T>.Filter(predicate)
method to enable more advanced queryingrealm.All<Dog>().Filter("Owner.FirstName BEGINSWITH 'J'")
.realm.All<Child>().Filter("Parents.FirstName BEGINSWITH 'J'")
- find allrealm.All<Child>().Filter("[email protected] > 50")
-realm.All<Person>().Filter("SUBQUERY(Dogs, $dog, $dog.Vaccinated == false).@count > 3")
- find allrealm.All<Dog>().Filter("TRUEPREDICATE SORT(Owner.FirstName ASC, Age DESC)")
- find all dogs andrealm.All<Dog>().Filter("TRUEPREDICATE DISTINCT(Age) SORT(Name)")
- find all dogs, sort themSyncConfiguration
constructor now accepts relative Uris. (#1720)RequestPasswordResetAsync
, CompletePasswordResetAsync
, RequestEmailConfirmationAsync
, and ConfirmEmailAsync
.Credentials.UsernamePassword
who have provided their email asPermission
has been renamed to PathPermission
to more closely reflect its purpose.RealmConfiguration.DefaultConfiguration
has changed to RealmConfigurationBase
to allowSyncConfiguration
constructor arguments are now optional. The user
value will default to theserverUri
value will default to realm://MY-SERVER-URL/default
whereMY-SERVER-URL
is the host the user authenticated against. (#1720)serverUrl
argument in User.LoginAsync(credentials, serverUrl)
and User.GetLoggedInUser(identity, serverUrl)
serverUri
for consistency. (#1721)Published by nirinchev over 6 years ago
IsDynamic
property to RealmConfigurationBase
, allowing you to open a Realm file and read its schema from disk. (#1637)InMemoryConfiguration
class that allows you to create an in-memory Realm instance. (#1638)foo.Bars[2] = new Bar()
or foo.Integers[3] = 5
. (#1641)RealmObject.Equals
would return true
for objects that are no longer managed by Realm. (#1698)SyncConfiguration.SetFeatureToken
is deprecated and no longer necessary in order to use Sync on Linux or server-side features. (#1703)Published by nirinchev almost 7 years ago
This release brings bug fixes and a new server-side package: Realm.Server. It allows you to create server-side change handlers that observe hundreds or thousands of Realms and get notifications when any of those changes. Read the full announcement here or head over to the documentation.
[Explicit]
attribute that can be applied to classes or assemblies. If a class is decorated with it, then it will not be included in the default schema for the Realm (i.e. you have to explicitly set RealmConfiguration.ObjectClasses
to an array that contains that class). Similarly, if it is applied to an assembly, all classes in that assembly will be considered explicit. This is useful when developing a 3rd party library that depends on Realm to avoid your internal classes leaking into the user's schema. (#1602)realm.All<Dog>().Where(d => d.Owner == null)
. (#1601)Realm.DeleteRealm
on a synchronized Realm will now properly delete the realm.management
folder. (#1621)Published by nirinchev about 7 years ago
This is a major release that includes numerous improvements as well as several highly requested new features. This release is incompatible with the Realm Object Server 1.x series. Comprehensive documentation on migrating an app that uses synchronized Realms from 1.x to 2.x will be published shortly. Apps that are using offline realms only are not affected and can upgrade safely.
IList<T>
properties and you can now specify primitive values as well as RealmObject subtypes.Below is the full list of changes and enhancements.
IList<T>
where T
can be anyIList
. As a result, a lot of methods that previously had constraints onRealmObject
now accept any type and may throw a runtime exception if used with an unsupported type argument.HelpLink
pointing to the relevant section of the documentation to most Realm exceptions. (#1521)RealmObject.GetBacklinks
API to dynamically obtain all objects referencing the current one. (#1533)PermissionDeniedException
, to denote permission denied errors when working with synchronized Realms thatDeleteRealmUserInfo
- to inform the binding that the offending Realm's files should be kept or deleted immediately.IncompatibleSyncedFileException
- that allows you to handle and perform data migration from a legacy (1.x) Realm fileRealm.GetInstance
or Realm.GetInstanceAsync
and exposes a GetBackupRealmConfig
methodUserInfo
has been significantly enhanced. It now contains metadata about a user stored on the Realm Object Server, as well as a list of all userUser.LogOutAsync
to replace the now-deprecated synchronous call. (#1574)BacklinksCount
property on RealmObject
that returns the number of objects that refer to the current object via a to-one or a to-many relationship. (#1578)null
as a value. (#1579)IsPartial
property on aSyncConfiguration
, opening the Realm, and then calling Realm.SubscribeToObjectsAsync
with the type of object you're interested in,IList<T>
, IQueryable<T>
) will not change when iterating in a foreach
loop. (#1589)Realm.GetInstance
will now advance the Realm to the latest version, so you no longer have to call Refresh
manually after that. (#1523)Realm.CreateObject(string className)
now has additional parameter object primaryKey
. You must pass that when creating a new object using the dynamic API. If the object you're creating doesn't have primary key declared, pass null
. (#1381)AcceptPermissionOfferAsync
now returns the relative rather than the absolute url of the Realm the user has been granted permissions to. (#1595)Published by nirinchev about 7 years ago
This is a major release that includes numerous improvements as well as several highly requested new features. This release is incompatible with the Realm Object Server 1.x series. Comprehensive documentation on migrating an app that uses synchronized Realms from 1.x to 2.x will be published shortly. Apps that are using offline realms only are not affected and can upgrade safely.
IList<T>
properties and you can now specify primitive values as well as RealmObject subtypes.Below is the full list of changes and enhancements.
IList<T>
where T
can be anyIList
. As a result, a lot of methods that previously had constraints onRealmObject
now accept any type and may throw a runtime exception if used with an unsupported type argument.HelpLink
pointing to the relevant section of the documentation to most Realm exceptions. (#1521)RealmObject.GetBacklinks
API to dynamically obtain all objects referencing the current one. (#1533)PermissionDeniedException
, to denote permission denied errors when working with synchronized Realms thatDeleteRealmUserInfo
- to inform the binding that the offending Realm's files should be kept or deleted immediately.IncompatibleSyncedFileException
- that allows you to handle and perform data migration from a legacy (1.x) Realm fileRealm.GetInstance
or Realm.GetInstanceAsync
and exposes a GetBackupRealmConfig
methodUserInfo
has been significantly enhanced. It now contains metadata about a user stored on the Realm Object Server, as well as a list of all userUser.LogOutAsync
to replace the now-deprecated synchronous call. (#1574)BacklinksCount
property on RealmObject
that returns the number of objects that refer to the current object via a to-one or a to-many relationship. (#1578)null
as a value. (#1579)IsPartial
property on aSyncConfiguration
, opening the Realm, and then calling Realm.SubscribeToObjectsAsync
with the type of object you're interested in,Realm.GetInstance
will now advance the Realm to the latest version, so you no longer have to call Refresh
manually after that. (#1523)Realm.CreateObject(string className)
now has additional parameter object primaryKey
. You must pass that when creating a new object using the dynamic API. If the object you're creating doesn't have primary key declared, pass null
. (#1381)Published by nirinchev about 7 years ago
We’re pleased to introduce .NET Core support on Realm. Developers can now build apps with the Realm Mobile Platform using C# on both the client and server side for a complete end-to-end C# developer experience with Realm. Refer to the documentation for more details on supported platforms. Note that support for synchronized Realms on Windows is coming later this year.
In addition to .NET Core, we're announcing official Xamarin.Mac support. Both Native UI and Xamarin.Forms applications are fully supported and for Xamarin.Forms, we're shipping a new update to the Realm.DataBinding package to automatically create transactions for two-way data bound properties.
Realm.WriteCopy
API to copy a Realm file and optionally encrypt it with a different key. (#1464)IQueryable<T>
and IList<T>
) now implement the IList
interface that is needed for data-binding to ListView
in UWP applications. (#1469)User.RetrieveInfoForUserAsync
API to allow admin users to lookup other users' identities in the Realm Object Server. This can be used, for example, to find a user by knowing their Facebook id. (#1486)SyncConfiguration
or User.LoginAsync
. (#1501)Realm.GetInstanceAsync
. (#1503)RealmInteger<T>
to expose Realm-specific API over base integral types. It can be used to implement counter functionality in synced realms. (#1466)PermissionCondition.Default
to apply default permissions for existing and new users. (#1511)IQueryProvider.CreateQuery
on Realm's IQueryable results, an exception would be thrown. (#1487)IList
or IQueryable
property in a LINQ query will now throw NotSupportedException
rather than crash the app. (#1505)Published by nirinchev over 7 years ago
User
class for working with permissions: (#1361)
ApplyPermissionsAsync
, OfferPermissionsAsync
, and AcceptPermissionOfferAsync
allow you to grant, revoke, offer, and accept permissions.GetPermissionOffers
, GetPermissionOfferResponses
, and GetPermissionChanges
allow you to review objects, added via the above mentioned methods.GetGrantedPermissionsAsync
allows you to inspect permissions granted to or by the current user.RealmConfiguration
(i.e. local Realm), Realm.GetInstanceAsync
will perform potentially costly operation, such as executing migrations or compaction on a background thread. (#1406)User.ChangePasswordAsync(userId, password)
API to allow admin users to change other users' passwords. (#1412)SyncConfiguration.TrustedCAPath
API to allow providing a custom CA that will be used to validate SSL traffic to the Realm Object Server. (#1423)Realm.IsInTransaction
API to check if there's an active transaction for that Realm. (#1452)[MapTo]
applied. (#1405)RealmObject.PropertyChanged
subscribers when the actual changed property is below a Backlink
property. (#1433)SyncConfiguration.EnableSSLValidation
would be ignored when passed to Realm.GetInstanceAsync
. (#1423)PermissionChange
, PermissionOffer
, and PermissionOfferResponse
are now private. Use the new User.ApplyPermissionsAsync
, User.OfferPermissionsAsync
, and User.AcceptPermissionOfferAsync
API. (#1361)User.GetManagementRealm
and User.GetPermissionRealm
are now deprecated. Use the new permission related API on User
to achieve the same results. (#1361)User.ChangePassword(password)
has been renamed to User.ChangePasswordAsync(password)
. (#1412)Realm.ObjectForPrimaryKey<T>(long id)
Realm.ObjectForPrimaryKey<T>(string id)
Realm.ObjectForPrimaryKey(string className, long id)
Realm.ObjectForPrimaryKey(string className, string id)
Realm.Manage<T>(T obj, bool update)
Realm.Close()
Realm.CreateObject<T>()
IOrderedQueryable<T>.ToNotifyCollectionChanged<T>(Action<Exception> errorCallback)
IOrderedQueryable<T>.ToNotifyCollectionChanged<T>(Action<Exception> errorCallback, bool coalesceMultipleChangesIntoReset)
IRealmCollection<T>.ObjectSchema
Realm.DeleteRealm
now throws an exception if called while an instance of that Realm is still open.Published by nirinchev over 7 years ago
RealmObject.OnManaged
virtual method that can be used for init purposes, since the constructor is run before the object has knowledge of its Realm. (#1383)Realm.GetInstanceAsync
API to asynchronously open a synchronized Realm. It will download all remote content available at the time the operation began on a background thread and then return a usable Realm. It is also the only supported way of opening Realms for which the user has only read permissions. (#1390)Published by nirinchev over 7 years ago
Introducing Realm Mobile Database for Universal Windows Platform (UWP). With UWP support, you can now build mobile apps using Realm’s object database for the millions of mobile, PC, and Xbox devices powered by Windows 10. The addition of UWP support allows .NET developers to build apps for virtually any modern Windows Platform with Windows Desktop (Win32) or UWP as well as for iOS and Android via Xamarin. Note that sync support is not yet available for UWP, though we are working on it and you can expect it soon.
User.ChangePassword
API to change the current user's password if using Realm's 'password' authentication provider. Requires any edition of the Realm Object Server 1.4.0 or later. (#1386)SyncConfiguration
now has an EnableSSLValidation
property (default is true
) to allow SSL validation to be specified on a per-server basis. (#1387)RealmConfiguration.ShouldCompactOnLaunch
callback property when configuring a Realm to determine if it should be compacted before being returned. (#1389)Session.Reconnect
would not reconnect all sessions. (#1380)PropertyChanged
multiple times. (#1380)Published by nirinchev over 7 years ago
EntryPointNotFoundException
would be thrown on some Android devices. (#1336)IRealmCollection.IsValid
to indicate whether the realm collection is valid to use. (#1344)None