Charmander
Charmander
Your “here” and “between” might not be pedantically correct (it’s more like “during” the `await`), but essentially, yes. Also, even when a query is in progress, the decision to emit...
@CoreyCole How did you add the event listener?
@CoreyCole In that code, the pool has an error listener, but the client doesn’t. (Did you mean to create a separate pool and client at all?)
@CoreyCole You probably just want a pool. ```typescript export class PostgresRepositoryService { private pool: Pool; constructor(private environment: EnvironmentsService) { this.pool = new Pool({ host: this.environment.getDatabaseUrl(), port: this.environment.getDatabasePort(), database: 'db_name', user:...
@aranair The `idleListener` is attached when the client is idle (i.e. not checked out of the pool), and detached when it’s returned from `pool.connect`.
@aranair Yes, you currently need to attach an error listener manually while the client is checked out. It’s for any connection-level errors (including getting disconnected in various ways) that happen...
Thanks for proposing a fix. `Client` probably shouldn’t be reaching into `Query` and `Result` like that in the first place, and should forward its `types` to the query objects it...
@akihikodaki The existing APIs don’t actually work right now. See #1392.
Thoughts on: ```js pool.cancel(client) ``` and ```js pg.cancel(clientOptions, client) // or, given what pg.Client currently represents, new Client(clientOptions).cancel(client) ``` ? The pool version is convenient, but a bit misleading since...
@pkit I’m not sure exactly what the approach you’re describing is and isn’t supposed to handle, but I don’t think it’s the job of the driver to do anything other...