KDbProject
ActivePublic

Details

Description

Development of KDb, a database connectivity and creation framework, consisted of a general-purpose
C++ Qt library and set of plugins delivering support for various database vendors.

Development wiki: https://community.kde.org/KDb
Contact: https://community.kde.org/Kexi/Contact

Recent Activity

Jan 15 2019

staniek reopened D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
Jan 15 2019, 9:20 AM · KDb
staniek added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

@piggz
Pushed for 3.2 Beta, post-commit review would be welcome.

Jan 15 2019, 9:20 AM · KDb
staniek closed D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
Jan 15 2019, 9:19 AM · KDb
sukalyanbanga removed a watcher for KDb: sukalyanbanga.
Jan 15 2019, 6:36 AM

Jan 14 2019

sukalyanbanga added a watcher for KDb: sukalyanbanga.
Jan 14 2019, 11:53 AM

Jan 4 2019

staniek closed D17336: Restore support for date/time constants in KEXI SQL.
Jan 4 2019, 9:27 PM · KDb
staniek updated the diff for D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

Update to 3.2

Jan 4 2019, 8:54 PM · KDb
staniek reopened D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
Jan 4 2019, 11:42 AM · KDb
staniek closed D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
Jan 4 2019, 11:32 AM · KDb

Jan 1 2019

staniek updated the diff for D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
  • Update API docs for KDbDriverManager::driverIdsForMimeType()
Jan 1 2019, 11:31 PM · KDb
staniek added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
In D17887#384770, @pino wrote:

I don't understand what is tested in KDbTestUtils::testDriver() now, related to the mimetypes. The old logic looked better (and simpler too) to me, I'd just leave that.
The only simple addition IMHO is that manager.driverIdsForMimeType(mimeName) returns a valid driver for each of the mimetypes specified in the plugin metadata.

Jan 1 2019, 10:49 PM · KDb
staniek added inline comments to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
Jan 1 2019, 10:41 PM · KDb
pino added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

I don't understand what is tested in KDbTestUtils::testDriver() now, related to the mimetypes. The old logic looked better (and simpler too) to me, I'd just leave that.
The only simple addition IMHO is that manager.driverIdsForMimeType(mimeName) returns a valid driver for each of the mimetypes specified in the plugin metadata.

Jan 1 2019, 9:52 PM · KDb
staniek added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

Tested before and after adding application/vnd.sqlite3 to the system (exact FD.o patch) - it works only thanks to keeping the old x-sqlite3 type in the JSON and because FD.o has an alias. Good that I asked about json, otherwise it would fail for me. Added more extensive tests to verify. Thanks @pino and be welcome to more reviews :)

Jan 1 2019, 9:42 PM · KDb
staniek added a reviewer for D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17): pino.
Jan 1 2019, 9:36 PM · KDb
staniek updated the diff for D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
  • Resolve plugin mime types before adding metadata - idea from from Pino
  • Add autotests for checking detection of every mime type that should be supported
Jan 1 2019, 9:36 PM · KDb
pino added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
In D17887#384687, @pino wrote:

Shorter: what change in kdb_sqlitedriver.json do you propose?

With the draft of patch I proposed, none.

OK but that means you propose to revert change for the json or keeping the change as is?

Jan 1 2019, 7:25 PM · KDb
staniek added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
In D17887#384687, @pino wrote:

Shorter: what change in kdb_sqlitedriver.json do you propose?

With the draft of patch I proposed, none.

Jan 1 2019, 6:27 PM · KDb
pino added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

Shorter: what change in kdb_sqlitedriver.json do you propose?

Jan 1 2019, 5:53 PM · KDb
staniek added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
In D17887#384666, @pino wrote:

If I understand correctly if we do not explicitly list "application/vnd.sqlite3" in the JSON, current FD.o master https://cgit.freedesktop.org/xdg/shared-mime-info/commit/freedesktop.org.xml.in?id=36a88b01f6ae90da35a2f6a072db159c84cea768 resolves "application/vnd.sqlite3" into "application/x-kexiproject-sqlite3" only if we go to parent mime type "application/x-sqlite3" which is alias of real parent "application/vnd.sqlite3". I see that "application/x-kexiproject-sqlite3" has room for improvements. I do not see that we use QMimeType::parentMimeTypes().

