winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

CheckpointTable.h (779B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #pragma once
      4 #include <winget/SQLiteWrapper.h>
      5 #include <vector>
      6 #include <optional>
      7 
      8 namespace AppInstaller::Repository::Microsoft::Schema::Checkpoint_V1_0
      9 {
     10     struct CheckpointTable
     11     {
     12         // Get the table name.
     13         static std::string_view TableName();
     14 
     15         // Creates the table with named indices.
     16         static void Create(SQLite::Connection& connection);
     17 
     18         // Returns all checkpoint ids in descending (newest at the front) order.
     19         static std::vector<SQLite::rowid_t> GetCheckpointIds(SQLite::Connection& connection);
     20 
     21         // Adds a checkpoint.
     22         static SQLite::rowid_t AddCheckpoint(SQLite::Connection& connection, std::string_view checkpointName);
     23     };
     24 }