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

Allow scanners to store state #20

Open
LivInTheLookingGlass opened this issue Oct 17, 2022 · 0 comments · May be fixed by #48
Open

Allow scanners to store state #20

LivInTheLookingGlass opened this issue Oct 17, 2022 · 0 comments · May be fixed by #48

Comments

@LivInTheLookingGlass
Copy link
Owner

Scanners need to be able to keep state somehow. Easiest way to do this would be to use the scanner_id field to generate a table name on demand. Maybe have a table which keeps track of this, like so:

scanner_id INTEGER, table_name TEXT, expires datetime

Whenever a scanner accesses their table, they do so via a helper function. This function ensures they use the right name, and updates the expiry line. Scanners can then use the db as much as they want, and create as many prefixed tables as they want

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
1 participant