@@ -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 ;
@@ -163,7 +162,7 @@ pub struct DatabaseDef {
163162 /// The [`Identity`] the database shall have.
164163 pub database_identity : Identity ,
165164 /// The compiled program of the database module.
166- pub program_bytes : Bytes ,
165+ pub program_bytes : Vec < u8 > ,
167166 /// The desired number of replicas the database shall have.
168167 ///
169168 /// If `None`, the edition default is used.
@@ -172,14 +171,6 @@ pub struct DatabaseDef {
172171 pub host_type : HostType ,
173172}
174173
175- /// Parameters for resetting a database via [`ControlStateDelegate::reset_database`].
176- pub struct DatabaseResetDef {
177- pub database_identity : Identity ,
178- pub program_bytes : Option < Bytes > ,
179- pub num_replicas : Option < NonZeroU8 > ,
180- pub host_type : Option < HostType > ,
181- }
182-
183174/// API of the SpacetimeDB control plane.
184175///
185176/// The trait is the composition of [`ControlStateReadAccess`] and
@@ -249,10 +240,6 @@ pub trait ControlStateWriteAccess: Send + Sync {
249240
250241 async fn delete_database ( & self , caller_identity : & Identity , database_identity : & Identity ) -> anyhow:: Result < ( ) > ;
251242
252- /// Remove all data from a database, and reset it according to the
253- /// given [DatabaseResetDef].
254- async fn reset_database ( & self , caller_identity : & Identity , spec : DatabaseResetDef ) -> anyhow:: Result < ( ) > ;
255-
256243 // Energy
257244 async fn add_energy ( & self , identity : & Identity , amount : EnergyQuanta ) -> anyhow:: Result < ( ) > ;
258245 async fn withdraw_energy ( & self , identity : & Identity , amount : EnergyQuanta ) -> anyhow:: Result < ( ) > ;
@@ -352,10 +339,6 @@ impl<T: ControlStateWriteAccess + ?Sized> ControlStateWriteAccess for Arc<T> {
352339 ( * * self ) . delete_database ( caller_identity, database_identity) . await
353340 }
354341
355- async fn reset_database ( & self , caller_identity : & Identity , spec : DatabaseResetDef ) -> anyhow:: Result < ( ) > {
356- ( * * self ) . reset_database ( caller_identity, spec) . await
357- }
358-
359342 async fn add_energy ( & self , identity : & Identity , amount : EnergyQuanta ) -> anyhow:: Result < ( ) > {
360343 ( * * self ) . add_energy ( identity, amount) . await
361344 }
0 commit comments