Sailfish os + SQL
asked 2020-03-20 18:26:57 +0200
This post is a wiki. Anyone with karma >75 is welcome to improve it.
Hey! I'm new with sailfish os. I'm learning now sql database programming language. Can i use SQL with sailfish somehow?
We have moved to a new Sailfish OS Forum. Please start new discussions there.
asked 2020-03-20 18:26:57 +0200
This post is a wiki. Anyone with karma >75 is welcome to improve it.
Hey! I'm new with sailfish os. I'm learning now sql database programming language. Can i use SQL with sailfish somehow?
SailfishOS uses sqlite3 for sql. You can use it by adding QtQuick.LocalStorage 2.0 to your app. There are plenty of apps e.g. in GitHub where you can learn best practices. May be it is not wise to copy from my apps not to learn bad practices:)
You can use sqlite3 on the command line. Make sure, sqlite is installed:
$ rpm -qf /usr/bin/sqlite3
sqlite-3.13.0+git3-1.3.12.jolla.armv7hl
Now you can use SQL:
$ sqlite3 /tmp/test.db
SQLite version 3.13.0 2016-05-18 10:57:30
Enter ".help" for usage hints.
sqlite> create table test (name varchar primary key, age int);
sqlite> insert into test values ('eierkopp', 99);
sqlite> select * from test;
eierkopp|99
Eierkopp (
2020-03-20 20:49:05 +0200
)editThis thread is public, all members of Together.Jolla.Com can read this page.
Asked: 2020-03-20 18:26:57 +0200
Seen: 553 times
Last updated: Mar 20 '20
Can I contribute Sailfish source code? [answered]
Writing apps for Sailfish: Free APRESS book on QML and JavaScript
Trigger the "Select Internet Connection" dialog from qml
Monthly community improvements desired
Email are only synced initally, aftersward fails silently [released]
Help with .cpp file [answered]
Sailfish SDK: Requesting well documented C++ and QML tutorial