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

Method new_raw

crates/table/src/table.rs:2342–2365  ·  view source on GitHub ↗

Returns a new empty table using the particulars passed.

(
        schema: Arc<TableSchema>,
        row_layout: RowTypeLayout,
        static_layout: Option<(StaticLayout, StaticBsatnValidator)>,
        visitor_prog: VarLenVisitorProgram,
        squashed

Source from the content-addressed store, hash-verified

2340
2341 /// Returns a new empty table using the particulars passed.
2342 fn new_raw(
2343 schema: Arc<TableSchema>,
2344 row_layout: RowTypeLayout,
2345 static_layout: Option<(StaticLayout, StaticBsatnValidator)>,
2346 visitor_prog: VarLenVisitorProgram,
2347 squashed_offset: SquashedOffset,
2348 pointer_map: Option<PointerMap>,
2349 ) -> Self {
2350 Self {
2351 inner: TableInner {
2352 row_layout,
2353 static_layout,
2354 visitor_prog,
2355 pages: Pages::default(),
2356 },
2357 is_scheduler: schema.schedule.is_some(),
2358 schema,
2359 indexes: BTreeMap::new(),
2360 pointer_map,
2361 squashed_offset,
2362 row_count: 0,
2363 blob_store_bytes: BlobNumBytes::default(),
2364 }
2365 }
2366
2367 /// Returns whether the row at `ptr` is present or not.
2368 // TODO: Remove all uses of this method,

Callers

nothing calls this directly

Calls 1

newFunction · 0.50

Tested by

no test coverage detected