Skip to content

Conversation

@SergeiPavlov
Copy link
Contributor

@SergeiPavlov SergeiPavlov commented Apr 29, 2022

  • Make abstract class SqlFunctionCallBase with functionality common for both SqlFunctionCall & SqlCustomFunctionCall
  • Change type of SqlFunctionCall.Arguments to IReadOnlyList to avoid unnecessary allocations. Argument list is now immutable.
  • Replace Collection<SqlExpression> to List<SqlExpression>. List is more lightweight with same functionality
  • Make ArgumentValidator.EnsureArgumentIs<T>() to return T to avoid double type casting after call
  • Make EnsureArgumentIs's parameter parameterName automatic by using [CallerArgumentExpression] attribute
  • Remove invocation of EnsureArgumentNotNull before EnsureArgumentIs because the later checks for null as well.

@alex-kulakov
Copy link
Contributor

Also worth mentioning that FunctionCalls lost ability to change parameters after creation.

SergeiPavlov and others added 15 commits July 19, 2022 14:13
Co-authored-by: Alexey Kulakov <alexey.kulakov@dataobjects.net>
Co-authored-by: Alexey Kulakov <alexey.kulakov@dataobjects.net>
Co-authored-by: Alexey Kulakov <alexey.kulakov@dataobjects.net>
Co-authored-by: Alexey Kulakov <alexey.kulakov@dataobjects.net>
Co-authored-by: Alexey Kulakov <alexey.kulakov@dataobjects.net>
Co-authored-by: Alexey Kulakov <alexey.kulakov@dataobjects.net>
Co-authored-by: Alexey Kulakov <alexey.kulakov@dataobjects.net>
Co-authored-by: Alexey Kulakov <alexey.kulakov@dataobjects.net>
@SergeiPavlov
Copy link
Contributor Author

Also worth mentioning that FunctionCalls lost ability to change parameters after creation.

I mentioned in the PR description that Arguments is now immutable.

@alex-kulakov
Copy link
Contributor

Yes, you did, pardon me for inattention.

@alex-kulakov alex-kulakov merged commit 9aa2902 into DataObjects-NET:master Jul 22, 2022
@SergeiPavlov SergeiPavlov deleted the upstream/Optimize_FunctionCall branch July 22, 2022 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants