mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
dialect/sql/schema: add postgres table and column builders
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/114 Reviewed By: alexsn Differential Revision: D18059082 fbshipit-source-id: fffec25143fa5f2a0ed2c79787abacefad724862
This commit is contained in:
committed by
Facebook Github Bot
parent
67c1d5262a
commit
8be31d18f9
@@ -1892,6 +1892,17 @@ func (d *dialectBuilder) AlterTable(name string) *TableAlter {
|
||||
return b
|
||||
}
|
||||
|
||||
// Column creates a ColumnBuilder for the configured dialect.
|
||||
//
|
||||
// Dialect(dialect.Postgres)..
|
||||
// Column("group_id").Type("int").Attr("UNIQUE")
|
||||
//
|
||||
func (d *dialectBuilder) Column(name string) *ColumnBuilder {
|
||||
b := Column(name)
|
||||
b.SetDialect(d.dialect)
|
||||
return b
|
||||
}
|
||||
|
||||
// Insert creates a InsertBuilder for the configured dialect.
|
||||
//
|
||||
// Dialect(dialect.Postgres).
|
||||
|
||||
Reference in New Issue
Block a user