aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/sqlite/sqliteexception.h
Commit message (Collapse)AuthorAgeFilesLines
* QmlDesigner: Use Sqlite source location wrapperMarco Bubke2025-01-221-1/+36
| | | | | | Task-number: QDS-14575 Change-Id: I217d22da3bcf8a611dfa9b521495b5f6b646ef15 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Sqlite: Add location to exceptionMarco Bubke2025-01-221-6/+18
| | | | | | | | So we can printout the caller site. Fixes: QDS-14540 Change-Id: Id0999f1e0bf5426b32aa69b07252d95529f22b65 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Sqlite: trace exceptionsMarco Bubke2024-03-201-3/+6
| | | | | | | | | That makes it easier to see what got wrong in the trace. So less debugging. Change-Id: I26ec3d6a6f81cbd20871260a2b32123343a20618 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Fix compilation with QTC_STATIC_BUILDCristian Adam2023-05-251-4/+1
| | | | | Change-Id: Ie94439d190245e821c17de73075397695d1af413 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Merge remote-tracking branch 'origin/10.0' into qds/devTim Jenßen2023-03-261-1/+1
|\ | | | | | | | | | | | | | | bigger conflicts resolved at: src/plugins/qmldesigner/CMakeLists.txt src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp Change-Id: I08e2a109d8e37cbd77225129854e9e633725bfc7
| * 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>
* | Sqlite: Generalize error handlingMarco Bubke2023-03-151-0/+6
| | | | | | | | | | | | | | | | | | Instead of having multiple error handling function just have one which handles all error codes. Change-Id: I6fc0484a335dcf582fc93159a9fdb0fea440daca Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Sqlite: Add extended exceptions for can't open errorsMarco Bubke2023-03-151-0/+42
| | | | | | | | | | | | Change-Id: Ib092b5fe721b8b063f8c503cc1a650447e393951 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Sqlite: Add extended exceptions for connection lock errorsMarco Bubke2023-03-151-0/+14
| | | | | | | | | | | | Change-Id: If6f6cd6ba67edc8716f3c43b832642244fc1e1c3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Sqlite: Add extended exceptions for readonly errorsMarco Bubke2023-03-151-0/+42
| | | | | | | | | | | | Change-Id: I96a8f1c87ce116e99b7e6333166299b39fb9c27c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Sqlite: Add extended exceptions for corruption errorsMarco Bubke2023-03-151-0/+21
| | | | | | | | | | | | Change-Id: I705bffc54def12e914caf31cacf870ad2f9cbeea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Sqlite: Add extended exceptions for contraint errorsMarco Bubke2023-03-151-0/+85
| | | | | | | | | | | | Change-Id: I2e3030de7496703ba1e9fbd1a28ed55061e1b2b5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Sqlite: Add extended exceptions for errorsMarco Bubke2023-03-151-0/+21
| | | | | | | | | | | | Change-Id: I297bf7a82625198200b0e4ed260d81358d31c56c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Sqlite: Add extended exceptions for busy errorsMarco Bubke2023-03-151-0/+39
| | | | | | | | | | | | Change-Id: I812650401f4a5d5a099abc0183d2f7ed4e1d64c6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Sqlite: Add extended exceptions for IO errorsMarco Bubke2023-03-151-0/+198
| | | | | | | | | | | | Change-Id: I3862a91e3d9989c44c7c62171324c38b66a67ac0 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Sqlite: Inject RTTI into TUMarco Bubke2023-02-281-58/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had problems on macOS with the catching of exceptions because the has type_info::hash_code was different. This is probably a bug because RTTI code is injected for an inline class. To work around that problem we implemented the virtual what method for every exception. Task-number: QDS-9266 Change-Id: I79052c8b70adead412d1940b17195151fb19ebb9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
* | Sqlite: Move virtual methode into .cppMarco Bubke2023-02-281-1/+1
|/ | | | | | | | | Task-number: QDS-9266 Change-Id: Ic1083e088ef27d7c47fa3ae142a103dbcad10a5b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Vikas Pachdha <vikas.pachdha@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>
* Sqlite: Introduce BindParameterCount template parameterMarco Bubke2021-12-091-6/+6
| | | | | | | | | | | The BindParameterCount is checked at compile time and then again for the construction of the statement. So we provide an early error instead of an some error later or even stranger behavior. Change-Id: I860ca1f78645c222ae1accf5c7a469c77befc3bd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Cleanup exceptionsMarco Bubke2021-12-091-173/+81
| | | | | | | | | | There are now two base exceptions. Exception and ExceptionWithMessage. We very often don't use the extra message. So don't pay for what you don't use. Otherwise it is replacing code with using statements. Change-Id: I213cf1f02718f6d3b2aa0e2a64626c9fc5c7c917 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Add exception if statement is called outside of a lockMarco Bubke2021-05-311-0/+8
| | | | | | | | | | Sometimes it is really hard to trace if sqlite statement is called outside of a database connection lock. So we know throw an exception in the unit test. So we get failing tests. Change-Id: I71485b9473075751a2fb771ce7e2954e28d8413e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Sqlite: Add change set iteratorMarco Bubke2020-11-031-46/+69
| | | | | | | Task-number: QDS-2998 Change-Id: I7bfa8af51d9d7e6122902ee132ad51019e20afb5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Sqlite: Extend error handlingMarco Bubke2020-06-191-2/+90
| | | | | | | | We do only handled errors for the v1 interface. Now we handle much more. Sadly this is hard to test, so there are no tests. Change-Id: I6f55dc1bad744776bb33a6d0d6c71e52d2f097f6 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Add session supportMarco Bubke2020-06-051-1/+17
| | | | | | | | | Session are captured by hooking in the sqlite changes. They are saved in blobs and containing inserts, update and deletes. Because the are semantically coupled to translactions we add a Change-Id: Ie095558ebc50601fcaae32958ebeeb98b72d73b9 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Improve SqliteStatement column checkMarco Bubke2020-05-271-4/+3
| | | | | | | | | We have done it for every getter. Now we do it only once as we ask for the values. It simplifies the code and the test and could even improve performance. Change-Id: Ia7d4a33a77ec7c0a5fda548424fbf8b192f07511 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Sqlite: Derive Sqlite::Exception from std::exceptionMarco Bubke2020-05-141-5/+7
| | | | | | Change-Id: I11a1162e5b450f71b8c2c4068ace6ef08825d7bb Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Add update hook and use it to get the last changed idMarco Bubke2020-05-121-0/+2
| | | | | | | | Sqlite has a function to get the last inserted rowid but very often you want to get the updated rowid too. Change-Id: Ie276a5039682813ad16597433996a2959f54d9ba Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Add foreign key supportMarco Bubke2020-05-071-0/+8
| | | | | | | It is still only support references in columns but so far it is enough. Change-Id: Iebb4866cf738d651270e54357b5e4a2837f05417 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Add Sqlite::ValueMarco Bubke2020-04-271-0/+8
| | | | | | | | | | | | | | | It adds a layer if you don't know if the type is integer, float or string. It does not handle bytearrays here because so far there is no need. There are two classes, Sqlite::Value and Sqlite::ValueView. Value owns the string, ValueView holds only a view the string. So there is no allocation. It is designed to hold Utf-8 string like Sqlite but it can be easily converted in and from QString or QVariant but mind about that this is not free. ValueView has no constructors on perpose because it would be ambiguous if there would be constructors for the other primitives of the Sqlite layer like "int64", "double" and "string view". Change-Id: Ia39364eb2fc1998e5c59fdb4316add22c748507d Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Handle constraint exceptions in the file path storageMarco Bubke2018-04-041-3/+12
| | | | | | | | | | It can be happen that the entry is written by an other connection after we tried to read and before we write. This would lead to a double entry which be prevented by the unique index in the database. In that case we simply try again and read the id from the database. Change-Id: I6c9d94e95ae11556bb446813f64be0855be4ddbe Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Add file cacheMarco Bubke2017-10-051-2/+2
| | | | | | | | | | | The database is using file path integer ids to handle file paths because otherwise we would save many redundant data. This patch is improving it further with the introduction of a database based file path cache. The entries are now divided in a directory path and file name. This is quite handy for directory based file watching. Change-Id: I03f2e388e43f3d521d6bf8e39dfb95eb2309dc73 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Improve exception handlingMarco Bubke2017-09-201-0/+207
| | | | | | | | Introducing different exceptions for different error cases. Change-Id: I4371d1e64d9dca2a9f68dcbaa4a891c55879c1f5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Sqlite: Remove the Sqlite PrefixMarco Bubke2017-09-181-3/+3
| | | | | | | We use a name space now, so the prefix is not of much use. Change-Id: I2b077576f94dab778add6ab2e54870f7ca18da78 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Utils: Convert to SmallStringView for comparisonMarco Bubke2017-08-291-3/+3
| | | | | Change-Id: I38d9716225b81091e8e75b26c9c2258a2aefa987 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Cleanup exceptionsMarco Bubke2017-07-271-4/+9
| | | | | Change-Id: Id5ac7e6aba407eb5a3164bba57bff043e809beef Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Sqlite: Cleanup SqliteMarco Bubke2017-07-271-3/+7
| | | | | | | | | We don't need the threading anymore, so we removed it. The indexer will be run in its thread anyway, so an extra thread makes the code only more complicated. And we added namespaces. Change-Id: Ibcba306324763285cf653c28bb08122345e5f8da Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Wholesale conversion to #pragma oncehjk2016-03-301-4/+1
| | | | | | | Kudos to cgmb and https://github.com/cgmb/guardonce Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update remaining files in src Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Clang: Reorder includesMarco Bubke2015-06-161-2/+2
| | | | | Change-Id: I324e88c0d295114390c1fac2745c0d2d47637ece Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Introduce codemodelbackend process and libraryMarco Bubke2015-06-031-0/+50
This is a partial result of wip/clang-oop. More will follow. This allows us to invoke the completion out of the Qt Creator process and thus safes us as against libclang crashes. At this point only the completion use case is supported. Some notes on the individual components: src/libs/codemodelbackendipc * library encapsulating the inter process communication handling * used by the backend application and in a follow-up change by the creator integration src/libs/3rdparty/sqlite * version 3.8.10.2 * dependency of codemodelbackendipc, will be used to storage indexing data, among others src/tools/codemodelbackend * the backend application tests/unit: * unit tests Change-Id: I91a48e27467581a22fb760a18d8eb926008fea60 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>