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

Function escape

dialect/sql/sqlgraph/graph_test.go:2748–2755  ·  view source on GitHub ↗
(query string)

Source from the content-addressed store, hash-verified

2746}
2747
2748func escape(query string) string {
2749 rows := strings.Split(query, "\n")
2750 for i := range rows {
2751 rows[i] = strings.TrimPrefix(rows[i], " ")
2752 }
2753 query = strings.Join(rows, " ")
2754 return strings.TrimSpace(regexp.QuoteMeta(query)) + "$"
2755}

Callers 11

TestCreateNodeFunction · 0.70
TestBatchCreateFunction · 0.70
TestUpdateNodeFunction · 0.70
TestExecUpdateNodeFunction · 0.70
TestUpdateNodesFunction · 0.70
TestDeleteNodesFunction · 0.70
TestDeleteNodesSchemaFunction · 0.70
TestQueryNodesFunction · 0.70
TestQueryNodesSchemaFunction · 0.70
TestQueryEdgesFunction · 0.70
TestQueryEdgesSchemaFunction · 0.70

Calls 1

JoinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…