-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CSHARP-5453: Add builder for CSFLE schemas #1631
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
base: main
Are you sure you want to change the base?
Conversation
@sanych-sun @damieng Can you give a look at the current state of the API? It's mostly functioning too, but I would like to get some feedback before writing tests. |
…using the one that's already there)
@sanych-sun @damieng A couple of notes for the review:
|
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.
LGTM
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.
LGTM
@damieng @sanych-sun I know you've already LGMTd this, but I've added added a method to convert |
/// Maps a <see cref="BsonType"/> to its corresponding string representation. | ||
/// </summary> | ||
/// <param name="type">The input type to map.</param> | ||
public static string ToStringRepresentation(this BsonType type) |
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.
@rstam this is the new method
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.
I'm not sure we should add this to the public API just so EF Core can use it. EF Core can easily duplicate this very small method.
Unless there is a clear scenario where a USER would find this useful, I wouldn't add it to the public API.
Definitely a good idea to centralize this conversion in an internal
method for our own consumption.
If we do make this public I suggest it be done as a separate JIRA ticket so that users can see it.
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.
It's a useful method with a clear and defined purpose and limited API surface. If I need it in the EF provider chances are other people need it too and probably also had to reproduce it. They'd need it right now if they're doing their own queryable encryption or CSFLE work and are trying to leverage BsonType in order to generate the schema.
/// Maps a <see cref="BsonType"/> to its corresponding string representation. | ||
/// </summary> | ||
/// <param name="type">The input type to map.</param> | ||
public static string ToStringRepresentation(this BsonType type) |
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.
I'm not sure we should add this to the public API just so EF Core can use it. EF Core can easily duplicate this very small method.
Unless there is a clear scenario where a USER would find this useful, I wouldn't add it to the public API.
Definitely a good idea to centralize this conversion in an internal
method for our own consumption.
If we do make this public I suggest it be done as a separate JIRA ticket so that users can see it.
No description provided.