-
Notifications
You must be signed in to change notification settings - Fork 357
Introducing parameters' DbType before passing on to the database - MsSql #1442
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
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
9097bb6
Initial progress
ayush3797 65507bb
Changing param dict to store {paramName,{paramValue,DbType}}
ayush3797 0a9487f
reverting change
ayush3797 3ad1b7a
Adding DbType to params for MsSql
ayush3797 faa240b
fixing mssql test
ayush3797 2e9c9f7
Removing dbtype for datetime/datimeoffset since not required and caus…
ayush3797 923a602
Fixing cosmos tests
ayush3797 20deea6
build failure fixes
ayush3797 b3357b8
formatting fix
ayush3797 7021fbc
fixing tests
ayush3797 fa7d67e
Adding helper class for type resolution
ayush3797 f70d9e8
refactor
ayush3797 034d55b
Fixing import order
ayush3797 ad034c7
Merge branch 'main' into dev/agarwalayush/parameterTypeForParamsToDb
ayush3797 e90090f
adding param type for SPs
ayush3797 3e693f6
single->real
ayush3797 acc3813
test for null bytearray
ayush3797 c9c00f4
Merge branch 'main' into dev/agarwalayush/parameterTypeForParamsToDb
ayush3797 586b9c3
Adding class for param, delegating responsibility for adding DbType t…
ayush3797 d5d68ee
Merge branch 'dev/agarwalayush/parameterTypeForParamsToDb' of https:/…
ayush3797 b5effd5
Renaming func and nits
ayush3797 4c3b073
Merge branch 'main' into dev/agarwalayush/parameterTypeForParamsToDb
ayush3797 437033f
nits
ayush3797 e8ca84a
adding comments
ayush3797 404b8ab
reverting changes
ayush3797 45117f1
centralising encoded param name creation
ayush3797 abb3732
Merge branch 'main' into dev/agarwalayush/parameterTypeForParamsToDb
ayush3797 02feeaa
Merge branch 'main' into dev/agarwalayush/parameterTypeForParamsToDb
ayush3797 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Data; | ||
|
|
||
| namespace Azure.DataApiBuilder.Service.Models | ||
| { | ||
| /// <summary> | ||
| /// Represents a single parameter created for the database connection. | ||
| /// </summary> | ||
| public class DbConnectionParam | ||
| { | ||
| public DbConnectionParam(object? value, DbType? dbType = null) | ||
| { | ||
| Value = value; | ||
| DbType = dbType; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Value of the parameter. | ||
| /// </summary> | ||
| public object? Value { get; set; } | ||
|
|
||
| // DbType of the parameter. | ||
|
ayush3797 marked this conversation as resolved.
|
||
| // This is being made nullable because GraphQL treats Sql Server types like datetime, datetimeoffset | ||
| // identically and then implicit conversion cannot happen. | ||
| // For more details refer: https://github.com/Azure/data-api-builder/pull/1442. | ||
| public DbType? DbType { get; set; } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.