Skip to content

Commit

Permalink
adding types
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Feb 1, 2020
1 parent 967b0b6 commit de33745
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ PostgreSQL Core Driver for NodeJS.
* Everything is in TypeScript
* No extras (query formatting, etc.)
* For Node.js >= v10.4.0, with native `BigInt` support
* Multi-server connections.
* Multi-host connections (for PostgreSQL v10+).

This low-level PostgreSQL kernel provides only connectivity and basic query execution
that's supported by PostgreSQL server, but nothing else.
Expand Down
6 changes: 3 additions & 3 deletions src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ export class Connection {
/**
* Executes Query.
*/
async query(query: string, values?: any[], options?: IQueryOptions): Promise<IQueryResult> {
return {};
async query(query: string, values?: any[], options?: IQueryOptions): Promise<IQueryResult[]> {
return [];
}

/**
* Releases connection back to the pool.
*/
release() {
release(options: any) {

}
}
6 changes: 6 additions & 0 deletions src/parsers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
* Type Parsers.
*/
export class TypeParser {

}
10 changes: 9 additions & 1 deletion src/result.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
export interface IField {
name: string
oid: number
typeId: number
}

/**
* Query Result.
*/
export interface IQueryResult {

command: string
fields: IField[]
rows: any[]
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"esModuleInterop": true,
"module": "commonjs",
"target": "es5",
"target": "ES2018",
"strict": true,
"noUnusedLocals": true
},
Expand Down

0 comments on commit de33745

Please sign in to comment.