SQLiteIndexContextData.h (1373B)
1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the MIT License. 3 #pragma once 4 #include <AppInstallerLanguageUtilities.h> 5 #include <filesystem> 6 7 8 namespace AppInstaller::Repository::Microsoft::Schema 9 { 10 // Names a property 11 enum class Property : size_t 12 { 13 PackageUpdateTrackingBaseTime, 14 IntermediateFileOutputPath, 15 DatabaseFilePath, 16 Max 17 }; 18 19 namespace details 20 { 21 template <Property D> 22 struct PropertyMapping 23 { 24 // value_t type specifies the type of this property 25 }; 26 27 template <> 28 struct PropertyMapping<Property::PackageUpdateTrackingBaseTime> 29 { 30 using value_t = int64_t; 31 static constexpr bool SetThroughInterface = true; 32 }; 33 34 template <> 35 struct PropertyMapping<Property::IntermediateFileOutputPath> 36 { 37 using value_t = std::filesystem::path; 38 static constexpr bool SetThroughInterface = false; 39 }; 40 41 template <> 42 struct PropertyMapping<Property::DatabaseFilePath> 43 { 44 using value_t = std::filesystem::path; 45 static constexpr bool SetThroughInterface = false; 46 }; 47 } 48 49 using SQLiteIndexContextData = EnumBasedVariantMap<Property, details::PropertyMapping>; 50 }