Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose res_clear as method #42

Closed
daurnimator opened this issue Sep 12, 2016 · 5 comments
Closed

Expose res_clear as method #42

daurnimator opened this issue Sep 12, 2016 · 5 comments
Assignees
Labels

Comments

@daurnimator
Copy link
Contributor

To allow explicit collection, please expose res_clear (currently a __gc metamethod) as res:clear()

@mbalmer
Copy link
Collaborator

mbalmer commented Sep 12, 2016

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)

@daurnimator
Copy link
Contributor Author

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.

@mbalmer mbalmer self-assigned this Dec 6, 2020
@mbalmer mbalmer added the wontfix label Dec 6, 2020
@mbalmer
Copy link
Collaborator

mbalmer commented Dec 6, 2020

I will soon add methamethods to make result sets -able. Think that is the proper way.

@mbalmer mbalmer closed this as completed Dec 6, 2020
@daurnimator
Copy link
Contributor Author

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?

@mbalmer
Copy link
Collaborator

mbalmer commented Dec 6, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants