Skip to content

feat: Add WithNullableFieldTransformer to transformers.TransformWithStruct options#2084

Merged
kodiakhq[bot] merged 1 commit intocloudquery:mainfrom
jeromewir:feat/transformers-non-nullable-fields-option
Feb 25, 2025
Merged

feat: Add WithNullableFieldTransformer to transformers.TransformWithStruct options#2084
kodiakhq[bot] merged 1 commit intocloudquery:mainfrom
jeromewir:feat/transformers-non-nullable-fields-option

Conversation

@jeromewir
Copy link
Copy Markdown
Contributor

Summary

Fixes cloudquery/cloudquery#20286

Add transformers.WithNullableFieldTransformer(func ...) to allow the SDK user to have custom rules to decide for a field nullability.
This is especially useful when the user defines its struct with some pointers and some regular value types: we can have the that set nil for pointers, non nil for non-pointers.


Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

…fault when using transformers.TransformWithStruct func
@kodiakhq kodiakhq bot merged commit 2175946 into cloudquery:main Feb 25, 2025
9 checks passed
kodiakhq bot pushed a commit that referenced this pull request Mar 7, 2025
🤖 I have created a release *beep* *boop*
---


## [4.74.0](v4.73.4...v4.74.0) (2025-03-07)


### Features

* Add description to time JSONschema ([#2083](#2083)) ([fc27b14](fc27b14))
* Add way to get Configtype time value for hashing ([#2077](#2077)) ([ed27292](ed27292))
* Add WithNullableFieldTransformer to transformers.TransformWithStruct options ([#2084](#2084)) ([2175946](2175946))


### Bug Fixes

* **deps:** Update aws-sdk-go-v2 monorepo ([#2074](#2074)) ([091e2c7](091e2c7))
* **deps:** Update aws-sdk-go-v2 monorepo ([#2080](#2080)) ([14ad9db](14ad9db))
* **deps:** Update aws-sdk-go-v2 monorepo ([#2085](#2085)) ([3da5572](3da5572))
* **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.13.6 ([#2089](#2089)) ([4faff6a](4faff6a))
* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.26.7 ([#2076](#2076)) ([dbdae2f](dbdae2f))
* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.26.8 ([#2090](#2090)) ([c4c9cd6](c4c9cd6))
* **deps:** Update module github.com/goccy/go-json to v0.10.5 ([#2086](#2086)) ([b238237](b238237))
* **deps:** Update module github.com/google/go-cmp to v0.7.0 ([#2088](#2088)) ([1895ddf](1895ddf))
* **deps:** Update module google.golang.org/protobuf to v1.36.5 ([#2081](#2081)) ([833b19c](833b19c))
* Ignore context cancelled errors. ([#2091](#2091)) ([bc50fd3](bc50fd3))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Cloudquery SDK: transformers.TransformWithStruct does not produce non nullable fields

2 participants