sql_executor.go 571 B

1234567891011121314151617181920212223
  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{Schema: dbSchema})
  17. }