MCPcopy
hub / github.com/ent/ent / NewFieldSpec

Function NewFieldSpec

dialect/sql/sqlgraph/graph.go:670–672  ·  view source on GitHub ↗

NewFieldSpec creates a new FieldSpec with its required fields.

(column string, typ field.Type)

Source from the content-addressed store, hash-verified

668
669// NewFieldSpec creates a new FieldSpec with its required fields.
670func NewFieldSpec(column string, typ field.Type) *FieldSpec {
671 return &FieldSpec{Column: column, Type: typ}
672}
673
674// AddColumnOnce adds the given column to the spec if it is not already present.
675func (n *NodeSpec) AddColumnOnce(column string) *NodeSpec {

Callers 15

sqlExecMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
sqlExecMethod · 0.92
createSpecMethod · 0.92
sqlExecMethod · 0.92
sqlSaveMethod · 0.92
sqlSaveMethod · 0.92
createSpecMethod · 0.92
sqlExecMethod · 0.92
sqlExecMethod · 0.92
querySpecMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…