I am trying to create a database locally (right now on desktop and later to a phone)

Using this website: https://mimecar.gitbook.io/qt-course...chapter-05-s01

I understand the SQL statements create table, INSERT, FOR loop etc....
My issue is I cant see where the database is being created. I need a physical DB on my devise that I can write too....Eventually using those records to update a database on my server.

Right now I just need help:
1. creating a Database IF NOT THERE and creating it in a specific location
2. The ability to write records to that database
3. And view the database records


Can anyone please help....


Qt Code:
  1. // SNIP
  2.  
  3. import QtQuick.LocalStorage 2.0
  4.  
  5. // SNIP
  6.  
  7. var db = LocalStorage.openDatabaseSync(weatherRecorder_db, "1.0", "StorageDatabase", 1000000);
  8. db.transaction(
  9. function(tx) {
  10. // Create the database if it doesn't already exist
  11. tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)');
  12.  
  13. // Add (another) greeting row
  14. tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
  15.  
  16. // Show all added greetings
  17. var rs = tx.executeSql('SELECT * FROM Greeting');
  18.  
  19. var r = ""
  20. for(var i = 0; i < rs.rows.length; i++) {
  21. r += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + "\n"
  22. }
  23. text = r
  24. console.log(text);
  25. }
  26. )
To copy to clipboard, switch view to plain text mode