MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / to_row

Method to_row

crates/opencode-session/src/session.rs:647–667  ·  view source on GitHub ↗

Convert to a database row representation

(&self)

Source from the content-addressed store, hash-verified

645
646 /// Convert to a database row representation
647 pub fn to_row(&self) -> SessionRow {
648 SessionRow {
649 id: self.id.clone(),
650 slug: self.slug.clone(),
651 project_id: self.project_id.clone(),
652 directory: self.directory.clone(),
653 parent_id: self.parent_id.clone(),
654 title: self.title.clone(),
655 version: self.version.clone(),
656 time_created: self.time.created,
657 time_updated: self.time.updated,
658 time_compacting: self.time.compacting,
659 time_archived: self.time.archived,
660 share_url: self.share.as_ref().map(|s| s.url.clone()),
661 summary_additions: self.summary.as_ref().map(|s| s.additions),
662 summary_deletions: self.summary.as_ref().map(|s| s.deletions),
663 summary_files: self.summary.as_ref().map(|s| s.files),
664 revert: self.revert.clone(),
665 permission: self.permission.clone(),
666 }
667 }
668
669 /// Create from a database row representation
670 pub fn from_row(row: SessionRow) -> Self {

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected