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

[BIC-1903] Add configuration for is null / is not valued #34

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

JMGDoctolib
Copy link
Member

@JMGDoctolib JMGDoctolib commented Jan 24, 2024

Add a property properties_always_exists_in_document on model to be able to use IS NULL instead of IS NOT VALUED when true

@JMGDoctolib JMGDoctolib requested a review from a team as a code owner January 24, 2024 16:10
@JMGDoctolib JMGDoctolib self-assigned this Jan 24, 2024
Copy link
Member

@pimpin pimpin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

spec/base_spec.rb Outdated Show resolved Hide resolved
spec/base_spec.rb Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could also specify whats happen when properties_always_exist_in_document is set and a property is missing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, by a comment you mean in the code + readme?
If I understand well it will crash, right?

@pimpin pimpin self-requested a review January 24, 2024 17:23
@JMGDoctolib JMGDoctolib merged commit 26ecf34 into master Jan 25, 2024
4 checks passed
@JMGDoctolib JMGDoctolib deleted the BIC-1903 branch January 25, 2024 09:11
key = "meta().id" if key.to_s == "id"
case
when value.nil?
when value.nil? && use_is_null
"#{key} IS NULL"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB : This is should be "#{key} IS NOT NULL" (fixed in #35 )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants