SqlStorage needs a way to do query without transaction
See original GitHub issueShort description of the problem:
Currently when I run the statement pragma user_version;
it errors out on IOS. Looking at the Cordova-sqlite-storage documentation PRAGMA statements need to be executed NOT in a transaction.
What behavior are you expecting?
Need to be able to run pragma statements without an error occurrng.
this.storage = new Storage(SqlStorage, { name: 'my.db' });
this.storage.query("pragma user_version;").then(
(data) => {
if (data.res.rows.length > 0) {
console.log(data.res.rows.item(0).user_version);
}
},
(error) => {
console.log(error);
}
);
currently returns SQLError:
code: 5
message: "could not prepare statement (23 not authorized)"
Which Ionic Version? 2.0.0-beta.10
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (5 by maintainers)
Top Results From Across the Web
SqlStorage needs a way to do query without transaction #7446
Looking at the Cordova-sqlite-storage documentation PRAGMA statements need to be executed NOT in a transaction. What behavior are you expecting?
Read more >What happens if you don't commit a transaction to a database ...
The only way to complete a transaction is to commit, any other way will result in a rollback. Therefore, if you begin and...
Read more >Azure SQL Database file space management - Microsoft Learn
This page describes how to manage file space with single and pooled databases in Azure SQL Database, and provides code samples for how...
Read more >Yesquel: scalable SQL storage for Web applications
transactions. This is needed to implement SQL transactions. YDBT introduces a new caching scheme, new mecha- nisms and policies to split nodes, new...
Read more >Troubleshooting for MDM SQL Storage - 7.3
When an unexpected issue occurs related to SQL query execution and there was ... of possible fields where you need to disable FK...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We are currently refactoring our storage APIs so we’ll ensure this use case is accounted for.
Thanks, Dan
We refactored storage to use
@ionic/storage
.This is no longer applicable. See this issue for suggestions on how to use
sql
in apps now.Thanks, Dan