github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/pkg/depends/kit/sqlx/builder/builder_addition_comment.go (about)

     1  package builder
     2  
     3  import "context"
     4  
     5  type comment struct {
     6  	AdditionType
     7  	text []byte
     8  }
     9  
    10  func Comment(text string) *comment { return &comment{AdditionComment, []byte(text)} }
    11  
    12  func (c *comment) IsNil() bool { return c == nil || len(c.text) == 0 }
    13  
    14  func (c *comment) Ex(ctx context.Context) *Ex {
    15  	e := ExactlyExpr("")
    16  	e.WriteComments(c.text)
    17  	return e.Ex(ctx)
    18  }