github.com/octohelm/storage@v0.0.0-20240516030302-1ac2cc1ea347/pkg/sqlbuilder/addition_comment.go (about) 1 package sqlbuilder 2 3 import ( 4 "context" 5 ) 6 7 func Comment(c string) Addition { 8 return &comment{text: []byte(c)} 9 } 10 11 type comment struct { 12 text []byte 13 } 14 15 func (comment) AdditionType() AdditionType { 16 return AdditionComment 17 } 18 19 func (c *comment) IsNil() bool { 20 return c == nil || len(c.text) == 0 21 } 22 23 func (c *comment) Ex(ctx context.Context) *Ex { 24 e := ExactlyExpr("") 25 e.WhiteComments(c.text) 26 return e.Ex(ctx) 27 }