Realm is a mobile database: a replacement for SQLite & ORMs
APACHE-2.0 License
Bot releases are hidden (Show)
Published by nirinchev over 7 years ago
Realm is now being distributed as a .NET Standard 1.4 library as this is a requirement for supporting UWP. While internally that is a rather big move, applications using it should not be affected. After the upgrade, you'll see a number of new NuGet dependencies being added - those are reference assemblies, already part of mscorlib, so will not affect your application's size or performance. Additionally, we're releasing a new platform specific DataBinding package that contains helper methods that enable two-way databinding scenarios by automatically creating transactions when setting a property.
If you encounter any issues after the upgrade, we recommend clearing the bin
and obj
folders and restarting Xamarin Studio. If this doesn't help, please file an issue explaining your solution setup and the type of problems you encounter.
Files written with this version cannot be read by earlier versions of Realm. This version is not compatible with versions of the Realm Object Server lower than 1.3.0.
RemoveAll(string)
overload to work correctly. (#1288)IObservable
returned from session.GetProgressObservable
will correctly call OnComplete
when created with mode: ProgressMode.ForCurrentlyOutstandingWork
. (#1292)EncryptionKey
with synchronized realms. (#1322)ThreadSafeReference.Create
factory method, which you can then safely pass to another thread to resolve in the new realm with Realm.ResolveReference
. (#1300)realm.All<Parent>().OrderBy(p => p.Child.Age)
. (#1313)string.Like
extension method that can be used in LINQ queries against the underlying database engine. (#1311)User.IsAdmin
property that indicates whether a user is a Realm Object Server administrator. (#1320)DateTimeOffset
properties that are not set will now correctly default to 0001-1-1
instead of 1970-1-1
after the object is passed to realm.Add
. (#1293)ArgumentOutOfRangeException
for all IRealmCollection
implementations. (#1295)PropertyChanged
notifications use a new, more reliable, mechanism, that behaves slightly differently from the old one. Notifications will be sent only after a transaction is committed (making it consistent with the way collection notifications are handled). To make sure that your UI is promptly updated, you should avoid keeping long lived transactions around. (#1316)Published by nirinchev over 7 years ago
Published by nirinchev over 7 years ago
This is a preparation release for adding UWP support. We have removed all platform-specific logic from the Realm assemblies, and instead weave them in compile time. While this has been tested in all common scenarios, it may create issues with very complex project graphs. If you encounter any of these issues with iOS projects:
WeaveRealmAssemblies
please file an issue and explain your solution setup.
Published by nirinchev over 7 years ago
Realm
NuGet package no longer clobbers the path to Win32 native binaries in Realm.Database
. (#1239)PropertyChanged
subscribers would cause crashes. (#1237)Published by nirinchev over 7 years ago
After about a year and a half of hard work, we are proud to call this a 1.0 release. There is still work to do, but Realm Xamarin is now being used by thousands of developers and has proven reliable.
Realm Xamarin now works with the Realm Mobile Platform. This means that you can write Xamarin apps that synchronize seamlessly with a Realm Object Server, allowing you to write complex apps with Xamarin that are offline-first and automatically synchronised by adding just a few lines of code.
You can read about this in the documentation.
Realm Xamarin is no longer iOS and Android only. You can now use it to write .NET programs for Windows Desktop. Add the NuGet package to your regular .NET project and start using Realm. Some features are not supported on Windows yet. Most notably, sync does not yet work for Windows, but also encryption and notifications across processes are missing. We are working on it and you can expect support soon.
IRealmCollection<T>.ObjectSchema
is deprecated and replaced with ISchemaSource.ObjectSchema
. (#1216)[MapTo]
attribute is now respected in queries. (#1219)RealmObject.PropertyChanged
in a PropertyChanged
callback should no longer lead to crashes. (#1207)WriteAsync
now advances the read transaction so the changes made asynchronously are available immediately in the original thread. (#1192)Published by nirinchev over 7 years ago
Published by nirinchev over 7 years ago
Realms.Exceptions
namespace. (#1075)RealmSchema
to Realms.Schema
namespace. (#1075)ErrorEventArgs
constructor internal. (#1075)ObjectSchema.Builder
and RealmSchema.Builder
internal. (#1075)IList
properties to Add(obj, update: true)
will no longer merge the lists. Instead, the IList
property will contain only the items in the object. (#1040)OnPropertyChanged
method in RealmObject
that you can override to be notified of changes to the current object. (#1047)[Required]
is applied on correct property types. (#1072)Realm.Add(RealmObject obj)
will now return the passed in object, similarly to Realm.Add<T>(T obj)
. (#1162)string.Contains
that accepts StringComparison
argument and can be used in queries. When querying, only StringComparison.Ordinal
and StringComparison.OrdinalIgnoreCase
can be used. When not used in queries, all values for StringComparison
are valid. (#1141)IList<T>
property that has never been accessed, to the Realm will no longer throw a NullReferenceException
. (#1040)IList<T>
properties will now correctly return IsReadOnly = true
when managed by a readonly Realm. (#1070)[Backlink]
in PCL assemblies. (#1117)ObjectDisposedException
when trying to access their members. Additionally, disposing a realm will not invalidate other instances on the same thread. (#1063)Published by nirinchev almost 8 years ago
This release focuses on making it easier to use Realm objects in data-binding scenarios. We've made RealmObjects and managed collections observable so you can bind without an intermediate ViewModel. Additionally, a two-way data binding will create and commit a transaction if one is not opened, so you don't have to keep an open transaction.
IQueryable<T>.ToNotifyCollectionChanged
extension methods that accept parameters are now deprecated. There is a new parameterless one that you should use instead. If you want to handle errors, you can do so by subscribing to the Realm.OnError
event. (#938)RealmResults<T>
is now marked internal
and Realm.All<T>()
will instead return IQueryable<T>
. We've added a new extension method IQueryable<T>.SubscribeForNotifications(NotificationCallbackDelegate<T>)
that allows subscribing for notifications. (#942)Realm.CreateObject<T>
has been deprecated and will be removed in the next major release. (It could cause a dangerous data loss when using the synchronised realms coming soon, if a class has a PrimaryKey). (#998)RealmConfiguration.ReadOnly
has been renamed to RealmConfiguration.IsReadOnly
and is now a property instead of a field. (#858)Realm.All
has been renamed to Realm.GetAll
and the former has been obsoleted. (#858)Realm.ObjectForPrimaryKey
has been renamed to Realm.Find
and the former has been obsoleted. (#858)Realm.Manage
has been renamed to Realm.Add
and the former has been obsoleted. (#858)RealmConfiguration.PathToRealm
has been renamed to Realm.GetPathToRealm
and the former has been obsoleted. (#858)RealmResults.NotificationCallback
has been extracted as a non-nested class and has been renamed to NotificationCallbackDelegate
. (#858)Realm.Close
has been removed in favor of Realm.Dispose
. (#858)RealmList<T>
is now marked internal
. You should use IList<T>
to define collection relationships. (#858)[Required]
attribute. (#349)Realm.Error
event that you can subscribe for to get notified for exceptions that occur outside user code. (#938)Realm.All
and the collection created for IList<T>
properties on RealmObject
now implement INotifyCollectionChanged
so you can pass them for data-binding without any additional casting. (#938, #909)INotifyPropertyChanged
. This allows you to pass them directly for data-binding.Realm.Compact
method that allows you to reclaim the space used by the Realm. (#968)Realm.Add
returns the added object. (#931)LinkingObjects
. (#219)IList<T>.Move
extension method that allows you to reorder elements within the collection. For managed Lists, it calls a native method, so it is slightly more efficient than removing and inserting an item, but more importantly, it will raise the CollectionChanged
with NotifyCollectionChangedAction.Move
which will result in a nice move animation, rather than a reload of a ListView. (#995)PropertyChanged
on a RealmObject and modifying an instance of the same object on a different thread will now properly raise the event. (#909)Insert
to insert items at the end of an IList
property will no longer throw an exception. (#978)Published by nirinchev almost 8 years ago
RealmList<T>
is now marked as internal. If you were using it anywhere, you should migrate to IList<T>
. (#880)iOS Linking all should work - we now add a [Preserve] attribute to all woven members of your RealmObject
subclasses so you do not need to manually add [Preserve(allMembers=true)]
(#822)
Realm.Manage
calls are now much faster. You should prefer that to Realm.CreateObject
unless you are setting only a few properties, while leaving the rest with default values. (#857)
Added bool update
argument to Realm.Manage
. When update: true
is passed, Realm will try to find and update a persisted object with the same PrimaryKey. If an object with the same PrimaryKey is not found, the umnamaged object is added. If the passed in object does not have a PrimaryKey, it will be added. Any related objects will be added or updated depending on whether they have PrimaryKeys. (#871)
NOTE: cyclic relationships, where object references are not identical, will not be reconciled. E.g. this will work as expected:
var person = new Person { Name = "Peter", Id = 1 };
person.Dog = new Dog();
person.Dog.Owner = person;
However this will not - it will set the Person's properties to the ones from the last instance it sees:
var person = new Person { Name = "Peter", Id = 1 };
person.Dog = new Dog();
person.Dog.Owner = new Person { Id = 1 };
This is important when deserializing data from json, where you may have multiple instances of object with the same Id, but with different properties.
Realm.Manage
will no longer throw an exception if a managed object is passed. Instead, it will immediately return. (#871)
Added non-generic version of Realm.Manage
. (#871)
Added support for nullable integer PrimaryKeys. Now you can have long?
PrimaryKey property where null
is a valid unique value. (#877)
Added a weaver warning when applying Realm attributes (e.g. [Indexed]
or [PrimaryKey]
) on non-persisted properties. (#882)
Added support for ==
and !=
comparisons to realm objects in LINQ (#896), e.g.:
csharp var peter = realm.All<Person>().FirstOrDefault(d => d.Name == "Peter"); var petersDogs = realm.All<Dog>().Where(d => d.Owner == peter);
Added support for StartsWith(string, StringComparison)
, EndsWith(string, StringComparison)
, and Equals(string, StringComparison)
filtering in LINQ. (#893)
NOTE: Currently only Ordinal
and OrdinalIgnoreCase
comparisons are supported. Trying to pass in a different one will result in runtime error. If no argument is supplied, Ordinal
will be used.
Published by kristiandupont about 8 years ago
Realm.ObjectForPrimaryKey()
now returns null if it failed to find an object (#833).Uses core 1.5.1
Published by kristiandupont about 8 years ago
Detailed
or Normal
will now display a message for every property woven, which can be useful if you suspect errors with Fody weaving.RealmResults<T>
should implement IQueryable.Provider
implicitly (#752)DateTimeOffset
precision bug fixed (#756)Uses core 1.4.2
Published by AndyDentFree about 8 years ago
Primarily released as a fix to 0.77.0 which had a problem building PCL libraries.
A hard crash at compile time caused failure weaving the new IList
based lists (#715).
With that fixed, a further change was detected in the signature of RealmResults
implementing IOrderedQueryable<T>
instead of IQueryable<T>
which PCL built libraries to fail to match the platform builds.
Uses core 1.4.0
Published by kristiandupont over 8 years ago
Realm.CreateObject
and Realm.All
that accept string arguments instead of generic parameters, enabling use of the dynamic
keyword with objects whose exact type is not known at compile time. (#646)IList<DestClass>
rather than requiring RealmList<DestClass>
. This is significantly faster than using RealmList
due to caching the list. (Issue #287)Realm.Manage
will cause the entire object graph from that object down to become managed.RealmObject.IsValid
can be called to check if a managed object has been deletedRealm
no longer leave a leaking handle (Issue #503)Uses core 1.4.0
Published by fealebenpae over 8 years ago
Realm
static constructor will no longer throw a TypeLoadException
when there is an active System.Reflection.Emit.AssemblyBuilder
in the current AppDomain
.Attempting to JIT compile
exception when using the Notifications API on iOS devices.No API change but sort order changes slightly with accented characters grouped together and some special characters sorting differently. "One third" now sorts ahead of "one-third".
It uses the table at ftp://ftp.unicode.org/Public/UCA/latest/allkeys.txt
It groups all characters that look visually identical, that is, it puts a, à, å together and before ø, o, ö even. This is a flaw because, for example, å should come last in Denmark. But it's the best we can do now, until we get more locale aware.
Uses core 1.1.2
Published by kristiandupont over 8 years ago
RealmObject
classes will now implicitly implement INotifyPropertyChanged
if you specify the interface on your class. Thanks to Joe Brock for this contribution!long
is supported in queriesSystem.String System.String::Format(System.IFormatProvider,System.String,System.Object)
fixedRealmObject
and static properties in RealmObject
classes now cause the weaver to properly report errors as we don't (yet) support those..Equals()
on standalone objects no longer throws.Published by kristiandupont over 8 years ago
RealmResults<T>
no longer implicitly implements INotifyCollectionChanged
. Use the new ToNotifyCollectionChanged
method instead.RealmResults<T>
can be observed for granular changes via the new SubscribeForNotifications
method.Realm
gained the WriteAsync
method which allows a write transaction to be executed on a background thread.byte[]
properties to store binary data.RealmResults<T>
received a new ToNotifyCollectionChanged
extension method which produces an ObservableCollection<T>
-like wrapper suitable for MVVM data binding.DateTimeOffset
properties are supported now.null
to a string property will now correctly return null
NullReferenceException
RealmConfiguration
was missing some members.Published by AndyDentFree over 8 years ago
String.Contains(String)
, String.StartsWith(String)
, and String.EndsWith(String)
methods now support variable expressions. Previously they only worked with literal strings.Realm
and RealmWeaver
NuGet packages have been combined into a single Realm
package.RealmResults<T>
now implements INotifyCollectionChanged
by raising the CollectionChanged
event with NotifyCollectionChangedAction.Reset
when its underlying table or query result is changed by a write transaction.Published by AndyDentFree over 8 years ago
Realm.RemoveRange<>()
and Realm.RemoveAll<>()
methods added to allow you to delete objects from a realm.Realm.Write()
method added for executing code within an implicitly committed transactionRealmConfiguration.ObjectClasses
.== true
(issue #362)realm.All<Owner>().Where(p => p.Name == "Dani").First();
as well as with a lambda expression realm.All<Owner>().Single( p => p.Name == "Tim");
OrderBy
, OrderByDescending
, ThenBy
and ThenByDescending
clauses. Sorts can be applied to results of a query from a Where
clause or sorting the entire class by applying after All<>
.String.Contains(String)
, String.StartsWith(String)
, and String.EndsWith(String)
methods can now be used in Where clauses.armeabi
builds on old ARM V5 and V6 devices has been removed.RealmList.CopyTo
so you can apply ToList
to related lists (issue #299)libwrappers.so
for Android targets using $(SolutionDir)packages
so it copes with the different relative paths in cross-platform (Xamarin Forms) app templates vs pure Android templates.Realm.RealmChanged
event notifies you of changes made to the realmRealm.Refresh()
makes sure the realm is updated with changes from other threads.Published by AndyDentFree over 8 years ago
RealmConfiguration.EncryptionKey
added so files can be encrypted and existing encrypted files from other Realm sources opened (assuming you have the key).RealmConfiguration.DefaultConfiguration
without having linked a platform-specific dll, you will now get the warning message with a PlatformNotSupportedException
. Previously threw a TypeInitExepction
.Published by AndyDentFree over 8 years ago
This minor release only adds changes for Android users, adding the ABIs arm64-v8a
and x86_64
for 64 bit devices.
See the Xamarin Android CPU page for more details on the meanings of these ABI codes.
No functional changes were made, just recompilation and packaging with the core binaries added.