FoundationDB/sql-layer — pull request #1082 by MMcM (2013-12-04 01:11:09+00:00)
Title:  Consolidate, standardize and extend the CURRVAL & NEXTVAL functions.

* They were nearly identical, but in two separate classes.
* They were type-parameterized inconsistently and had confusing field names.
* There weren't any YAML tests for the functional forms, just the wordy SQL syntax.
* Postgres has single argument versions, which takes just a (possibly qualified) sequence name. Since this is known by some drivers (such as the PHP PDO one), add support for it.

While I'm here, fix the simpler cases of the error message for wrong function arity. It's hard to give a good error message if there's a complex overloading that allows, for instance, 2 or 4 but not 3 arguments. But those are rare, if they exist at all.