SQL is still not supported?
-
wrote on 16 Jun 2022, 13:25 last edited by
Hi!.. excuse me my ignorance regarding to my question.. i dont know the reason to think SQL is not supported for Qt Assembly, will it be availble in the future or will it remains is this state?
Im just speculating, i dont know if this is even possible, but i think a tricky solution is to create a console Qt program that receive as input a Sql QString to be called, this process should be made from this terminal program, then from your Sandbox Web you call somehow the terminal program with the argument.... i think it can work when you want to write to DB, but read from... i cant find a way ..
-
wrote on 27 Jun 2022, 19:29 last edited by
Indeed, it is still not supported. SQL is a filesystem based database, and WebAssembly does not have access to local filesystems.
-
Indeed, it is still not supported. SQL is a filesystem based database, and WebAssembly does not have access to local filesystems.
wrote on 28 Jun 2022, 11:41 last edited by@lorn-potter said in SQL is still not supported?:
Indeed, it is still not supported. SQL is a filesystem based database, and WebAssembly does not have access to local filesystems.
Why blazor C# can do it ?
-
@lorn-potter said in SQL is still not supported?:
Indeed, it is still not supported. SQL is a filesystem based database, and WebAssembly does not have access to local filesystems.
Why blazor C# can do it ?
wrote on 28 Jun 2022, 11:53 last edited by JonB@dzmad
I think that is to do with it doing the SQL server-side from an application? E.g. https://stackoverflow.com/a/70835571/489865You would need a Db with an HTTP based API but then be very aware that your credentials will be public. A Web based Client is not secure.
This is why all SPA apps that need a backend Database use an API server for Db access. Take a look at the Blazor Wasm + Hosted template, see if that works for you.
And in a comment on that page
No, the issue is that SqlClient is in principle not supported in Blazor webassembly.
https://github.com/dotnet/SqlClient/issues/599#issuecomment-648471541
?
-
@dzmad
I think that is to do with it doing the SQL server-side from an application? E.g. https://stackoverflow.com/a/70835571/489865You would need a Db with an HTTP based API but then be very aware that your credentials will be public. A Web based Client is not secure.
This is why all SPA apps that need a backend Database use an API server for Db access. Take a look at the Blazor Wasm + Hosted template, see if that works for you.
And in a comment on that page
No, the issue is that SqlClient is in principle not supported in Blazor webassembly.
https://github.com/dotnet/SqlClient/issues/599#issuecomment-648471541
?
wrote on 28 Jun 2022, 12:12 last edited by -
wrote on 28 Jun 2022, 21:30 last edited by
I am not sure how much sense it makes to have a local filesystem database in the browser, seeing as the file systems are limited space, and only IDBFS would be persistent (which is not mounted by default)
What is your use case?
All you need to do is edit (in Qt6) configure.cmake and remove the NOT WASM from the stanza on sql, then reconfigure with -feature-thread. It will use the included 3rd party sqlite. Tested the books sql example and seems to work.
But it is possible. :) Just not supported.
-
I am not sure how much sense it makes to have a local filesystem database in the browser, seeing as the file systems are limited space, and only IDBFS would be persistent (which is not mounted by default)
What is your use case?
All you need to do is edit (in Qt6) configure.cmake and remove the NOT WASM from the stanza on sql, then reconfigure with -feature-thread. It will use the included 3rd party sqlite. Tested the books sql example and seems to work.
But it is possible. :) Just not supported.
wrote on 24 Jul 2022, 04:19 last edited by@lorn-potter I would like to create a demo of an existing application where we can test directly in the browser, since it's a demo it doesn't matter that the storage is limited.
-
wrote on 16 Sept 2022, 04:29 last edited by
In Qt 6.4.0, sqlite will be available.
-
wrote on 25 Nov 2022, 09:38 last edited by