I don't see what parent mimetypes have anything to do with this. There is no parent lookup neither "is a" checking in the plugin loader, all it does is "supports this mimetype".
Do not overthink the issue, really...

Jan 1 2019, 5:41 PM · KDb
pino added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

If I understand correctly if we do not explicitly list "application/vnd.sqlite3" in the JSON, current FD.o master https://cgit.freedesktop.org/xdg/shared-mime-info/commit/freedesktop.org.xml.in?id=36a88b01f6ae90da35a2f6a072db159c84cea768 resolves "application/vnd.sqlite3" into "application/x-kexiproject-sqlite3" only if we go to parent mime type "application/x-sqlite3" which is alias of real parent "application/vnd.sqlite3". I see that "application/x-kexiproject-sqlite3" has room for improvements. I do not see that we use QMimeType::parentMimeTypes().

Jan 1 2019, 4:26 PM · KDb

Dec 31 2018

staniek added inline comments to D17336: Restore support for date/time constants in KEXI SQL.
Dec 31 2018, 8:20 PM · KDb
staniek added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

Thanks Pino. Your patch adds some future-proof, I would adapt it. But I yet have to see how the problem is solved without patching of the json file. If I understand correctly if we do not explicitly list "application/vnd.sqlite3" in the JSON, current FD.o master https://cgit.freedesktop.org/xdg/shared-mime-info/commit/freedesktop.org.xml.in?id=36a88b01f6ae90da35a2f6a072db159c84cea768 resolves "application/vnd.sqlite3" into "application/x-kexiproject-sqlite3" only if we go to parent mime type "application/x-sqlite3" which is alias of real parent "application/vnd.sqlite3". I see that "application/x-kexiproject-sqlite3" has room for improvements. I do not see that we use QMimeType::parentMimeTypes().

Dec 31 2018, 7:22 PM · KDb
piggz accepted D17336: Restore support for date/time constants in KEXI SQL.
Dec 31 2018, 7:09 PM · KDb
piggz added inline comments to D17336: Restore support for date/time constants in KEXI SQL.
Dec 31 2018, 7:09 PM · KDb
pino added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

OK, second attempt (still untested!), resolving mimetypes on lookup:

Dec 31 2018, 5:39 PM · KDb
pino added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

Ah your test is for something else than I wrote above and might be useful but I just learned that we never know (like in the case of the linked FD.o change) what happens on user's OS and whether the OS provide type alias or regular type as a result of detection. So I'd be safer if we handle all mime types and aliases declared by the plugins.

Dec 31 2018, 5:31 PM · KDb
staniek added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

m_metadata_by_mimetype's key is string so application/x-foo and application/x-foo-alias are two different keys that here point to the same plugin. User's code is free to ask about either type by name.

Dec 31 2018, 5:31 PM · KDb
staniek added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

Ah your test is for something else than I wrote above and might be useful but I just learned that we never know (like in the case of the linked FD.o change) what happens on user's OS and whether the OS provide type alias or regular type as a result of detection. So I'd be safer if we handle all mime types and aliases declared by the plugins.

Dec 31 2018, 5:28 PM · KDb
pino added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
In D17887#384384, @pino wrote:

The QSet is used to avoid that the same metadats is registered twice in m_metadata_by_mimetype for the same mimetype, in case a plugin specifies two entries (mime name and one alias of it).

Thanks. Interesting though m_metadata_by_mimetype.insertMulti(mimeType, metaData.data()) is used for a purpose, it's valid case to have multiple plugins supporting the same type.

Dec 31 2018, 5:26 PM · KDb
staniek added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
In D17887#384384, @pino wrote:
Dec 31 2018, 5:19 PM · KDb
pino added a comment to D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).

Another option could be to resolve the mimetypes when loading the metadata of the plugins, in DriverManagerInternal::lookupDriversInternal().

Dec 31 2018, 4:47 PM · KDb
staniek updated the summary of D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
Dec 31 2018, 4:03 PM · KDb
staniek requested review of D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17).
Dec 31 2018, 4:02 PM · KDb

Dec 28 2018

staniek added a comment to D17336: Restore support for date/time constants in KEXI SQL.

@piggz Done in kexi.git: D17847.

