MCPcopy
hub / github.com/jackc/pgx / execExtendedSuffix

Method execExtendedSuffix

pgconn/pgconn.go:1358–1376  ·  view source on GitHub ↗
(result *ResultReader, statementDescription *StatementDescription, resultFormats []int16)

Source from the content-addressed store, hash-verified

1356}
1357
1358func (pgConn *PgConn) execExtendedSuffix(result *ResultReader, statementDescription *StatementDescription, resultFormats []int16) {
1359 if statementDescription == nil {
1360 pgConn.frontend.SendDescribe(&pgproto3.Describe{ObjectType: 'P'})
1361 }
1362 pgConn.frontend.SendExecute(&pgproto3.Execute{})
1363 pgConn.frontend.SendSync(&pgproto3.Sync{})
1364
1365 err := pgConn.flushWithPotentialWriteReadDeadlock()
1366 if err != nil {
1367 pgConn.asyncClose()
1368 result.concludeCommand(CommandTag{}, err)
1369 pgConn.contextWatcher.Unwatch()
1370 result.closed = true
1371 pgConn.unlock()
1372 return
1373 }
1374
1375 result.readUntilRowDescription(statementDescription, resultFormats)
1376}
1377
1378// CopyTo executes the copy command sql and copies the results to w.
1379func (pgConn *PgConn) CopyTo(ctx context.Context, w io.Writer, sql string) (CommandTag, error) {

Callers 3

ExecParamsMethod · 0.95
ExecPreparedMethod · 0.95
ExecStatementMethod · 0.95

Calls 9

asyncCloseMethod · 0.95
unlockMethod · 0.95
SendDescribeMethod · 0.80
SendExecuteMethod · 0.80
SendSyncMethod · 0.80
concludeCommandMethod · 0.80
UnwatchMethod · 0.80

Tested by

no test coverage detected