-
Notifications
You must be signed in to change notification settings - Fork 17
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
We need a way to test for space existance without exception #125
base: master
Are you sure you want to change the base?
Conversation
{ | ||
using (var tarantoolClient = await Client.Box.Connect(ConnectionStringFactory.GetReplicationSource_1_7())) | ||
{ | ||
foreach (var pair in (IReadOnlyDictionary<string, ISpace>)tarantoolClient.Schema) |
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 will be pain in the ass, because you always forced to cast schema to exact interface.
{ | ||
using (var tarantoolClient = await Client.Box.Connect(ConnectionStringFactory.GetReplicationSource_1_7())) | ||
{ | ||
foreach (var pair in (IReadOnlyDictionary<string, ISpace>)tarantoolClient.Schema) |
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.
How about exposing IndexByName and IndexById as IReadonlyDictionaries instead of decoration?
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.
box.Schema.IndexByName
?
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.
Sorry, typo, should be:
- Properties IndexByName and IndexById in Space
- Properties SpaceByName and SpaceById in Schema
Implementing
IReadOnlyDictionary
seems to be reasonable choice, but question arises: what should we return in untyped Enumerator?