Dec 28 2018, 9:29 PM · KDb
staniek updated the test plan for D17336: Restore support for date/time constants in KEXI SQL.
Dec 28 2018, 9:28 PM · KDb
staniek added a revision to T10134: [sql] Restore support for date/time constants in KEXI SQL: D17847: Fix crash on failed opening of query in Design view.
Dec 28 2018, 9:26 PM · KDb
staniek added a comment to D17336: Restore support for date/time constants in KEXI SQL.

Following BT when doing the action:
Open database
Right click on query and select Design
When prompted that cannot open in design view, select option to open in text view
Crash

Dec 28 2018, 8:42 PM · KDb

Dec 27 2018

piggz added a comment to D17336: Restore support for date/time constants in KEXI SQL.

P.S. i got query to work by arranging date as yyyy-mm-dd .... i had used dd-mm-yyyy

Dec 27 2018, 7:05 PM · KDb
piggz added a comment to D17336: Restore support for date/time constants in KEXI SQL.

Following BT when doing the action:
Open database
Right click on query and select Design
When prompted that cannot open in design view, select option to open in text view
Crash

Dec 27 2018, 7:04 PM · KDb

Dec 25 2018

staniek added a comment to D17336: Restore support for date/time constants in KEXI SQL.

I tested a simple expression, such as
select #date# as expr1
and it worked
But a more complex query such as
SELECT mi_band_activity.*, timestamp_dt FROM mi_band_activity where timestamp_dt > #23-May-2018#

Dec 25 2018, 10:12 PM · KDb
piggz added a comment to D17336: Restore support for date/time constants in KEXI SQL.

I tested a simple expression, such as
select #date# as expr1
and it worked
But a more complex query such as
SELECT mi_band_activity.*, timestamp_dt FROM mi_band_activity where timestamp_dt > #23-May-2018#
does not work, gives the following output:
org.kde.kdb.core: checking variable name: "mi_band_activity.*"
org.kde.kdb.core: checking variable name: "timestamp_dt"
org.kde.kdb.core: checking variable name: "timestamp_dt"
org.kde.kdb.core: error:
org.kde.kdb.core: at character 95 near tooken "#"
org.kde.kdb.core: KDbEscapedString:"SELECT mi_band_activity.*, timestamp_dt FROM mi_band_activity where timestamp_dt > #23-05-2018#"

Dec 25 2018, 9:05 PM · KDb

Dec 18 2018

staniek added a comment to D17336: Restore support for date/time constants in KEXI SQL.

@piggz Sorry, updated now, I had to type arc diff --update D17336 --no-amend.

Dec 18 2018, 10:59 PM · KDb
staniek updated the diff for D17336: Restore support for date/time constants in KEXI SQL.
  • GIT_SILENT KDb VERSION 3.1.1
  • Add Date/Time classes for precise type support
  • Add autotests for the KDb date/time classes
  • Add support for the Date/Time constants in the SQL parser
  • Add autotests for date/time related KDBSQL statements
  • Merge remote-tracking branch 'origin/3.1' into 393094-date-constants
  • Version 3.2.0
  • Merge remote-tracking branch 'origin/3.2' into 393094-date-constants
  • Merge branch '3.2' into 393094-date-constants
Dec 18 2018, 10:57 PM · KDb
piggz added a comment to D17336: Restore support for date/time constants in KEXI SQL.

I used arc patch D17336 on kdb
I get errors like
org.kde.kdb.core: error: syntax error, unexpected $undefined, expecting $end
org.kde.kdb.core: at character 8 near tooken "#"
org.kde.kdb.core: KDbEscapedString:"select #2018-05-23#"
org.kde.kdb.core: " ^"

Dec 18 2018, 9:50 PM · KDb

Dec 17 2018

staniek reopened D17336: Restore support for date/time constants in KEXI SQL.
Dec 17 2018, 10:47 PM · KDb

Dec 13 2018

staniek closed D17336: Restore support for date/time constants in KEXI SQL.
Dec 13 2018, 4:21 PM · KDb
staniek updated the diff for D17336: Restore support for date/time constants in KEXI SQL.
  • Merge branch '3.2' into 393094-date-constants
Dec 13 2018, 4:15 PM · KDb
staniek reopened D17336: Restore support for date/time constants in KEXI SQL.
Dec 13 2018, 4:14 PM · KDb
staniek closed D17336: Restore support for date/time constants in KEXI SQL.
Dec 13 2018, 1:56 PM · KDb