Closed daurnimator closed 3 years ago
Am 12.09.2016 um 03:18 schrieb daurnimator notifications@github.com:
To allow explicit collection, please expose res_clear (currently a __gc metamethod) as res:clear()
Easy enough to add, but why do you want that? What is the reason? The automatic gc worksed fine for me, even with very large results.
(not objecting, jusr asking)
I was converting some C code (that used libpq) to lua. It would be nice for debuggability if I can make the calls into libpq deterministic.
I will soon add methamethods to make result sets
This issue was about exposing the method as more than a metamethod, so that I could call it e.g. in a test exactly when I wanted. Rather than waiting for the GC; or with lua 5.4's new close: ending the current scope.
Please consider reopening/accepting?
If you can make use of this feature, then I can add it, it does not harm.
So yes, I will add it.
Am 06.12.2020 um 10:41 schrieb daurnimator notifications@github.com:
This issue was about exposing the method as more than a metamethod, so that I could call it e.g. in a test exactly when I wanted. Rather than waiting for the GC; or with lua 5.4's new close: ending the current scope.
Please consider reopening/accepting?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/arcapos/luapgsql/issues/42#issuecomment-739478700, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIAHZ7H4XKTZTAXY5Q7O3STNGVVANCNFSM4CPIUM7A.
To allow explicit collection, please expose
res_clear
(currently a __gc metamethod) asres:clear()