MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / GetProjectByID

Function GetProjectByID

cmd/cql-proxy/model/project.go:83–91  ·  view source on GitHub ↗

GetProjectByID fetches the project object using project database id.

(db *gorp.DbMap, dbID proto.DatabaseID, developer int64)

Source from the content-addressed store, hash-verified

81
82// GetProjectByID fetches the project object using project database id.
83func GetProjectByID(db *gorp.DbMap, dbID proto.DatabaseID, developer int64) (p *Project, err error) {
84 err = db.SelectOne(&p,
85 `SELECT * FROM "project" WHERE "database_id" = ? AND "developer_id" = ? LIMIT 1`,
86 dbID, developer)
87 if err != nil {
88 err = errors.Wrapf(err, "get project failed")
89 }
90 return
91}
92
93// GetProjects fetches projects owned by developer and specified account address.
94func GetProjects(db *gorp.DbMap, developer int64, account int64) (p []*Project, err error) {

Callers 2

getProjectOAuthCallbackFunction · 0.92
getProjectDBFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected