Skip to content
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

feat(spanner): allow untyped nil values in parameterized queries #4482

Merged
merged 3 commits into from Jul 22, 2021

Commits on Jul 22, 2021

  1. feat(spanner): Allow untyped nil values in params

    Removes the restriction that nil valued parameters must be typed. The current
    restriction prevents the usage of DML statements with one or more untyped nil
    parameter values to be used to insert/update a value to NULL. Cloud Spanner
    does not require all parameters to be typed, only when it would otherwise be
    ambigous what type should be used (e.g. non-NULL STRING/BYTES values).
    
    This restriction also prevents the usage of the go/sql driver with gorm, as
    gorm will generate statements with untyped nil parameter values.
    
    Fixes #4481
    olavloite committed Jul 22, 2021
    Copy the full SHA
    eccce55 View commit details
    Browse the repository at this point in the history
  2. fix: skip DML test on emulator

    Skip testing DML with untyped parameters on the emulator as it does
    not support untyped parameters.
    
    See GoogleCloudPlatform/cloud-spanner-emulator#31
    olavloite committed Jul 22, 2021
    Copy the full SHA
    62dac99 View commit details
    Browse the repository at this point in the history
  3. fix: add missing !

    olavloite committed Jul 22, 2021
    Copy the full SHA
    9fd61e7 View commit details
    Browse the repository at this point in the history