You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
Go
54 lines
1.3 KiB
Go
package projectClarity
|
|
|
|
import (
|
|
"database/sql"
|
|
"log"
|
|
"mercury/src/db"
|
|
"time"
|
|
)
|
|
|
|
const ()
|
|
|
|
type (
|
|
ClarityLifeCycleEvent struct {
|
|
Id int64
|
|
ProjectNumber string
|
|
Timestamp time.Time
|
|
ChangedColumn string
|
|
PreviousValue string
|
|
NewValue string
|
|
Modifier int32
|
|
}
|
|
)
|
|
|
|
//<editor-fold name="ClarityDatabase">
|
|
/*======================================================================================
|
|
ClarityDatabase
|
|
======================================================================================*/
|
|
|
|
type clarityDatabase struct {
|
|
*db.DBConnectorGeneric
|
|
}
|
|
|
|
func NewClarityDatabase() *clarityDatabase {
|
|
return &clarityDatabase{&db.DBConnectorGeneric{}}
|
|
}
|
|
|
|
func (cdb *clarityDatabase) GetProjects() {
|
|
|
|
}
|
|
|
|
func (cdb *clarityDatabase) GetLifecycleEvents() *[]*ClarityLifeCycleEvent {
|
|
cb := func(rows *sql.Rows) *ClarityLifeCycleEvent {
|
|
container := ClarityLifeCycleEvent{}
|
|
err := rows.Scan(&container.Id, &container.ProjectNumber, &container.Timestamp, &container.ChangedColumn, &container.PreviousValue, &container.NewValue, &container.Modifier)
|
|
if err != nil {
|
|
log.Panicln(err)
|
|
}
|
|
return &container
|
|
}
|
|
return db.QueryForObjects[ClarityLifeCycleEvent](cdb.DBConnectorGeneric, db.ClarityDatabaseName, "read-clarity-lifecycleEvents.sql", cb)
|
|
}
|
|
|
|
//</editor-fold>
|