MCPcopy Create free account
hub / github.com/araddon/qlbridge / AddField

Method AddField

schema/schema.go:515–529  ·  view source on GitHub ↗

AddField register a new field

(fld *Field)

Source from the content-addressed store, hash-verified

513
514// AddField register a new field
515func (m *Table) AddField(fld *Field) {
516 found := false
517 for i, curFld := range m.Fields {
518 if curFld.Name == fld.Name {
519 found = true
520 m.Fields[i] = fld
521 break
522 }
523 }
524 if !found {
525 fld.idx = uint64(len(m.Fields))
526 m.Fields = append(m.Fields, fld)
527 }
528 m.FieldMap[fld.Name] = fld
529}
530
531// AddFieldType describe and register a new column
532func (m *Table) AddFieldType(name string, valType value.ValueType) {

Callers 13

loadTableMethod · 0.95
tableForTableMethod · 0.95
tableForProceduresMethod · 0.95
tableForEnginesMethod · 0.95
tableForVariablesMethod · 0.95
tableForTablesMethod · 0.95
tableForDatabasesMethod · 0.95
loadTableMethod · 0.95
loadTableMethod · 0.95
tableFromSQLFunction · 0.95
AddFieldTypeMethod · 0.95
TestTableFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestTableFunction · 0.76