godot-sqlite
godot-sqlite copied to clipboard
Document attach database shenanigans
I've discovered that in order to use "ATTACH DATABASE", one should use ProjectSettings.globalize_path(path)
on the database path and throw that into the query. For paths in res://, exported projects should use OS.get_executable_path().get_base_dir()
as a base directory, as per the docs.
Hello @skysphr
Thank you for reporting this :) I will see if I can add the necessary documentation to the README.md
regarding attach and the item on the faq My Android/iOS/HTML5 application cannot access the database! -- one possible solution might be to attach a read-only db ( in res ) to a writable one ( in user. )
i haven't tried it but this stackoverflow seems to indicate it might work. https://stackoverflow.com/questions/4637790/sqlite3-read-only-main-database-and-attach