Skip to content

Commit 7c1d2d3

Browse files
committed
asdasd
1 parent 394897c commit 7c1d2d3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pgxpool/conn.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ func (c *Conn) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNam
103103
return c.Conn().CopyFrom(ctx, tableName, columnNames, rowSrc)
104104
}
105105

106+
func (c *Conn) CopyFromText(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) {
107+
return c.Conn().CopyFromText(ctx, tableName, columnNames, rowSrc)
108+
}
109+
106110
// Begin starts a transaction block from the *Conn without explicitly setting a transaction mode (see BeginTx with TxOptions if transaction mode is required).
107111
func (c *Conn) Begin(ctx context.Context) (pgx.Tx, error) {
108112
return c.Conn().Begin(ctx)

pgxpool/tx.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ func (tx *Tx) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnName
5050
return tx.t.CopyFrom(ctx, tableName, columnNames, rowSrc)
5151
}
5252

53+
func (tx *Tx) CopyFromText(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) {
54+
return tx.t.CopyFromText(ctx, tableName, columnNames, rowSrc)
55+
}
56+
5357
func (tx *Tx) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults {
5458
return tx.t.SendBatch(ctx, b)
5559
}

0 commit comments

Comments
 (0)