diff --git a/.changes/sql-store-new-fn.md b/.changes/sql-store-new-fn.md new file mode 100644 index 000000000..c03597898 --- /dev/null +++ b/.changes/sql-store-new-fn.md @@ -0,0 +1,6 @@ +--- +"sql": "patch" +"store": "patch" +--- + +Add `Builder::new` method. diff --git a/plugins/sql/src/plugin.rs b/plugins/sql/src/plugin.rs index aa6ec5f53..f2a952799 100644 --- a/plugins/sql/src/plugin.rs +++ b/plugins/sql/src/plugin.rs @@ -273,6 +273,10 @@ pub struct Builder { } impl Builder { + pub fn new() -> Self { + Self::default() + } + /// Add migrations to a database. #[must_use] pub fn add_migrations(mut self, db_url: &str, migrations: Vec) -> Self { diff --git a/plugins/store/src/lib.rs b/plugins/store/src/lib.rs index 45a0c8263..f76752f8f 100644 --- a/plugins/store/src/lib.rs +++ b/plugins/store/src/lib.rs @@ -209,6 +209,10 @@ impl Default for Builder { } impl Builder { + pub fn new() -> Self { + Self::default() + } + /// Registers a store with the plugin. /// /// # Examples