Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove bonuses to special table name list
  • Loading branch information
qanghaa authored and kyleconroy committed Nov 25, 2024
commit 17fea6024706af5bdb8a9ea7eb5ab15a60a8cfeb
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
Loading