Add support for index operators#662
Conversation
78c8d65 to
5657211
Compare
austindrenski
left a comment
There was a problem hiding this comment.
Looks interesting, thanks for this! Just a few nits here.
| string IndexColumnList(string[] columns, string[] operators) | ||
| { | ||
| if (operators == null || operators.Length == 0) | ||
| { |
| var @operator = operators[i]; | ||
|
|
||
| if (string.IsNullOrEmpty(@operator)) | ||
| { |
| var identifier = Dependencies.SqlGenerationHelper.DelimitIdentifier(v); | ||
|
|
||
| if (i >= operators.Length) | ||
| { |
5657211 to
fa5d0dc
Compare
|
Looks like the CI failure is unrelated? |
|
I think so, just started a rebuild on AppVeyor. |
|
Indeed 🎉 |
austindrenski
left a comment
There was a problem hiding this comment.
Just took another look, and it looks good so far. Two additional considerations:
- Would it be much more work to add support for sort options?
- Could you take a look at how the current implementation handles a schema-qualified operator class?
I don't know. It would definitely add to the complexity. If it's OK with you, I'd like to punt on it for now and maybe take a look at them later. I really need operator support, whereas I have never used or seen sort options being used before.
You mean if someone pass |
OK that sounds good—just wanted to make sure it wasn't an unintentional punt.
Yes. For example, in the enum case, |
Ah, yeah, that's probably happening here as well, unless |
|
OK, I think the schema-qualified case should be handled now 👍 |
|
That looks great! Thanks for making those changes and the additional unit test. @roji @YohDeadfall Could one of you give this a second review? |
austindrenski
left a comment
There was a problem hiding this comment.
A few more questions regarding string[]/IReadOnlyList<string>.
|
@roji Did you want to give this a look before the merge? |
|
@khellang Would you mind rebasing? |
d9a106d to
3c1f02a
Compare
3c1f02a to
824c091
Compare
|
@austindrenski Done! ✨ |
roji
left a comment
There was a problem hiding this comment.
Looks great, thanks for the quality work and the reviewing!
@austindrenski you can go ahead and merge.
Just picking up the good work done by @quanterion in #257.
I tried looking at scaffolding support as well, but it was a bit involved, so figured I'd punt on it for now and focus on getting the runtime support in.
Closes #481