Node documentation for the feature: https://nodejs.org/api/sqlite.html#databasesetauthorizercallback
Use case: When writing code that runs SQL, this feature would help in ensuring specific tables or columns cannot be altered or changed. It could also be used to observe access behaviors on a database without needing to worry about wrapping INSERT or UPDATE statements. I'm sure there are other use cases, but those are what come to mind.
I'm specifically opening this up given some work I've been doing on a migration package. I want to be able to block editing the migration table when the migration is happening. I currently do this by checking migration statement strings for matching the migration table name, but that is not foolproof. This, if I understand how it works, would be.
Node documentation for the feature: https://nodejs.org/api/sqlite.html#databasesetauthorizercallback
Use case: When writing code that runs SQL, this feature would help in ensuring specific tables or columns cannot be altered or changed. It could also be used to observe access behaviors on a database without needing to worry about wrapping
INSERTorUPDATEstatements. I'm sure there are other use cases, but those are what come to mind.I'm specifically opening this up given some work I've been doing on a migration package. I want to be able to block editing the migration table when the migration is happening. I currently do this by checking migration statement strings for matching the migration table name, but that is not foolproof. This, if I understand how it works, would be.