From eaa31f2b1fccfd025f7a549b7d900d2e4072e93c Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Tue, 12 Mar 2024 17:45:00 +0800 Subject: [PATCH] Upstream Changes - 1 --- .gitignore | 3 ++- src/mysql/probe.rs | 2 +- src/postgres/probe.rs | 2 +- src/probe.rs | 6 +++--- src/sqlite/probe.rs | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index ad0839c..f0bba75 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ target/ firedbg/ Cargo.lock *.sublime* -.vscode \ No newline at end of file +.vscode +.DS_Store \ No newline at end of file diff --git a/src/mysql/probe.rs b/src/mysql/probe.rs index ecb0c47..871df1c 100644 --- a/src/mysql/probe.rs +++ b/src/mysql/probe.rs @@ -22,7 +22,7 @@ impl SchemaProbe for MySql { .take() } - fn has_index(table: T, index: C) -> SelectStatement + fn has_index(&self, table: T, index: C) -> SelectStatement where T: AsRef, C: AsRef, diff --git a/src/postgres/probe.rs b/src/postgres/probe.rs index eeaaf86..0067674 100644 --- a/src/postgres/probe.rs +++ b/src/postgres/probe.rs @@ -24,7 +24,7 @@ impl SchemaProbe for Postgres { .take() } - fn has_index(table: T, index: C) -> SelectStatement + fn has_index(&self, table: T, index: C) -> SelectStatement where T: AsRef, C: AsRef, diff --git a/src/probe.rs b/src/probe.rs index 4652f2f..fd178f5 100644 --- a/src/probe.rs +++ b/src/probe.rs @@ -5,7 +5,7 @@ pub trait SchemaProbe { fn query_tables() -> SelectStatement; - fn has_table(table: T) -> SelectStatement + fn has_table(&self, table: T) -> SelectStatement where T: AsRef, { @@ -17,7 +17,7 @@ pub trait SchemaProbe { .take() } - fn has_column(table: T, column: C) -> SelectStatement + fn has_column(&self, table: T, column: C) -> SelectStatement where T: AsRef, C: AsRef, @@ -37,7 +37,7 @@ pub trait SchemaProbe { .take() } - fn has_index(table: T, index: C) -> SelectStatement + fn has_index(&self, table: T, index: C) -> SelectStatement where T: AsRef, C: AsRef; diff --git a/src/sqlite/probe.rs b/src/sqlite/probe.rs index 5cfd1f3..22f7370 100644 --- a/src/sqlite/probe.rs +++ b/src/sqlite/probe.rs @@ -21,7 +21,7 @@ impl SchemaProbe for Sqlite { .take() } - fn has_column(table: T, column: C) -> SelectStatement + fn has_column(&self, table: T, column: C) -> SelectStatement where T: AsRef, C: AsRef, @@ -35,7 +35,7 @@ impl SchemaProbe for Sqlite { .take() } - fn has_index(table: T, index: C) -> SelectStatement + fn has_index(&self, table: T, index: C) -> SelectStatement where T: AsRef, C: AsRef,