Skip to content

Commit

Permalink
remove bonuses to special table name list
Browse files Browse the repository at this point in the history
  • Loading branch information
qanghaa committed Oct 19, 2024
1 parent 39d65ae commit 4072241
Show file tree
Hide file tree
Showing 17 changed files with 7 additions and 146 deletions.
4 changes: 0 additions & 4 deletions internal/endtoend/testdata/inflection/mysql/go/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 0 additions & 27 deletions internal/endtoend/testdata/inflection/mysql/go/query.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions internal/endtoend/testdata/inflection/mysql/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ SELECT * FROM product_meta;
SELECT * FROM calories;

/* name: GetProductMetadata :many */
SELECT * FROM product_metadata;

/* name: GetBonuses :many */
SELECT * FROM bonuses;
SELECT * FROM product_metadata;
2 changes: 0 additions & 2 deletions internal/endtoend/testdata/inflection/mysql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ CREATE TABLE students (id text not null);
CREATE TABLE product_meta (id text not null);
CREATE TABLE calories (id text not null);
CREATE TABLE product_metadata (id text not null);
CREATE TABLE bonuses (id text not null);

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ SELECT * FROM product_meta;
SELECT * FROM calories;

-- name: GetProductMetadata :many
SELECT * FROM product_metadata;

-- name: GetBonuses :many
SELECT * FROM bonuses;
SELECT * FROM product_metadata;
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ CREATE TABLE campus (id text not null);
CREATE TABLE students (id text not null);
CREATE TABLE product_meta (id text not null);
CREATE TABLE calories (id text not null);
CREATE TABLE product_metadata (id text not null);
CREATE TABLE bonuses (id text not null);
CREATE TABLE product_metadata (id text not null);

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ SELECT * FROM product_meta;
SELECT * FROM calories;

-- name: GetProductMetadata :many
SELECT * FROM product_metadata;

-- name: GetBonuses :many
SELECT * FROM bonuses;
SELECT * FROM product_metadata;
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ CREATE TABLE campus (id text not null);
CREATE TABLE students (id text not null);
CREATE TABLE product_meta (id text not null);
CREATE TABLE calories (id text not null);
CREATE TABLE product_metadata (id text not null);
CREATE TABLE bonuses (id text not null);
CREATE TABLE product_metadata (id text not null);

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ SELECT * FROM product_meta;
SELECT * FROM calories;

-- name: GetProductMetadata :many
SELECT * FROM product_metadata;

-- name: GetBonuses :many
SELECT * FROM bonuses;
SELECT * FROM product_metadata;
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ CREATE TABLE campus (id text not null);
CREATE TABLE students (id text not null);
CREATE TABLE product_meta (id text not null);
CREATE TABLE calories (id text not null);
CREATE TABLE product_metadata (id text not null);
CREATE TABLE bonuses (id text not null);
CREATE TABLE product_metadata (id text not null);
4 changes: 0 additions & 4 deletions internal/inflection/singular.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ func Singular(s SingularParams) string {
return "wave"
}

if strings.ToLower(s.Name) == "bonuses" {
return "bonus"
}

if strings.ToLower(s.Name) == "metadata" {
return "metadata"
}
Expand Down

0 comments on commit 4072241

Please sign in to comment.