Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Remove Default in schema.Table #298

Closed
roneli opened this issue May 31, 2022 · 0 comments · Fixed by #324 or #325
Closed

Remove Default in schema.Table #298

roneli opened this issue May 31, 2022 · 0 comments · Fixed by #324 or #325
Labels
bug Something isn't working

Comments

@roneli
Copy link
Contributor

roneli commented May 31, 2022

Describe the bug

The default option was added to allow if an error occurs / the getter gets a nil to set a default value

The logic in execution is a little weird as with the funk.Get if nil is returned it will set default value (if not nil), but if a resolver is set
a default will only be set if the resolver returned an error, and in some cases like PathResolver it will act the same as funk.Get and return nil

Expected Behavior

default value should always be set / removed

Steps to Reproduce

Possible Solution

remove default option from schema.Table and use schema.PathResolverWithDefault / let resolvers define defaults or accept defaults as arguments.

Before removing the default value, we can first add the schema.PathResolverWithDefault as a starter.

Another option is to define the expected logic of when a default should be set

Provider and CloudQuery version

all

Additional Context

No response

@roneli roneli added the bug Something isn't working label May 31, 2022
roneli added a commit to roneli/cq-provider-sdk that referenced this issue Jun 7, 2022
roneli added a commit that referenced this issue Jun 7, 2022
kodiakhq bot pushed a commit that referenced this issue Jun 7, 2022
🤖 I have created a release *beep* *boop*
---


## [0.10.11](v0.10.10...v0.10.11) (2022-06-07)


### Features

* Remove default value option from column ([#324](#324)) ([33a4353](33a4353)), closes [#298](#298)

---
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
1 participant