MCPcopy Index your code
hub / github.com/bytebase/bytebase / generateOneMBInsert

Function generateOneMBInsert

backend/plugin/parser/standard/split_test.go:20–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20func generateOneMBInsert() string {
21 letterList := []byte("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
22 b := make([]byte, 1024*1024)
23 for i := range b {
24 // Use crypto/rand for secure random generation
25 randomIndex, err := rand.Int(rand.Reader, big.NewInt(int64(len(letterList))))
26 if err != nil {
27 // Fallback to a simple pattern if crypto/rand fails
28 b[i] = letterList[i%26]
29 } else {
30 b[i] = letterList[randomIndex.Int64()]
31 }
32 }
33 return fmt.Sprintf("INSERT INTO t values('%s')", string(b))
34}
35
36func TestApplyMultiStatements(t *testing.T) {
37 type testData struct {

Callers 1

TestApplyMultiStatementsFunction · 0.85

Calls 1

IntMethod · 0.45

Tested by

no test coverage detected