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