-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2515 from TaKO8Ki/filter-regex
Implement regex filtering
- Loading branch information
Showing
20 changed files
with
159 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
diesel_cli/tests/print_schema/print_schema_except_table_regexes/diesel.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[print_schema] | ||
file = "src/schema.rs" | ||
with_docs = true | ||
filter = { except_tables = [".*1"] } |
15 changes: 15 additions & 0 deletions
15
diesel_cli/tests/print_schema/print_schema_except_table_regexes/mysql/expected.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// @generated automatically by Diesel CLI. | ||
|
||
diesel::table! { | ||
/// Representation of the `users2` table. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
users2 (id) { | ||
/// The `id` column of the `users2` table. | ||
/// | ||
/// Its SQL type is `Integer`. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
id -> Integer, | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
diesel_cli/tests/print_schema/print_schema_except_table_regexes/mysql/schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CREATE TABLE users1 (id INTEGER PRIMARY KEY); | ||
CREATE TABLE users2 (id INTEGER PRIMARY KEY); |
15 changes: 15 additions & 0 deletions
15
diesel_cli/tests/print_schema/print_schema_except_table_regexes/postgres/expected.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// @generated automatically by Diesel CLI. | ||
|
||
diesel::table! { | ||
/// Representation of the `users2` table. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
users2 (id) { | ||
/// The `id` column of the `users2` table. | ||
/// | ||
/// Its SQL type is `Int4`. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
id -> Int4, | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
diesel_cli/tests/print_schema/print_schema_except_table_regexes/postgres/schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CREATE TABLE users1 (id SERIAL PRIMARY KEY); | ||
CREATE TABLE users2 (id SERIAL PRIMARY KEY); |
15 changes: 15 additions & 0 deletions
15
diesel_cli/tests/print_schema/print_schema_except_table_regexes/sqlite/expected.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// @generated automatically by Diesel CLI. | ||
|
||
diesel::table! { | ||
/// Representation of the `users2` table. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
users2 (id) { | ||
/// The `id` column of the `users2` table. | ||
/// | ||
/// Its SQL type is `Nullable<Integer>`. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
id -> Nullable<Integer>, | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
diesel_cli/tests/print_schema/print_schema_except_table_regexes/sqlite/schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CREATE TABLE users1 (id INTEGER PRIMARY KEY); | ||
CREATE TABLE users2 (id INTEGER PRIMARY KEY); |
4 changes: 4 additions & 0 deletions
4
diesel_cli/tests/print_schema/print_schema_only_table_regexes/diesel.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[print_schema] | ||
file = "src/schema.rs" | ||
with_docs = true | ||
filter = { only_tables = [".*1"] } |
15 changes: 15 additions & 0 deletions
15
diesel_cli/tests/print_schema/print_schema_only_table_regexes/mysql/expected.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// @generated automatically by Diesel CLI. | ||
|
||
diesel::table! { | ||
/// Representation of the `users1` table. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
users1 (id) { | ||
/// The `id` column of the `users1` table. | ||
/// | ||
/// Its SQL type is `Integer`. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
id -> Integer, | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
diesel_cli/tests/print_schema/print_schema_only_table_regexes/mysql/schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CREATE TABLE users1 (id INTEGER PRIMARY KEY); | ||
CREATE TABLE users2 (id INTEGER PRIMARY KEY); |
15 changes: 15 additions & 0 deletions
15
diesel_cli/tests/print_schema/print_schema_only_table_regexes/postgres/expected.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// @generated automatically by Diesel CLI. | ||
|
||
diesel::table! { | ||
/// Representation of the `users1` table. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
users1 (id) { | ||
/// The `id` column of the `users1` table. | ||
/// | ||
/// Its SQL type is `Int4`. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
id -> Int4, | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
diesel_cli/tests/print_schema/print_schema_only_table_regexes/postgres/schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CREATE TABLE users1 (id SERIAL PRIMARY KEY); | ||
CREATE TABLE users2 (id SERIAL PRIMARY KEY); |
15 changes: 15 additions & 0 deletions
15
diesel_cli/tests/print_schema/print_schema_only_table_regexes/sqlite/expected.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// @generated automatically by Diesel CLI. | ||
|
||
diesel::table! { | ||
/// Representation of the `users1` table. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
users1 (id) { | ||
/// The `id` column of the `users1` table. | ||
/// | ||
/// Its SQL type is `Nullable<Integer>`. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
id -> Nullable<Integer>, | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
diesel_cli/tests/print_schema/print_schema_only_table_regexes/sqlite/schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CREATE TABLE users1 (id INTEGER PRIMARY KEY); | ||
CREATE TABLE users2 (id INTEGER PRIMARY KEY); |