◆ ProgressDone()
| double duckdb::ProgressData::ProgressDone |
( |
| ) |
const |
|
inline |
19906 {
19907
19908 D_ASSERT(IsValid());
19909
19910 return done / total;
19911 }
◆ Add()
19913 {
19914
19915 done += other.done;
19916 total += other.total;
19917 invalid = invalid || other.invalid;
19918 }
◆ Normalize()
19919 {
19920
19921 D_ASSERT(target > 0.0);
19922 if (IsValid()) {
19923 if (total > 0.0) {
19924 done /= total;
19925 }
19926 total = 1.0;
19927 done *= target;
19928 total *= target;
19929 } else {
19930 SetInvalid();
19931 }
19932 }
◆ SetInvalid()
| void duckdb::ProgressData::SetInvalid |
( |
| ) |
|
|
inline |
19933 {
19934 invalid = true;
19935 done = 0.0;
19936 total = 1.0;
19937 }
◆ IsValid()
| bool duckdb::ProgressData::IsValid |
( |
| ) |
const |
|
inline |
19938 {
19939 return (!invalid) && (done >= 0.0) && (done <= total) && (total >= 0.0);
19940 }
The documentation for this struct was generated from the following file: