Fix inflection bug for "ss" words (like address)

* Adjust inflect rules
* Bump version to 2.1.8
This commit is contained in:
Patrick O'brien 2017-01-24 13:31:43 +10:00
parent 761efee9f0
commit e992e327c2
3 changed files with 26 additions and 1 deletions

View file

@ -14,7 +14,7 @@ import (
"github.com/vattle/sqlboiler/boilingcore"
)
const sqlBoilerVersion = "2.1.7"
const sqlBoilerVersion = "2.1.8"
var (
cmdState *boilingcore.State

View file

@ -92,6 +92,10 @@ func newBoilRuleset() *inflect.Ruleset {
rs.AddPluralExact("oxen", "oxen", true)
rs.AddPluralExact("quiz", "quizzes", true)
rs.AddSingular("s", "")
rs.AddSingular("ss", "ss")
rs.AddSingular("as", "as")
rs.AddSingular("us", "us")
rs.AddSingular("is", "is")
rs.AddSingular("news", "news")
rs.AddSingular("ta", "tum")
rs.AddSingular("ia", "ium")
@ -184,5 +188,15 @@ func newBoilRuleset() *inflect.Ruleset {
rs.AddIrregular("move", "moves")
rs.AddIrregular("zombie", "zombies")
rs.AddIrregular("cookie", "cookies")
rs.AddSingularExact("a", "a", true)
rs.AddSingularExact("i", "i", true)
rs.AddSingularExact("is", "is", true)
rs.AddSingularExact("us", "us", true)
rs.AddSingularExact("as", "as", true)
rs.AddPluralExact("a", "a", true)
rs.AddPluralExact("i", "i", true)
rs.AddPluralExact("is", "is", true)
rs.AddPluralExact("us", "us", true)
rs.AddPluralExact("as", "as", true)
return rs
}

View file

@ -306,6 +306,17 @@ create table worms (
foreign key (tiger_id) references tigers (id)
);
create table addresses (
id bytea primary key,
name bytea null
);
create table houses (
id bytea primary key,
name bytea not null,
address_id bytea not null unique,
foreign key (address_id) references addresses (id)
);
create table byte_pilots (
id bytea primary key not null,