Limit and skip support #3

Merged
merged 4 commits into from May 14, 2013

Projects

None yet

2 participants

@e1ven
Contributor
e1ven commented Jan 4, 2013

I needed limit and skip support for my application - I don't know if this is useful to you, but I figured I'd offer it back ;)

I also created two empty signatures, which just enable you to call the JS without including limit or skip of you want.

It didn't look like plv8 liked having skipped params, but you can define a function with multiple potential options.

Anyway, if this isn't useful to your usecase, feel free to ignore, but this makes porting my app from Mongo->Postgres easier.

-CPD

@JerrySievert JerrySievert commented on an outdated diff Jan 5, 2013
SETOF json AS $$
+ var console = require('console');
@JerrySievert
JerrySievert Jan 5, 2013 Owner

this should be removed. mainline plv8 still refuses to allow for commonjs modules, i haven't won that battle yet (but i am planning on making another attempt).

@JerrySievert JerrySievert commented on an outdated diff Jan 5, 2013
var plan = plv8.prepare(sql, where.types);
var rows = plan.execute(where.binds);
+ console
@JerrySievert
JerrySievert Jan 5, 2013 Owner

this should go too.

@e1ven
Contributor
e1ven commented Jan 5, 2013

Yikes, sorry about that. I had found them useful in debugging, but you're right, I should have removed them. Sorry!

@e1ven
Contributor
e1ven commented Jan 24, 2013

I had some time last night, so I updated my version to include a bunch of new features I needed.
Hopefully you find them useful!

@JerrySievert

awesome. will review soon!

@JerrySievert
Owner

where "soon" is several months later. sorry!

@JerrySievert JerrySievert merged commit 8784622 into JerrySievert:master May 14, 2013
@JerrySievert
Owner

merged the hard way.

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