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

     1  package builder_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	g "github.com/onsi/gomega"
     7  
     8  	. "github.com/machinefi/w3bstream/pkg/depends/kit/sqlx/builder"
     9  	. "github.com/machinefi/w3bstream/pkg/depends/testutil/buildertestutil"
    10  )
    11  
    12  func TestAlias(t *testing.T) {
    13  	t.Run("Alias", func(t *testing.T) {
    14  		g.NewWithT(t).Expect(Alias(Expr("f_id"), "id")).
    15  			To(BeExpr("f_id AS id"))
    16  	})
    17  }