Skip to content

Commit 25598bb

Browse files
ldanilekConvex, Inc.
authored and
Convex, Inc.
committed
[components] snapshot import (#28951)
parse the component path out of the filenames in ZIP files. use this component path to write documents to tables in different components. there's a few missing features that i'll get to later: 1. importing single table csv, json, or jsonl has no way to specify component path so it always imports into root component 2. minor race conditions that should be fixed with ComponentRegistry 3. nice error messages if the component path doesn't exist GitOrigin-RevId: 8efcc413b194eeccea43c56c67afc051dbd9271b
1 parent a5ee5d0 commit 25598bb

File tree

4 files changed

+397
-239
lines changed

4 files changed

+397
-239
lines changed

crates/application/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ use common::{
4747
CanonicalizedComponentModulePath,
4848
ComponentDefinitionPath,
4949
ComponentId,
50+
ComponentPath,
5051
PublicFunctionPath,
5152
},
5253
document::{
@@ -2225,7 +2226,7 @@ impl<RT: Runtime> Application<RT> {
22252226
pub async fn clear_tables(
22262227
&self,
22272228
identity: &Identity,
2228-
table_names: Vec<TableName>,
2229+
table_names: Vec<(ComponentPath, TableName)>,
22292230
) -> anyhow::Result<u64> {
22302231
clear_tables(self, identity, table_names).await
22312232
}

0 commit comments

Comments
 (0)