Merged in feature/jobsynced (pull request #72)
Job Status Get and DB tidy up * initalquery * tests * shorttests * testing queries * job * solvedthequery * updatingdb * fixingtests * repotests * shorttests * docker * testspassed
This commit is contained in:
@@ -73,30 +73,25 @@ type Clientcansync struct {
|
||||
Cansync bool `db:"cansync"`
|
||||
}
|
||||
|
||||
type Collector struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
}
|
||||
|
||||
type Collectoractiveversion struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Collectorid pgtype.UUID `db:"collectorid"`
|
||||
Versionid int32 `db:"versionid"`
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Versionid int32 `db:"versionid"`
|
||||
}
|
||||
|
||||
type Collectorcurrentactiveversion struct {
|
||||
Collectorid pgtype.UUID `db:"collectorid"`
|
||||
ID int32 `db:"id"`
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Activeversion int32 `db:"activeversion"`
|
||||
}
|
||||
|
||||
type Collectorlatestversion struct {
|
||||
Collectorid pgtype.UUID `db:"collectorid"`
|
||||
ID int32 `db:"id"`
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Latestversion int32 `db:"latestversion"`
|
||||
}
|
||||
|
||||
type Collectormincleanversion struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Collectorid pgtype.UUID `db:"collectorid"`
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Versionid int32 `db:"versionid"`
|
||||
Addedversion int32 `db:"addedversion"`
|
||||
Removedversion *int32 `db:"removedversion"`
|
||||
@@ -104,7 +99,7 @@ type Collectormincleanversion struct {
|
||||
|
||||
type Collectormintextversion struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Collectorid pgtype.UUID `db:"collectorid"`
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Versionid int32 `db:"versionid"`
|
||||
Addedversion int32 `db:"addedversion"`
|
||||
Removedversion *int32 `db:"removedversion"`
|
||||
@@ -112,7 +107,7 @@ type Collectormintextversion struct {
|
||||
|
||||
type Collectorquery struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Collectorid pgtype.UUID `db:"collectorid"`
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Name string `db:"name"`
|
||||
Queryid pgtype.UUID `db:"queryid"`
|
||||
Addedversion int32 `db:"addedversion"`
|
||||
@@ -120,7 +115,6 @@ type Collectorquery struct {
|
||||
}
|
||||
|
||||
type Collectorquerydependencytree struct {
|
||||
Collectorid pgtype.UUID `db:"collectorid"`
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Queryid pgtype.UUID `db:"queryid"`
|
||||
Type Querytype `db:"type"`
|
||||
@@ -129,9 +123,57 @@ type Collectorquerydependencytree struct {
|
||||
}
|
||||
|
||||
type Collectorversion struct {
|
||||
Collectorid pgtype.UUID `db:"collectorid"`
|
||||
ID int32 `db:"id"`
|
||||
Addedat pgtype.Timestamp `db:"addedat"`
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
ID int32 `db:"id"`
|
||||
Addedat pgtype.Timestamp `db:"addedat"`
|
||||
}
|
||||
|
||||
type Currentcleanentry struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Documentid pgtype.UUID `db:"documentid"`
|
||||
Bucket string `db:"bucket"`
|
||||
Key string `db:"key"`
|
||||
Version int32 `db:"version"`
|
||||
}
|
||||
|
||||
type Currentclientcansync struct {
|
||||
Clientid pgtype.UUID `db:"clientid"`
|
||||
Cansync bool `db:"cansync"`
|
||||
}
|
||||
|
||||
type Currentcollectormincleanversion struct {
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Mincleanversion int32 `db:"mincleanversion"`
|
||||
}
|
||||
|
||||
type Currentcollectormintextversion struct {
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Mintextversion int32 `db:"mintextversion"`
|
||||
}
|
||||
|
||||
type Currentcollectorqueriesjsonagg struct {
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Fields []byte `db:"fields"`
|
||||
}
|
||||
|
||||
type Currentcollectorquery struct {
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Name *string `db:"name"`
|
||||
Queryid pgtype.UUID `db:"queryid"`
|
||||
}
|
||||
|
||||
type Currentjobcansync struct {
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Cansync bool `db:"cansync"`
|
||||
}
|
||||
|
||||
type Currenttextentry struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Documentid pgtype.UUID `db:"documentid"`
|
||||
Bucket string `db:"bucket"`
|
||||
Key string `db:"key"`
|
||||
Version int32 `db:"version"`
|
||||
Cleanentryid pgtype.UUID `db:"cleanentryid"`
|
||||
}
|
||||
|
||||
type Document struct {
|
||||
@@ -156,15 +198,14 @@ type Documententry struct {
|
||||
}
|
||||
|
||||
type Documenttextextraction struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Documentid pgtype.UUID `db:"documentid"`
|
||||
Version int32 `db:"version"`
|
||||
Bucket string `db:"bucket"`
|
||||
Key string `db:"key"`
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Cleanentryid pgtype.UUID `db:"cleanentryid"`
|
||||
Version int32 `db:"version"`
|
||||
Bucket string `db:"bucket"`
|
||||
Key string `db:"key"`
|
||||
}
|
||||
|
||||
type Fullactivecollector struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Jobid pgtype.UUID `db:"jobid"`
|
||||
Mincleanversion int32 `db:"mincleanversion"`
|
||||
Mintextversion int32 `db:"mintextversion"`
|
||||
@@ -218,13 +259,28 @@ type Queryconfig struct {
|
||||
}
|
||||
|
||||
type Querycurrentactiveversion struct {
|
||||
Queryid pgtype.UUID `db:"queryid"`
|
||||
Activeversion int32 `db:"activeversion"`
|
||||
}
|
||||
|
||||
type Querycurrentconfig struct {
|
||||
Queryid pgtype.UUID `db:"queryid"`
|
||||
ID int32 `db:"id"`
|
||||
Config []byte `db:"config"`
|
||||
}
|
||||
|
||||
type Querycurrentrequiredid struct {
|
||||
Queryid pgtype.UUID `db:"queryid"`
|
||||
Requiredqueryid pgtype.UUID `db:"requiredqueryid"`
|
||||
}
|
||||
|
||||
type Querycurrentrequiredidsagg struct {
|
||||
Queryid pgtype.UUID `db:"queryid"`
|
||||
Requiredids []pgtype.UUID `db:"requiredids"`
|
||||
}
|
||||
|
||||
type Querylatestversion struct {
|
||||
Queryid pgtype.UUID `db:"queryid"`
|
||||
ID int32 `db:"id"`
|
||||
Queryid pgtype.UUID `db:"queryid"`
|
||||
Latestversion int32 `db:"latestversion"`
|
||||
}
|
||||
|
||||
type Queryversion struct {
|
||||
@@ -243,10 +299,13 @@ type Requiredquery struct {
|
||||
|
||||
type Result struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Textentryid pgtype.UUID `db:"textentryid"`
|
||||
Queryid pgtype.UUID `db:"queryid"`
|
||||
Documentid pgtype.UUID `db:"documentid"`
|
||||
Value string `db:"value"`
|
||||
Cleanversion int32 `db:"cleanversion"`
|
||||
Textversion int32 `db:"textversion"`
|
||||
Queryversion int32 `db:"queryversion"`
|
||||
}
|
||||
|
||||
type Resultdependency struct {
|
||||
Resultid pgtype.UUID `db:"resultid"`
|
||||
Requiredresultid pgtype.UUID `db:"requiredresultid"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user