1 | #include "duckdb/storage/storage_info.hpp" |
2 | |
3 | namespace duckdb { |
4 | |
5 | const uint64_t VERSION_NUMBER = 51; |
6 | |
7 | struct StorageVersionInfo { |
8 | const char *version_name; |
9 | idx_t storage_version; |
10 | }; |
11 | |
12 | static StorageVersionInfo storage_version_info[] = {{.version_name: "v0.7.0 or v0.7.1" , .storage_version: 43}, |
13 | {.version_name: "v0.6.0 or v0.6.1" , .storage_version: 39}, |
14 | {.version_name: "v0.5.0 or v0.5.1" , .storage_version: 38}, |
15 | {.version_name: "v0.3.3, v0.3.4 or v0.4.0" , .storage_version: 33}, |
16 | {.version_name: "v0.3.2" , .storage_version: 31}, |
17 | {.version_name: "v0.3.1" , .storage_version: 27}, |
18 | {.version_name: "v0.3.0" , .storage_version: 25}, |
19 | {.version_name: "v0.2.9" , .storage_version: 21}, |
20 | {.version_name: "v0.2.8" , .storage_version: 18}, |
21 | {.version_name: "v0.2.7" , .storage_version: 17}, |
22 | {.version_name: "v0.2.6" , .storage_version: 15}, |
23 | {.version_name: "v0.2.5" , .storage_version: 13}, |
24 | {.version_name: "v0.2.4" , .storage_version: 11}, |
25 | {.version_name: "v0.2.3" , .storage_version: 6}, |
26 | {.version_name: "v0.2.2" , .storage_version: 4}, |
27 | {.version_name: "v0.2.1 and prior" , .storage_version: 1}, |
28 | {.version_name: nullptr, .storage_version: 0}}; |
29 | |
30 | const char *GetDuckDBVersion(idx_t version_number) { |
31 | for (idx_t i = 0; storage_version_info[i].version_name; i++) { |
32 | if (version_number == storage_version_info[i].storage_version) { |
33 | return storage_version_info[i].version_name; |
34 | } |
35 | } |
36 | return nullptr; |
37 | } |
38 | |
39 | } // namespace duckdb |
40 | |