- Notifications
You must be signed in to change notification settings - Fork173
Add flexible schema mapping POC#3635
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
coveralls-officialbot commentedJun 26, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Pull Request Test Coverage Report forBuild 9681982895Details
💛 -Coveralls |
coveralls-officialbot commentedJul 1, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Pull Request Test Coverage Report forBuild 9742975006Details
💛 -Coveralls |
| if (getValueLines.Length == 0) | ||
| { | ||
| getValueBody = @"throw new MissingMemberException($""The object does not have a gettable Realm property with name {propertyName}"");"; | ||
| } | ||
| else | ||
| { | ||
| getValueBody = $@"return propertyName switch | ||
| {{ | ||
| {getValueLines.Indent(trimNewLines: true)} | ||
| _ => throw new MissingMemberException($""The object does not have a gettable Realm property with name {{propertyName}}""), | ||
| }};"; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
| if (setValueLines.Length == 0) | ||
| { | ||
| setValueBody = @"throw new MissingMemberException($""The object does not have a settable Realm property with name {propertyName}"");"; | ||
| } | ||
| else | ||
| { | ||
| setValueBody = $@"switch (propertyName) | ||
| {{ | ||
| {setValueLines.Indent(trimNewLines: true)} | ||
| default: | ||
| throw new MissingMemberException($""The object does not have a settable Realm property with name {{propertyName}}""); | ||
| }}"; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
| if (getListValueLines.Length == 0) | ||
| { | ||
| getListValueBody = @"throw new MissingMemberException($""The object does not have a Realm list property with name {propertyName}"");"; | ||
| } | ||
| else | ||
| { | ||
| getListValueBody = $@"return propertyName switch | ||
| {{ | ||
| {getListValueLines.Indent(trimNewLines: true)} | ||
| _ => throw new MissingMemberException($""The object does not have a Realm list property with name {{propertyName}}""), | ||
| }};"; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
| if (getSetValueLines.Length == 0) | ||
| { | ||
| getSetValueBody = @"throw new MissingMemberException($""The object does not have a Realm set property with name {propertyName}"");"; | ||
| } | ||
| else | ||
| { | ||
| getSetValueBody = $@"return propertyName switch | ||
| {{ | ||
| {getSetValueLines.Indent(trimNewLines: true)} | ||
| _ => throw new MissingMemberException($""The object does not have a Realm set property with name {{propertyName}}""), | ||
| }};"; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
| if (getDictionaryValueLines.Length == 0) | ||
| { | ||
| getDictionaryValueBody = @"throw new MissingMemberException($""The object does not have a Realm dictionary property with name {propertyName}"");"; | ||
| } | ||
| else | ||
| { | ||
| getDictionaryValueBody = $@"return propertyName switch | ||
| {{ | ||
| {getDictionaryValueLines.Indent(trimNewLines: true)} | ||
| _ => throw new MissingMemberException($""The object does not have a Realm dictionary property with name {{propertyName}}""), | ||
| }};"; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
| if (property.TypeInfo.IsBacklink) | ||
| { | ||
| getFieldString = "GetBacklinks"; | ||
| } | ||
| else | ||
| { | ||
| getFieldString = property.TypeInfo.CollectionType switch | ||
| { | ||
| CollectionType.List => "GetListValue", | ||
| CollectionType.Set => "GetSetValue", | ||
| CollectionType.Dictionary => "GetDictionaryValue", | ||
| _ => throw new NotImplementedException(), | ||
| }; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
Pull Request Test Coverage Report forBuild 9875518284Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 -Coveralls |
Uh oh!
There was an error while loading.Please reload this page.
Notes doc
TODO:
Must-have
Nice to have