MCPcopy Create free account
hub / github.com/context-space/context-space / escapeSQL

Function escapeSQL

backend/cmd/load_providers/main.go:940–942  ·  view source on GitHub ↗

escapeSQL escapes single quotes in SQL strings to prevent SQL injection

(s string)

Source from the content-addressed store, hash-verified

938
939// escapeSQL escapes single quotes in SQL strings to prevent SQL injection
940func escapeSQL(s string) string {
941 return strings.ReplaceAll(s, "'", "''")
942}
943
944// generateEmbedding generates embedding for the given text using OpenAI API
945func generateEmbedding(ctx context.Context, text string) ([]float64, error) {

Calls

no outgoing calls

Tested by

no test coverage detected