denodrivers / denodrivers/postgres

1.0 API discussion

Open
#364 3 comments 0 reactions 0 assignees View on GitHub
discussion future
Dominant language
TypeScript
Stars
655
Forks
97
PR merge metrics
No merged PRs in 30d

Description

# API v1.0

- [ ] Use static async initializers instead of constructors + ready states
- [ ] #446
- [x] #239
- [x] #450

## Client derivates
- [ ] applicationName -> application_name
- [ ] hostname -> host (Add JSDoc indicating this can be a path to a Unix socket as well)
- [ ] tls.caCertificates -> ca_certificates
- [ ] tls.enable and tls.enforce must be merged into a single option

## Pooling
- [ ] Pool can be initialized without arguments, just like Client
- [ ] Pool options should be passed as an object, instead of additional arguments
- [ ] Pool size should have a default
- [ ] `connect` -> `getClient`

## `queryArray` / `queryObject`
- [ ] Remove `query*(sql, ...params)` overload. Parameters must be provided as an object or as an array instead of relying on rest syntax
- [ ] QueryConfig.args -> arguments
- [ ] QueryConfig.text -> query
- [ ] Remove QueryConfig.encoder

## `QueryResult`
- [ ] rowCount -> affectedRows
- [ ] affectedRows is always set
- [ ] command must be a union type, not string
- [ ] text -> query

_Edited for brevity and clarity_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.