github.com/kunlun-qilian/sqlx/v3@v3.0.0/er/er_test.go (about)

     1  package er_test
     2  
     3  import (
     4  	"github.com/kunlun-qilian/sqlx/v3/er"
     5  	"github.com/kunlun-qilian/sqlx/v3/generator/__examples__/database"
     6  	"github.com/kunlun-qilian/sqlx/v3/postgresqlconnector"
     7  	"github.com/kunlun-qilian/utils/json"
     8  )
     9  
    10  func ExampleDatabaseERFromDB() {
    11  	ers := er.DatabaseERFromDB(database.DBTest, &postgresqlconnector.PostgreSQLConnector{})
    12  	_, _ = json.MarshalIndent(ers, "", "  ")
    13  	// Output:
    14  }