Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@giautm
Copy link
Collaborator

@giautm giautm commented May 21, 2022

This feature allow me to write code shorter than current implement. Support entql.FieldNil and entql.FieldNotNil

-type timeNil struct {
-	entql.TimeP
-}

-func (p *timeNil) Field(name string) entql.P {
-	return entql.FieldNil(name)
-}

-		tf.WhereDeleteTime(&timeNil{})
+		tf.WhereDeleteTime(entql.TimeFunc(entql.FieldNil))

@giautm
Copy link
Collaborator Author

giautm commented May 21, 2022

Or we just support entql.TimeNil and entql.TimeNotNil?

@giautm giautm changed the title feat: add <Type>Func to allow using entgl.FieldNil feat: add Nil/NotNil predicates May 21, 2022
Copy link
Member

@a8m a8m left a comment

Choose a reason for hiding this comment

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

💯

@a8m a8m merged commit 1e05ccc into ent:master May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants