daniel.hagl...@trafikverket.se wrote: > There seems to be lots of information in the mailing list regarding read-only > databases and locking when it comes to databases on > disk. Both locking and read-only mode seems to be functionality requiring a > file on disk. Is it even possible to have locking or > read-only mode with in-memory databases?
An in-memory database can never be accessed by more than one connection, so locking is moot. A read-only in-memory database makes no sense: the database is empty when created, so if you can't write to it, it will remain empty. What good is a database with no data in it? > I am building a cache that will be publicly available. This is done using an > SQLite :memory: database for storage. I want to > fill a table with data and then make it read-only to prevent any SQL > injection attempts. Regular SQL injection mitigation > techniques such as parameterization is not possible in this application. In a > stand-alone database engine this could have been > handled with access control but using SQLite I see no way to prevent SQL > Injection in my specific application. You can do access control via sqlite3_set_authorizer: http://sqlite.org/c3ref/set_authorizer.html -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users