Skip to content

Commit

Permalink
Update db-info audit log and scheduled jobs commands to be a little m…
Browse files Browse the repository at this point in the history
…ore useful (#34515)

GitOrigin-RevId: c1cc3bacb464767d9c3c036fde1325f39d5f1b6f
  • Loading branch information
sshader authored and Convex, Inc. committed Feb 27, 2025
1 parent 4eb29e1 commit 1e17fc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/value/src/document_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ impl proptest::arbitrary::Arbitrary for ResolvedDocumentId {
}

impl InternalDocumentId {
pub const MAX: InternalDocumentId = InternalDocumentId::new(TabletId::MAX, InternalId::MAX);
/// Minimum valid [`InternalDocumentId`].
pub const MIN: InternalDocumentId = InternalDocumentId::new(TabletId::MIN, InternalId::MIN);

Expand Down Expand Up @@ -121,6 +122,8 @@ impl InternalDocumentId {
}

impl DeveloperDocumentId {
pub const MAX: DeveloperDocumentId =
DeveloperDocumentId::new(TableNumber::MAX, InternalId::MAX);
/// Minimum valid [`DeveloperDocumentId`].
pub const MIN: DeveloperDocumentId =
DeveloperDocumentId::new(TableNumber::MIN, InternalId::MIN);
Expand Down
2 changes: 2 additions & 0 deletions crates/value/src/table_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ impl From<TableName> for FieldName {
pub struct TabletId(pub InternalId);

impl TabletId {
pub const MAX: TabletId = TabletId(InternalId::MAX);
pub const MIN: TabletId = TabletId(InternalId::MIN);

pub fn document_id_to_string(&self, internal_id: InternalId) -> String {
Expand Down Expand Up @@ -202,6 +203,7 @@ impl HeapSize for TableNumber {
}

impl TableNumber {
pub const MAX: TableNumber = TableNumber(u32::MAX);
pub const MIN: TableNumber = TableNumber(1);

pub fn document_id_to_string(&self, internal_id: InternalId) -> String {
Expand Down

0 comments on commit 1e17fc5

Please sign in to comment.