aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/sqlite/sqlitealgorithms.h
Commit message (Collapse)AuthorAgeFilesLines
* Sqlite: Simplify insertUpdateDeleteMarco Bubke2025-03-101-36/+38
| | | | | | | That hopefully is clearing up the intention. Change-Id: I89ef34dddaf8453b28361be8875c73d0dd4e9d5b Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Sqlite: Improve insertUpdateDeleteMarco Bubke2023-08-291-9/+9
| | | | | | | | | | Instead of a value we keep the iterator. That is saving us a useless copy because the value range cannot change. Change-Id: I2ea36b5a08e378f8e148f317c3384e4c4954a439 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Remove Utils::optionalEike Ziller2022-09-011-2/+2
| | | | | | | | | | Since we are now requiring macOS 10.14 we can remove our local implementation of optional and use std::optional for macOS too. Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use compare opertators from string_viewMarco Bubke2022-07-141-8/+1
| | | | | | Change-Id: I9da78dd15a6696a7061342cc1b1f1571eba74f19 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Fix compile with old XcodeChristian Stenger2022-01-131-1/+2
| | | | | | Change-Id: Idef9562282da784a152af5eddaeea7968c8d2c8c Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Sqlite: Fix insertUpdateDeleteMarco Bubke2021-12-081-4/+30
| | | | | | | | | | | | Like you can read in https://www.sqlite.org/isolation.html after an update they same value can be show up for an iterator advancement. This would be lead to an delete. So the last value for update is saved and then compared in the delete method. If they are equal the delete is skipped. Change-Id: Ic0aa6619f6a4a520eac77be4e5a83cbe533d102d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Sync project storageMarco Bubke2021-05-311-2/+2
| | | | | | | Task-number: QDS-4423 Change-Id: Ia99df711effff2909b0a57ecebfb386ca51165f8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Sqlite: Add insertUpdateRemoveMarco Bubke2021-05-311-0/+92
An generic approach to merge values into a database. It is comparing two ranges. The first range is the Sqlite select range and the second one which are the new values. New values are inserted, change are updated and missing values are removed. Unchanged values are not touched. The compare function is comparing a key. Both ranges are binary ordered. Change-Id: I973c83677ea74f8fa62bd7ab8a73ed560c806562 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>