@@ -3,7 +3,6 @@ use std::sync::Arc;
33
44use async_trait:: async_trait;
55use axum:: response:: ErrorResponse ;
6- use bytes:: Bytes ;
76use http:: StatusCode ;
87
98use spacetimedb:: client:: ClientActorIndex ;
@@ -156,7 +155,7 @@ pub struct DatabaseDef {
156155 /// The [`Identity`] the database shall have.
157156 pub database_identity : Identity ,
158157 /// The compiled program of the database module.
159- pub program_bytes : Bytes ,
158+ pub program_bytes : Vec < u8 > ,
160159 /// The desired number of replicas the database shall have.
161160 ///
162161 /// If `None`, the edition default is used.
@@ -165,14 +164,6 @@ pub struct DatabaseDef {
165164 pub host_type : HostType ,
166165}
167166
168- /// Parameters for resetting a database via [`ControlStateDelegate::reset_database`].
169- pub struct DatabaseResetDef {
170- pub database_identity : Identity ,
171- pub program_bytes : Option < Bytes > ,
172- pub num_replicas : Option < NonZeroU8 > ,
173- pub host_type : Option < HostType > ,
174- }
175-
176167/// API of the SpacetimeDB control plane.
177168///
178169/// The trait is the composition of [`ControlStateReadAccess`] and
@@ -242,10 +233,6 @@ pub trait ControlStateWriteAccess: Send + Sync {
242233
243234 async fn delete_database ( & self , caller_identity : & Identity , database_identity : & Identity ) -> anyhow:: Result < ( ) > ;
244235
245- /// Remove all data from a database, and reset it according to the
246- /// given [DatabaseResetDef].
247- async fn reset_database ( & self , caller_identity : & Identity , spec : DatabaseResetDef ) -> anyhow:: Result < ( ) > ;
248-
249236 // Energy
250237 async fn add_energy ( & self , identity : & Identity , amount : EnergyQuanta ) -> anyhow:: Result < ( ) > ;
251238 async fn withdraw_energy ( & self , identity : & Identity , amount : EnergyQuanta ) -> anyhow:: Result < ( ) > ;
@@ -345,10 +332,6 @@ impl<T: ControlStateWriteAccess + ?Sized> ControlStateWriteAccess for Arc<T> {
345332 ( * * self ) . delete_database ( caller_identity, database_identity) . await
346333 }
347334
348- async fn reset_database ( & self , caller_identity : & Identity , spec : DatabaseResetDef ) -> anyhow:: Result < ( ) > {
349- ( * * self ) . reset_database ( caller_identity, spec) . await
350- }
351-
352335 async fn add_energy ( & self , identity : & Identity , amount : EnergyQuanta ) -> anyhow:: Result < ( ) > {
353336 ( * * self ) . add_energy ( identity, amount) . await
354337 }
0 commit comments