Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions internal/checkpoint/checkpoint_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type CreateCheckpointInput struct {
type ListCheckpointOpts struct {
Limit int
RestorableOnly bool
RunID string
}

// RestoreCheckpointInput 描述一次 restore 操作的完整输入。
Expand Down Expand Up @@ -219,6 +220,10 @@ WHERE session_id = ?
query += ` AND restorable = 1 AND status = ?`
args = append(args, string(session.CheckpointStatusAvailable))
}
if opts.RunID != "" {
query += ` AND run_id = ?`
args = append(args, opts.RunID)
}
query += ` ORDER BY created_at_ms DESC`
if opts.Limit > 0 {
query += ` LIMIT ?`
Expand Down
Loading
Loading