init - add project files
This commit is contained in:
23
tools/jet-2.12.0/generator/metadata/table_meta_data.go
Normal file
23
tools/jet-2.12.0/generator/metadata/table_meta_data.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package metadata
|
||||
|
||||
// Table metadata struct
|
||||
type Table struct {
|
||||
Name string `sql:"primary_key"`
|
||||
Comment string
|
||||
Columns []Column
|
||||
}
|
||||
|
||||
// MutableColumns returns list of mutable columns for table
|
||||
func (t Table) MutableColumns() []Column {
|
||||
var ret []Column
|
||||
|
||||
for _, column := range t.Columns {
|
||||
if column.IsPrimaryKey || column.IsGenerated {
|
||||
continue
|
||||
}
|
||||
|
||||
ret = append(ret, column)
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
Reference in New Issue
Block a user