SQLite in static image #839
-
|
Hello there! I think, this is a stupid question, but i cannot figure out how to use SQLite database with static binary. What i want to achieve:
SQLite database file stored somewhere in executable and i cannot figure out how can i "mount" them to local filesystem/docker storage/etc. Or how can i open external sqlite file by this executable. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
|
Are you asking how you can load a SQLite db, then store those changes in the executable? I'm not sure such a thing is possible, or understand why you would want to do that. Can you clarify what you mean? |
Beta Was this translation helpful? Give feedback.
-
|
Are you using a framework by any chance? Any DB adapter like SQLite should work in the same way as eg Laravel's |
Beta Was this translation helpful? Give feedback.
-
|
Yes, I didn't write clearly enough. We have a laravel project that uses SQLite. The database file ( Compile this project into a static binary file - Run the resulting binary file - Everything works - the question is where is this |
Beta Was this translation helpful? Give feedback.
-
|
As you're using Laravel, you can use the |
Beta Was this translation helpful? Give feedback.
It will do whatever you program it to do. I'm not sure what you mean.
This is just PHP, there's nothing fancy going on. To help your mental model out a bit, here's what is going on:
What you do and how you do it in step 3, is all 100% you (and whatever framework/l…