Skip to content

Conversation

@jzimmek
Copy link
Contributor

@jzimmek jzimmek commented Feb 23, 2012

after having some struggel with the actual parseArray implementation, i digged into the code and created a (hopefully) more useful implementation. i created an ArrayParser which support:

  • entry values being "null"
  • entry values containing "," characters
  • nested arrays (multidimensional)
  • support for string and integer array types
  • generic value converter for further array-datatypes (e.g. timestamp, double, etc.)

i added several tests in array-tests.js to verify the stuff really works.

@brianc
Copy link
Owner

brianc commented Feb 23, 2012

❤️ thank you. Will merge this shortly.

@brianc
Copy link
Owner

brianc commented Feb 24, 2012

@jzimmek I went to merge this and when I ran make test-all I received the following:

HEAD is now at 369357a... enhance array parser
bmc@li376-101:~/src/node-postgres$ make test-all
cleartext-password-tests.js..
configuration-tests.js.......
connection-string-tests.js......
md5-password-tests.js...
notification-tests.js.
prepared-statement-tests.js.......
query-queue-tests.js................
query-tests.js........Message: undefined
AssertionError: [] deepEqual [""]
    at /home/bmc/src/node-postgres/test/unit/client/query-tests.js:49:10
    at /home/bmc/src/node-postgres/test/test-helper.js:149:16
    at Object.<anonymous> (/home/bmc/src/node-postgres/test/unit/client/query-tests.js:46:1)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Array.0 (module.js:479:10)
    at EventEmitter._tickCallback (node.js:192:40)

 AssertionError: [] deepEqual [""]
    at /home/bmc/src/node-postgres/test/unit/client/query-tests.js:49:10
    at /home/bmc/src/node-postgres/test/test-helper.js:149:16
    at Object.<anonymous> (/home/bmc/src/node-postgres/test/unit/client/query-tests.js:46:1)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Array.0 (module.js:479:10)
    at EventEmitter._tickCallback (node.js:192:40)

I definitely want to improve the array parser, but your commits aren't testing clean. I'm on postgres 8.4 (debian) by the way...do you think this impacts things?

@jzimmek
Copy link
Contributor Author

jzimmek commented Feb 24, 2012

sorry, my fault. unit tests are working now.

@jzimmek
Copy link
Contributor Author

jzimmek commented Feb 27, 2012

just want to know if the tests are passing now or if there is anything left to do ?

@brianc brianc merged commit cdc8c09 into brianc:master Feb 28, 2012
@brianc
Copy link
Owner

brianc commented Feb 28, 2012

There's nothing left for you to do. Your tests are passing fine now. Sorry...my life's really been crazy the past few months & I've not had a lot of time after work to devote to open source like I've wanted. Things should be settling down soon enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants