pub trait BaserowTableOperations {
// Required methods
fn auto_map<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<BaserowTable, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait;
fn query(self) -> RowRequestBuilder;
fn get<'life0, 'async_trait, T>(
&'life0 self,
baserow: Baserow,
request: RowRequest,
) -> Pin<Box<dyn Future<Output = Result<TypedRowsResponse<T>, Box<dyn Error>>> + Send + 'async_trait>>
where T: DeserializeOwned + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn create_one<'async_trait>(
self,
data: HashMap<String, Value>,
user_field_names: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Value>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait;
fn get_one<'async_trait, T>(
self,
id: u64,
user_field_names: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<T, Box<dyn Error>>> + Send + 'async_trait>>
where T: DeserializeOwned + 'static + 'async_trait,
Self: 'async_trait;
fn update<'async_trait>(
self,
id: u64,
data: HashMap<String, Value>,
user_field_names: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Value>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait;
fn delete<'async_trait>(
self,
id: u64,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait;
}
Expand description
Trait defining the public operations available on a Baserow table
This trait provides the core CRUD operations for working with Baserow tables. All operations are async and return Results to handle potential errors.
Required Methods§
Sourcefn auto_map<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<BaserowTable, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
fn auto_map<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<BaserowTable, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
Automatically maps the table fields to their corresponding types
This method fetches the table schema and sets up field mappings for type conversion. Call this before performing operations if you need type-safe field access.
Sourcefn query(self) -> RowRequestBuilder
fn query(self) -> RowRequestBuilder
Creates a new query builder for constructing complex table queries
This is the preferred method for building queries with filters, sorting, and pagination options. The builder provides a fluent interface for constructing queries.
Sourcefn get<'life0, 'async_trait, T>(
&'life0 self,
baserow: Baserow,
request: RowRequest,
) -> Pin<Box<dyn Future<Output = Result<TypedRowsResponse<T>, Box<dyn Error>>> + Send + 'async_trait>>where
T: DeserializeOwned + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait, T>(
&'life0 self,
baserow: Baserow,
request: RowRequest,
) -> Pin<Box<dyn Future<Output = Result<TypedRowsResponse<T>, Box<dyn Error>>> + Send + 'async_trait>>where
T: DeserializeOwned + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn create_one<'async_trait>(
self,
data: HashMap<String, Value>,
user_field_names: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Value>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
fn create_one<'async_trait>(
self,
data: HashMap<String, Value>,
user_field_names: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Value>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
Sourcefn get_one<'async_trait, T>(
self,
id: u64,
user_field_names: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<T, Box<dyn Error>>> + Send + 'async_trait>>where
T: DeserializeOwned + 'static + 'async_trait,
Self: 'async_trait,
fn get_one<'async_trait, T>(
self,
id: u64,
user_field_names: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<T, Box<dyn Error>>> + Send + 'async_trait>>where
T: DeserializeOwned + 'static + 'async_trait,
Self: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.