-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
binary type support #1320
Merged
Merged
binary type support #1320
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9f1a91c
initial sync conn bundle_id
blagoev 94be95c
fix linux cmake
blagoev d80dd91
add bundleid to ios and macos
blagoev 55e1548
add bundle_id to android
blagoev 543409a
switch to java 11 on ci
blagoev a0acbb5
refactor getBundleId
blagoev 8694b47
fix name
blagoev 06db6ad
fix bundleid test
blagoev e7f8682
fix cmake on linukst
blagoev 4992a8a
fix linux cmake
blagoev 510e8f7
add bundleid to Dart
blagoev 29e6bb5
do set app bundle id.
blagoev 730670a
fixes
blagoev c31b45b
initial binary type support
blagoev c574048
Merge branch 'main' into blagoev/binary-type
blagoev ac9d843
fix generator tests
blagoev b6443cb
add changelog entry
blagoev c395f89
revert name change
blagoev b300d09
Update generator/lib/src/realm_model_info.dart
blagoev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import 'dart:typed_data'; | ||
|
||
import 'package:realm_common/realm_common.dart'; | ||
|
||
@RealmModel() | ||
class _Foo { | ||
late Uint8List requiredBinaryProp; | ||
var defaultValueBinaryProp = Uint8List(8); | ||
late Uint8List? nullableBinaryProp; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// ************************************************************************** | ||
// RealmObjectGenerator | ||
// ************************************************************************** | ||
|
||
class Foo extends _Foo with RealmEntity, RealmObjectBase, RealmObject { | ||
Foo( | ||
Uint8List requiredBinaryProp, { | ||
Uint8List? defaultValueBinaryProp, | ||
Uint8List? nullableBinaryProp, | ||
}) { | ||
RealmObjectBase.set(this, 'requiredBinaryProp', requiredBinaryProp); | ||
RealmObjectBase.set(this, 'defaultValueBinaryProp', defaultValueBinaryProp ?? Uint8List(8)); | ||
RealmObjectBase.set(this, 'nullableBinaryProp', nullableBinaryProp); | ||
} | ||
|
||
Foo._(); | ||
|
||
@override | ||
Uint8List get requiredBinaryProp => | ||
RealmObjectBase.get<Uint8List>(this, 'requiredBinaryProp') as Uint8List; | ||
@override | ||
set requiredBinaryProp(Uint8List value) => | ||
RealmObjectBase.set(this, 'requiredBinaryProp', value); | ||
|
||
@override | ||
Uint8List get defaultValueBinaryProp => | ||
RealmObjectBase.get<Uint8List>(this, 'defaultValueBinaryProp') | ||
as Uint8List; | ||
@override | ||
set defaultValueBinaryProp(Uint8List value) => | ||
RealmObjectBase.set(this, 'defaultValueBinaryProp', value); | ||
|
||
@override | ||
Uint8List? get nullableBinaryProp => | ||
RealmObjectBase.get<Uint8List>(this, 'nullableBinaryProp') as Uint8List?; | ||
@override | ||
set nullableBinaryProp(Uint8List? value) => | ||
RealmObjectBase.set(this, 'nullableBinaryProp', value); | ||
|
||
@override | ||
Stream<RealmObjectChanges<Foo>> get changes => | ||
RealmObjectBase.getChanges<Foo>(this); | ||
|
||
@override | ||
Foo freeze() => RealmObjectBase.freezeObject<Foo>(this); | ||
|
||
static SchemaObject get schema => _schema ??= _initSchema(); | ||
static SchemaObject? _schema; | ||
static SchemaObject _initSchema() { | ||
RealmObjectBase.registerFactory(Foo._); | ||
return const SchemaObject(ObjectType.realmObject, Foo, 'Foo', [ | ||
SchemaProperty('requiredBinaryProp', RealmPropertyType.binary), | ||
SchemaProperty('defaultValueBinaryProp', RealmPropertyType.binary), | ||
SchemaProperty('nullableBinaryProp', RealmPropertyType.binary, | ||
optional: true), | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was just formatted