summaryrefslogtreecommitdiffstats
path: root/vendor/xorm.io/xorm/schemas/table.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/xorm.io/xorm/schemas/table.go')
-rw-r--r--vendor/xorm.io/xorm/schemas/table.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/xorm.io/xorm/schemas/table.go b/vendor/xorm.io/xorm/schemas/table.go
index 7ca9531f74..bfa517aa2f 100644
--- a/vendor/xorm.io/xorm/schemas/table.go
+++ b/vendor/xorm.io/xorm/schemas/table.go
@@ -90,23 +90,28 @@ func (table *Table) PKColumns() []*Column {
return columns
}
+// ColumnType returns a column's type
func (table *Table) ColumnType(name string) reflect.Type {
t, _ := table.Type.FieldByName(name)
return t.Type
}
+// AutoIncrColumn returns autoincrement column
func (table *Table) AutoIncrColumn() *Column {
return table.GetColumn(table.AutoIncrement)
}
+// VersionColumn returns version column's information
func (table *Table) VersionColumn() *Column {
return table.GetColumn(table.Version)
}
+// UpdatedColumn returns updated column's information
func (table *Table) UpdatedColumn() *Column {
return table.GetColumn(table.Updated)
}
+// DeletedColumn returns deleted column's information
func (table *Table) DeletedColumn() *Column {
return table.GetColumn(table.Deleted)
}