ArpVersionVirtualTable.h (2128B)
1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the MIT License. 3 #pragma once 4 #include <winget/SQLiteStatementBuilder.h> 5 #include "Microsoft/Schema/1_0/VersionTable.h" 6 #include "Microsoft/Schema/1_0/VirtualTableBase.h" 7 #include <string_view> 8 9 using namespace std::string_view_literals; 10 11 namespace AppInstaller::Repository::Microsoft::Schema::V1_5 12 { 13 // A virtual table used to add Arp min version to ManifestTable, the values are stored in VersionTable. 14 struct ArpMinVersionVirtualTable : public V1_0::VirtualTableBase 15 { 16 // The id type 17 using id_t = V1_0::VersionTable::id_t; 18 19 // The value type 20 using value_t = V1_0::VersionTable::value_t; 21 22 // The name of the table. 23 static constexpr std::string_view TableName() 24 { 25 return V1_0::VersionTable::TableName(); 26 } 27 28 // The value name of the column. 29 static constexpr std::string_view ValueName() 30 { 31 return V1_0::VersionTable::ValueName(); 32 } 33 34 // The value name of the manifest table column. 35 static constexpr std::string_view ManifestColumnName() 36 { 37 return "arp_min_version"sv; 38 } 39 }; 40 41 // A virtual table used to add Arp max version to ManifestTable, the values are stored in VersionTable. 42 struct ArpMaxVersionVirtualTable : public V1_0::VirtualTableBase 43 { 44 // The id type 45 using id_t = V1_0::VersionTable::id_t; 46 47 // The value type 48 using value_t = V1_0::VersionTable::value_t; 49 50 // The name of the table. 51 static constexpr std::string_view TableName() 52 { 53 return V1_0::VersionTable::TableName(); 54 } 55 56 // The value name of the column. 57 static constexpr std::string_view ValueName() 58 { 59 return V1_0::VersionTable::ValueName(); 60 } 61 62 // The value name of the manifest table column. 63 static constexpr std::string_view ManifestColumnName() 64 { 65 return "arp_max_version"sv; 66 } 67 }; 68 }