Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
Qt-contributors-summit-2011-SQL session notes: Difference between revisions
No edit summary |
m (Categorize) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Cleanup | reason=Auto-imported from ExpressionEngine.}} | |||
[[Category:QtCS2011]] | |||
==QSql module session notes== | |||
[http://www.slideshare.net/AndreSomers/sql-session-qt-cs Slides] ''[slideshare.net]'' from André's presentation. | |||
* Add generic <span class="caps">DDL</span> C++ <span class="caps">API</span>s in QtSql possible include most of the <span class="caps">RDBMS</span> <span class="caps">DDL</span> operations on <span class="caps">TABLE</span>, <span class="caps">VIEW</span>, <span class="caps">SYNONYMS</span>, <span class="caps">DICTIONARY</span>, <span class="caps">INDEX</span>, <span class="caps">FUNCTION</span>, <span class="caps">PROCEDURE</span>, <span class="caps">TABLESPACE</span>, <span class="caps">TRIGGER</span>, etc. | |||
* Better transaction support <span class="caps">RAII</span> for transaction, automatically rollback transaction if not committed. | |||
* Asynchronous support for QtSQL | |||
* Make QtSQL thread safe or add a thread safe QtSql model wrapper | |||
* Better mechanism to remove hand written <span class="caps">SQL</span> string, especially <span class="caps">SQL</span> dialet string. something like Database template or Query/Sql statement Builder or <span class="caps">SQL</span> parser would be nice to do this job. | |||
* Support more database driver related informations name, vendor, icon, human readable description, etc. | |||
* Better support database server related feature list all databases in a database server, etc. | |||
* Enhancements for query sorting, top/limitation/paging, grouping, async. Better <span class="caps">WHERE</span> statements, etc. | |||
* Better handling for table relationships | |||
* Remove all painful/sucks sql model problems | |||
* Really need more contributors, reviewers and maintainers. | |||
* Current QtSQL bug fixings, merge requests are not processed well, looking forward the upcoming new code review and contribution model can solve this problem. | |||
==Followup== | |||
* Qt <span class="caps">SQL</span> is still important for Nokia, but as a support module. It is not core. Easy to display is important, but Nokia is not a DB company. | |||
* Vendor issues (<span class="caps">TDS</span>, <span class="caps">ODBC</span>) take a lot of time to fix/work around. | |||
* Two main questions | |||
** What can we do for improving the core functionality? | |||
*** Things like moving some connection specific stuff to connections rather than drivers (e.g. escaping, reading relations from database etc) | |||
*** transaction <span class="caps">RAII</span> | |||
*** multiple statement execution (consistent – some dbs can, some can't) | |||
** What additional functionality do we need (<span class="caps">DDL</span>)? | |||
*** incremental sort/filter thing for tableview | |||
*** extend query class like Andre's project above (for <span class="caps">DDL</span> but also other stuff) | |||
*** async <span class="caps">API</span> | |||
*** consistent threading | |||
Suggestion: separate modules for different databases? And what can we do with different types of data stores (SparQL, name-value stores, NoSQL) | |||
Problem is testing infrastructure. Nokia can probably provide some database testing infrastructure. (at least be able to run code in CI system against test databases, and provide instructions for configuring local databases) | |||
Warning about scope and closing databases should be fixed. Just make letting QSqlDatabase go out of scope. | |||
We discussed the in-view editing with the different submit strategies. There is a problem with the concept of rows there. It was suggested that basically only ManualSubmit works. There is a bit of a mismatch between the design of databases (row based) and item views (multi level grid). | |||
Is it feasable to let ''all'' database stuff be done in a separate thread? | |||
Idea: Could embedded <span class="caps">SQL</span>ite be used as a cache for other databases? Probably not… | |||
Async is needed. We need two <span class="caps">API</span>'s, both have use cases. The synchronous can be done on top of the async one. | |||
Removal of rows in views is an issue. | |||
* The issue is that there is static result set you work on. There is a difference with the strategies with insertion. Could that be fixed? | |||
** The reason is that on manual submit strategy, if something goes wrong, we have no means to identify the row, since it'll be gone from the model | |||
** Also, on manual submit strategy, the user could "undo" the "delete row" operation. If the row is gone from the model, there's no way to recover it | |||
** Idea: Mark row as hidden or deleted, so it's still in the model, but not shown in the view? | |||
** Or – re-introduce a QSqlCursor like class that manages the result set. The model would just be a thin wrapper around the QSqlCursor. The QSqlCursor would have all the "raw" data, the model in turn could filter out already deleted rows and pretend they don't exist. | |||
==Feel free to contribute: Trolls are available for help, but work needs to come from the community.== | |||
Discussion on qt5-feedback. |
Latest revision as of 16:50, 6 January 2017
This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine. Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean. |
QSql module session notes
Slides [slideshare.net] from André's presentation.
- Add generic DDL C++ APIs in QtSql possible include most of the RDBMS DDL operations on TABLE, VIEW, SYNONYMS, DICTIONARY, INDEX, FUNCTION, PROCEDURE, TABLESPACE, TRIGGER, etc.
- Better transaction support RAII for transaction, automatically rollback transaction if not committed.
- Asynchronous support for QtSQL
- Make QtSQL thread safe or add a thread safe QtSql model wrapper
- Better mechanism to remove hand written SQL string, especially SQL dialet string. something like Database template or Query/Sql statement Builder or SQL parser would be nice to do this job.
- Support more database driver related informations name, vendor, icon, human readable description, etc.
- Better support database server related feature list all databases in a database server, etc.
- Enhancements for query sorting, top/limitation/paging, grouping, async. Better WHERE statements, etc.
- Better handling for table relationships
- Remove all painful/sucks sql model problems
- Really need more contributors, reviewers and maintainers.
- Current QtSQL bug fixings, merge requests are not processed well, looking forward the upcoming new code review and contribution model can solve this problem.
Followup
- Qt SQL is still important for Nokia, but as a support module. It is not core. Easy to display is important, but Nokia is not a DB company.
- Vendor issues (TDS, ODBC) take a lot of time to fix/work around.
- Two main questions
- What can we do for improving the core functionality?
- Things like moving some connection specific stuff to connections rather than drivers (e.g. escaping, reading relations from database etc)
- transaction RAII
- multiple statement execution (consistent – some dbs can, some can't)
- What additional functionality do we need (DDL)?
- incremental sort/filter thing for tableview
- extend query class like Andre's project above (for DDL but also other stuff)
- async API
- consistent threading
- What can we do for improving the core functionality?
Suggestion: separate modules for different databases? And what can we do with different types of data stores (SparQL, name-value stores, NoSQL)
Problem is testing infrastructure. Nokia can probably provide some database testing infrastructure. (at least be able to run code in CI system against test databases, and provide instructions for configuring local databases)
Warning about scope and closing databases should be fixed. Just make letting QSqlDatabase go out of scope.
We discussed the in-view editing with the different submit strategies. There is a problem with the concept of rows there. It was suggested that basically only ManualSubmit works. There is a bit of a mismatch between the design of databases (row based) and item views (multi level grid).
Is it feasable to let all database stuff be done in a separate thread?
Idea: Could embedded SQLite be used as a cache for other databases? Probably not…
Async is needed. We need two API's, both have use cases. The synchronous can be done on top of the async one.
Removal of rows in views is an issue.
- The issue is that there is static result set you work on. There is a difference with the strategies with insertion. Could that be fixed?
- The reason is that on manual submit strategy, if something goes wrong, we have no means to identify the row, since it'll be gone from the model
- Also, on manual submit strategy, the user could "undo" the "delete row" operation. If the row is gone from the model, there's no way to recover it
- Idea: Mark row as hidden or deleted, so it's still in the model, but not shown in the view?
- Or – re-introduce a QSqlCursor like class that manages the result set. The model would just be a thin wrapper around the QSqlCursor. The QSqlCursor would have all the "raw" data, the model in turn could filter out already deleted rows and pretend they don't exist.
Feel free to contribute: Trolls are available for help, but work needs to come from the community.
Discussion on qt5-feedback.