MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / AddTables

Function AddTables

cmd/cql-proxy/model/init.go:22–40  ·  view source on GitHub ↗

AddTables register tables to gorp database map.

(dbMap *gorp.DbMap)

Source from the content-addressed store, hash-verified

20
21// AddTables register tables to gorp database map.
22func AddTables(dbMap *gorp.DbMap) {
23 dbMap.AddTableWithName(Developer{}, "developer").
24 SetKeys(true, "ID").
25 ColMap("GithubID").SetUnique(true)
26 dbMap.AddTableWithName(Session{}, "session").
27 SetKeys(false, "ID")
28 dbMap.AddTableWithName(TokenApply{}, "token_apply").
29 SetKeys(false, "ID")
30 dbMap.AddTableWithName(DeveloperPrivateKey{}, "private_keys").
31 SetKeys(true, "ID")
32 dbMap.AddTableWithName(Task{}, "task").
33 SetKeys(true, "ID")
34 tblProject := dbMap.AddTableWithName(Project{}, "project").
35 SetKeys(true, "ID")
36 tblProject.ColMap("Alias").SetUnique(true)
37 tblProject.ColMap("DB").SetUnique(true)
38
39 return
40}

Callers 1

initDBFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected