mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-04 20:16:34 +02:00
Merge pull request #968 from tauri-apps/feat/new-method
feat(sql,store): add `Builder::new`
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"sql": "patch"
|
||||||
|
"store": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
Add `Builder::new` method.
|
||||||
@@ -273,6 +273,10 @@ pub struct Builder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Builder {
|
impl Builder {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Self::default()
|
||||||
|
}
|
||||||
|
|
||||||
/// Add migrations to a database.
|
/// Add migrations to a database.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn add_migrations(mut self, db_url: &str, migrations: Vec<Migration>) -> Self {
|
pub fn add_migrations(mut self, db_url: &str, migrations: Vec<Migration>) -> Self {
|
||||||
|
|||||||
@@ -209,6 +209,10 @@ impl<R: Runtime> Default for Builder<R> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<R: Runtime> Builder<R> {
|
impl<R: Runtime> Builder<R> {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Self::default()
|
||||||
|
}
|
||||||
|
|
||||||
/// Registers a store with the plugin.
|
/// Registers a store with the plugin.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
|
|||||||
Reference in New Issue
Block a user