(x)
| 533 | } |
| 534 | |
| 535 | function ReadyForQuery(x) { |
| 536 | if (query) { |
| 537 | if (errorResponse) { |
| 538 | query.retried |
| 539 | ? errored(query.retried) |
| 540 | : query.prepared && retryRoutines.has(errorResponse.routine) |
| 541 | ? retry(query, errorResponse) |
| 542 | : errored(errorResponse) |
| 543 | } else { |
| 544 | query.resolve(results || result) |
| 545 | } |
| 546 | } else if (errorResponse) { |
| 547 | errored(errorResponse) |
| 548 | } |
| 549 | |
| 550 | query = results = errorResponse = null |
| 551 | result = new Result() |
| 552 | connectTimer.cancel() |
| 553 | |
| 554 | if (initial) { |
| 555 | if (target_session_attrs) { |
| 556 | if (!backendParameters.in_hot_standby || !backendParameters.default_transaction_read_only) |
| 557 | return fetchState() |
| 558 | else if (tryNext(target_session_attrs, backendParameters)) |
| 559 | return terminate() |
| 560 | } |
| 561 | |
| 562 | if (needsTypes) { |
| 563 | initial.reserve && (initial = null) |
| 564 | return fetchArrayTypes() |
| 565 | } |
| 566 | |
| 567 | initial && !initial.reserve && execute(initial) |
| 568 | options.shared.retries = retries = 0 |
| 569 | initial = null |
| 570 | return |
| 571 | } |
| 572 | |
| 573 | while (sent.length && (query = sent.shift()) && (query.active = true, query.cancelled)) |
| 574 | Connection(options).cancel(query.state, query.cancelled.resolve, query.cancelled.reject) |
| 575 | |
| 576 | if (query) |
| 577 | return // Consider opening if able and sent.length < 50 |
| 578 | |
| 579 | connection.reserved |
| 580 | ? !connection.reserved.release && x[5] === 73 // I |
| 581 | ? ending |
| 582 | ? terminate() |
| 583 | : (connection.reserved = null, onopen(connection)) |
| 584 | : connection.reserved() |
| 585 | : ending |
| 586 | ? terminate() |
| 587 | : onopen(connection) |
| 588 | } |
| 589 | |
| 590 | function CommandComplete(x) { |
| 591 | rows = 0 |
nothing calls this directly
no test coverage detected