Skip to content

result doesn't include rowCount, command and oid when using native bindings #128

@petejkim

Description

@petejkim
CREATE TABLE "test_table" (
  id integer PRIMARY KEY,
  foo varchar(255)
);

INSERT INTO "test_table" (id, foo) VALUES (123, "bar");
pg.connect (err, client) ->
  throw err if err
  client.query "SELECT * FROM test_table WHERE id = $1", [123], (err, res) ->
    throw err if err
    console.log res

result when using require('pg') :

{ rows: 
   [ { id: 123,
       foo: 'bar' } ],
  command: 'SELECT',
  rowCount: 1,
  oid: NaN }

result when using require('pg').native :

{ rows: 
   [ { id: 123,
       foo: 'bar' } ] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions