github.com/goravel/framework@v1.13.9/database/wire.go (about)

     1  //go:build wireinject
     2  // +build wireinject
     3  
     4  // The build tag makes sure the stub is not built in the final build.
     5  
     6  package database
     7  
     8  import (
     9  	"context"
    10  
    11  	"github.com/google/wire"
    12  
    13  	"github.com/goravel/framework/contracts/config"
    14  	"github.com/goravel/framework/database/db"
    15  	"github.com/goravel/framework/database/gorm"
    16  )
    17  
    18  //go:generate wire
    19  func InitializeOrm(ctx context.Context, config config.Config, connection string) (*OrmImpl, error) {
    20  	wire.Build(NewOrmImpl, gorm.QuerySet, gorm.GormSet, db.ConfigSet, gorm.DialectorSet)
    21  
    22  	return nil, nil
    23  }