MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / build

Method build

crates/table/src/table.rs:2288–2291  ·  view source on GitHub ↗
(schema: &TableSchema, index: &TableIndex, index_id: IndexId, value: AlgebraicValue)

Source from the content-addressed store, hash-verified

2286 /// In this version, the [`IndexSchema`] is looked up in `schema` based on `index_id`.
2287 #[cold]
2288 fn build(schema: &TableSchema, index: &TableIndex, index_id: IndexId, value: AlgebraicValue) -> Self {
2289 let index_schema = schema.indexes.iter().find(|i| i.index_id == index_id).unwrap();
2290 Self::build_with_index_schema(schema, index, index_schema, value)
2291 }
2292
2293 /// Returns a unique constraint violation error for the given `index`
2294 /// and the `value` that would have been duplicated.

Callers

nothing calls this directly

Calls 3

iterMethod · 0.65
unwrapMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected