meteor / postgres-packages

Early preview of PostgreSQL support for Meteor (deprecated, here for historical reasons)
http://meteor-postgres.readthedocs.org/
158 stars 25 forks source link

Add fetchOne and fetchValue. Also a bunch of unit tests #19

Closed robfallows closed 9 years ago

robfallows commented 9 years ago

These changes use ES2015 and Meteor Promises in the Tinytest tests. Built with 1.2RC15.

stubailo commented 9 years ago

A couple comments inline. Also, should fetchValue be more specifically named? I feel like maybe it should have the word 'column' somewhere in the name, but maybe it's OK.

rclai commented 9 years ago

This is great!

robfallows commented 9 years ago

@stubailo : I was referring back to the original issue as far as fetchValue is concerned. @rclai was specifically requiring a way to avoid column-referenced values (I added in an optional column-referenced parameter though). Happy to take some guidance on this - what do you think?

stubailo commented 9 years ago

Awesome work!

stubailo commented 9 years ago

@robfallows can we also add docs about this?

robfallows commented 9 years ago

np. Probably after the weekend though.

robfallows commented 9 years ago

@stubailo : I have first pass of docs written - where should they go?

stubailo commented 9 years ago

Inside the docs/ folder. Probably to http://meteor-postgres.readthedocs.org/en/latest/knex/ which is in docs/knex.md.

rclai commented 9 years ago

@robfallows @stubailo, shouldn't fetchOne return undefined if no row is found the same way Mongo's findOne returns undefined when it finds nothing?

The reason is when I use it in the getMeteorData, if the data isn't there, which it won't be initially, then I'm going to see this error.