sql_executor.go 577 B

12345678910111213141516171819202122232425
  1. package service
  2. import (
  3. "git.sxidc.com/go-framework/baize/convenient/domain/sql_executor"
  4. "git.sxidc.com/go-framework/baize/framework/core/application"
  5. )
  6. var sqlExecutorService = &SqlExecutorService{}
  7. type SqlExecutorService struct{}
  8. func (svc *SqlExecutorService) Init(appInstance *application.App) error {
  9. svc.prefixRoot(appInstance)
  10. return nil
  11. }
  12. func (svc *SqlExecutorService) Destroy() error {
  13. return nil
  14. }
  15. func (svc *SqlExecutorService) prefixRoot(appInstance *application.App) {
  16. sql_executor.Bind(appInstance, &sql_executor.Simple{
  17. Schema: dbSchema,
  18. })
  19. }