MCPcopy Index your code
hub / github.com/ent/ent / product

Function product

dialect/sql/sqlgraph/graph.go:2067–2075  ·  view source on GitHub ↗

cartesian product of 2 id sets.

(a, b []driver.Value)

Source from the content-addressed store, hash-verified

2065
2066// cartesian product of 2 id sets.
2067func product(a, b []driver.Value) [][2]driver.Value {
2068 c := make([][2]driver.Value, 0, len(a)*len(b))
2069 for i := range a {
2070 for j := range b {
2071 c = append(c, [2]driver.Value{a[i], b[j]})
2072 }
2073 }
2074 return c
2075}

Callers 2

addM2MEdgesMethod · 0.85
batchAddM2MMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…