-
Notifications
You must be signed in to change notification settings - Fork 16
/
database_statistics.go
40 lines (34 loc) · 1.64 KB
/
database_statistics.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
package ravendb
import "time"
// DatabaseStatistics describes a result of GetStatisticsCommand
type DatabaseStatistics struct {
LastDocEtag int64 `json:"LastDocEtag"`
CountOfIndexes int `json:"CountOfIndexes"`
CountOfDocuments int64 `json:"CountOfDocuments"`
CountOfRevisionDocuments int64 `json:"CountOfRevisionDocuments"` // TODO: present in Java, not seen in JSON
CountOfDocumentsConflicts int64 `json:"CountOfDocumentsConflicts"`
CountOfTombstones int64 `json:"CountOfTombstones"`
CountOfConflicts int64 `json:"CountOfConflicts"`
CountOfAttachments int64 `json:"CountOfAttachments"`
CountOfUniqueAttachments int64 `json:"CountOfUniqueAttachments"`
Indexes []*IndexInformation `json:"Indexes"`
DatabaseChangeVector string `json:"DatabaseChangeVector"`
DatabaseID string `json:"DatabaseId"`
Is64Bit bool `json:"Is64Bit"`
Pager string `json:"Pager"`
LastIndexingTime *Time `json:"LastIndexingTime"`
SizeOnDisk *Size `json:"SizeOnDisk"`
TempBuffersSizeOnDisk *Size `json:"TempBuffersSizeOnDisk"`
NumberOfTransactionMergerQueueOperations int `json:"NumberOfTransactionMergerQueueOperations"`
}
// GetLastIndexingTime returns last indexing time
func (s *DatabaseStatistics) GetLastIndexingTime() *time.Time {
return s.LastIndexingTime.toTimePtr()
}
/*
public IndexInformation[] getStaleIndexes() {
return Arrays.stream(indexes)
.filter(x -> x.isStale())
.toArray(IndexInformation[]::new);
}
*/