diff --git a/_example/postgresql/accounts.gen.go b/_example/postgresql/accounts.gen.go index b31f66f..e88a18b 100644 --- a/_example/postgresql/accounts.gen.go +++ b/_example/postgresql/accounts.gen.go @@ -143,11 +143,6 @@ func (q accountSelectSQL) IDIn(vs ...AccountID) accountSelectSQL { return q } -func (q accountSelectSQL) PkColumn(pk int64, exprs ...sqlla.Operator) accountSelectSQL { - v := AccountID(pk) - return q.ID(v, exprs...) -} - func (q accountSelectSQL) OrderByID(order sqlla.Order) accountSelectSQL { q.order = order.WithColumn(q.appendColumnPrefix("\"id\"")) return q diff --git a/_example/postgresql/groups.gen.go b/_example/postgresql/groups.gen.go index 4717b72..29d194e 100644 --- a/_example/postgresql/groups.gen.go +++ b/_example/postgresql/groups.gen.go @@ -141,11 +141,6 @@ func (q groupSelectSQL) IDIn(vs ...GroupID) groupSelectSQL { return q } -func (q groupSelectSQL) PkColumn(pk int64, exprs ...sqlla.Operator) groupSelectSQL { - v := GroupID(pk) - return q.ID(v, exprs...) -} - func (q groupSelectSQL) OrderByID(order sqlla.Order) groupSelectSQL { q.order = order.WithColumn(q.appendColumnPrefix("\"id\"")) return q diff --git a/_example/postgresql/identities.gen.go b/_example/postgresql/identities.gen.go index 3b4cb7e..b0e8bdb 100644 --- a/_example/postgresql/identities.gen.go +++ b/_example/postgresql/identities.gen.go @@ -141,11 +141,6 @@ func (q identitySelectSQL) IDIn(vs ...IdentityID) identitySelectSQL { return q } -func (q identitySelectSQL) PkColumn(pk int64, exprs ...sqlla.Operator) identitySelectSQL { - v := IdentityID(pk) - return q.ID(v, exprs...) -} - func (q identitySelectSQL) OrderByID(order sqlla.Order) identitySelectSQL { q.order = order.WithColumn(q.appendColumnPrefix("\"id\"")) return q diff --git a/template/select_column.tmpl b/template/select_column.tmpl index 7911b97..d9c0299 100644 --- a/template/select_column.tmpl +++ b/template/select_column.tmpl @@ -24,7 +24,7 @@ func (q {{ $smallTableName }}SelectSQL) {{ .MethodName }}In(vs ...{{ .TypeName } } {{- end }} -{{ if .IsPk -}} +{{ if and .IsPk (eq (dialect) "mysql") -}} func (q {{ $smallTableName }}SelectSQL) PkColumn(pk int64, exprs ...sqlla.Operator) {{ $smallTableName }}SelectSQL { v := {{ .TypeName }}(pk) return q.{{ .MethodName }}(v, exprs...)