SQL is still not supported?
-
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 ..
-
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.
@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 ?
@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
?
-
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.
-
In Qt 6.4.0, sqlite will be available.
-