arcapos / luapgsql

Lua binding for PostgreSQL
108 stars 24 forks source link

Nicer API #13

Closed daurnimator closed 8 years ago

daurnimator commented 9 years ago

Continuing from https://github.com/mbalmer/luapgsql/pull/6#issuecomment-67770765

One other API changing modification to make is around return values. There are functions that return 0 or 1, or -1 and 0. Using actual booleans would make sense.

e.g.

daurnimator commented 9 years ago

Thought of another one today: PQsocket should return nil instead of -1 when the fd is invalid.

mbalmer commented 8 years ago

I am starting to work on this. This will break compatability with earlier versions, though. So be careful with luapgsql versions 1.5 an higher once they show up here.

mbalmer commented 8 years ago

A corresponding change has been committed, but I did not yet make new release.

daurnimator commented 8 years ago

Please also update resetStart to return a boolean.

mbalmer commented 8 years ago

Am 12.05.2016 um 03:57 schrieb daurnimator notifications@github.com:

Please also update resetStart and resetPoll

done.

daurnimator commented 8 years ago

Please also update resetStart and resetPoll

done.

Sorry, resetPoll shoudn't have been changed (just resetStart). I edited my comment after but I guess that doesn't send an email notification.