-
Notifications
You must be signed in to change notification settings - Fork 0
/
refresh.go
64 lines (47 loc) · 1.46 KB
/
refresh.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package refresh
import (
"fmt"
"github.com/macinnir/dvc/core/lib"
"go.uber.org/zap"
)
const CommandName = "refresh"
// Refresh is the refresh command
func Cmd(logger *zap.Logger, config *lib.Config, args []string) error {
return nil
// totalTime := time.Now()
// // Import
// start := time.Now()
// c.Import(args)
// fmt.Printf("Import: %f seconds\n", time.Since(start).Seconds())
// // Gen Models
// start = time.Now()
// c.Gen([]string{"models"})
// fmt.Printf("Models: %f seconds\n", time.Since(start).Seconds())
// // Gen DALs
// start = time.Now()
// c.Gen([]string{"dals"})
// fmt.Printf("DALs: %f seconds\n", time.Since(start).Seconds())
// // Gen Interfaces
// start = time.Now()
// c.Gen([]string{"interfaces"})
// fmt.Printf("Interfaces: %f seconds\n", time.Since(start).Seconds())
// // Gen routes
// start = time.Now()
// c.Gen([]string{"routes"})
// fmt.Printf("Routes: %f seconds\n", time.Since(start).Seconds())
// fmt.Printf("Total: %f seconds\n", time.Since(totalTime).Seconds())
}
func helpRefresh() {
fmt.Println(`
refresh
FLAGS
-c Clean Delete any previously generated files that have been orphaned due to a change in the Database Schema (e.g. a dropped table)
-f Force Force file regeneration, regardless of whether or not a change has been detected for that schema.
Alias for running all of the following commands (in order):
1. import
2. gen models
3. gen dals
4. gen interfaces
5. gen routes
`)
}