(ctx context.Context, b *Batch)
| 1015 | } |
| 1016 | |
| 1017 | func (c *Conn) sendBatchQueryExecModeSimpleProtocol(ctx context.Context, b *Batch) *batchResults { |
| 1018 | var sb strings.Builder |
| 1019 | for i, bi := range b.QueuedQueries { |
| 1020 | if i > 0 { |
| 1021 | sb.WriteByte(';') |
| 1022 | } |
| 1023 | sql, err := c.sanitizeForSimpleQuery(bi.SQL, bi.Arguments...) |
| 1024 | if err != nil { |
| 1025 | return &batchResults{ctx: ctx, conn: c, err: err} |
| 1026 | } |
| 1027 | sb.WriteString(sql) |
| 1028 | } |
| 1029 | mrr := c.pgConn.Exec(ctx, sb.String()) |
| 1030 | return &batchResults{ |
| 1031 | ctx: ctx, |
| 1032 | conn: c, |
| 1033 | mrr: mrr, |
| 1034 | b: b, |
| 1035 | qqIdx: 0, |
| 1036 | } |
| 1037 | } |
| 1038 | |
| 1039 | func (c *Conn) sendBatchQueryExecModeExec(ctx context.Context, b *Batch) *batchResults { |
| 1040 | batch := &pgconn.Batch{} |
no test coverage detected