Skip to content

Commit c74ed10

Browse files
committed
updated type definitions
1 parent f4768f2 commit c74ed10

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ The only required property for a query is `text`, however, the behavior of the `
241241
| mode | enum? | Optional row mode; can be one of the following values: [`object`, `array`]; default is `object`.<br/><br/>When `mode=object`, each row will be returned as an object with property keys being field names.<br/><br/>When `mode=array` each row will be returned as an array of values (without the field names). |
242242
| name | string? | Optional query name; used for logging. Also, when `execute()` is called with an array of queries, the returned map of results will be indexed by query name. For queries which don't have a name, the results will be held under the `undefined` key. If several executed queries have the same name, an array of results will be stored under the key for that name |
243243
| params | object? | Optional parameters to apply to to the query (see [parameterized queries](#parameterized-queries))
244-
| handler | object? | Optional result handler to apply custom parsing logic (see [result parsing](#result-parsing) ) |
244+
| handler | <ResultHandler>? | Optional result handler to apply custom parsing logic (see [result parsing](#result-parsing) ) |
245245
246246
A few examples of executing different queries:
247247

bin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ The only required property for a query is `text`, however, the behavior of the `
241241
| mode | enum? | Optional row mode; can be one of the following values: [`object`, `array`]; default is `object`.<br/><br/>When `mode=object`, each row will be returned as an object with property keys being field names.<br/><br/>When `mode=array` each row will be returned as an array of values (without the field names). |
242242
| name | string? | Optional query name; used for logging. Also, when `execute()` is called with an array of queries, the returned map of results will be indexed by query name. For queries which don't have a name, the results will be held under the `undefined` key. If several executed queries have the same name, an array of results will be stored under the key for that name |
243243
| params | object? | Optional parameters to apply to to the query (see [parameterized queries](#parameterized-queries))
244-
| handler | object? | Optional result handler to apply custom parsing logic (see [result parsing](#result-parsing) ) |
244+
| handler | <ResultHandler>? | Optional result handler to apply custom parsing logic (see [result parsing](#result-parsing) ) |
245245
246246
A few examples of executing different queries:
247247

bin/pg-io.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ declare module "pg-io" {
102102

103103
// QUERY
104104
// --------------------------------------------------------------------------------------------
105-
export type QueryMask = 'list' | 'object';
105+
export type QueryMask = 'list' | 'single';
106106
export type QueryMode = 'object' | 'array';
107107

108108
export interface QuerySpec {
@@ -121,7 +121,7 @@ declare module "pg-io" {
121121
}
122122

123123
export interface SingleResultQuery<T> extends ResultQuery<T> {
124-
mask : 'object';
124+
mask : 'single';
125125
}
126126

127127
export interface ListResultQuery<T> extends ResultQuery<T> {

pg-io.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ declare module "pg-io" {
102102

103103
// QUERY
104104
// --------------------------------------------------------------------------------------------
105-
export type QueryMask = 'list' | 'object';
105+
export type QueryMask = 'list' | 'single';
106106
export type QueryMode = 'object' | 'array';
107107

108108
export interface QuerySpec {
@@ -121,7 +121,7 @@ declare module "pg-io" {
121121
}
122122

123123
export interface SingleResultQuery<T> extends ResultQuery<T> {
124-
mask : 'object';
124+
mask : 'single';
125125
}
126126

127127
export interface ListResultQuery<T> extends ResultQuery<T> {

0 commit comments

Comments
 (0)