LivInTheLookingGlass / ManifoldMarketManager

MIT License
8 stars 1 forks source link

Allow scanners to store state #20

Open LivInTheLookingGlass opened 1 year ago

LivInTheLookingGlass commented 1 year ago

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