Conversion of a SQL model into a standard item model?
-
From the article you linked:
If the database system can determine the reverse mapping from the view schema to the schema of the underlying base tables, then the view is updatable. INSERT, UPDATE, and DELETE operations can be performed on updatable views.
Since there's no generic way for a Qt model to know that, it is left to the user to implement using
QSqlQuery
directlywrote on 22 Oct 2018, 14:44 last edited byWould it be nicer if a table model can determine if it is based on an updatable view?
-
wrote on 22 Oct 2018, 15:09 last edited by VRonin
Yes, but once again
@VRonin said in Conversion of a SQL model into a standard item model?:
there's no generic way for a Qt model to know that
-
Yes, but once again
@VRonin said in Conversion of a SQL model into a standard item model?:
there's no generic way for a Qt model to know that
wrote on 22 Oct 2018, 15:39 last edited byDo full-featured standard item models become a bit more attractive then?
-
Attractive for what ?
-
wrote on 28 Oct 2018, 13:10 last edited by
Would you like to compare the attractiveness of the mentioned data model variants any further?
-
I'll let you start by providing the analysis you want to discuss about.
-
wrote on 29 Oct 2018, 08:49 last edited by
Is there a “development competition” going on between data processing by SQL queries and/or Qt standard items?
-
Is there a “development competition” going on between data processing by SQL queries and/or Qt standard items?
@elfring said in Conversion of a SQL model into a standard item model?:
Is there a “development competition” going on between data processing by SQL queries and/or Qt standard items?
No, there is no competition going on.
@elfring, what is your goal for asking us these questions? Are you trying to get us to write a "software extension" for you?
-
@elfring said in Conversion of a SQL model into a standard item model?:
Is there a “development competition” going on between data processing by SQL queries and/or Qt standard items?
No, there is no competition going on.
@elfring, what is your goal for asking us these questions? Are you trying to get us to write a "software extension" for you?
wrote on 29 Oct 2018, 09:57 last edited byI hope that more software evolution can happen in this area so that the switching between discussed data models might become easier.
-
I hope that more software evolution can happen in this area so that the switching between discussed data models might become easier.
@elfring said in Conversion of a SQL model into a standard item model?:
I hope that more software evolution can happen in this area so that the switching between discussed data models might become easier.
We will not perform this "software evolution" because we cannot see any good reason to provide additional conversion/switching between QSqlTableModel and QStandardItemModel. Furthermore, none of your posts above provide convincing arguments for this conversion/switching.
-
@elfring said in Conversion of a SQL model into a standard item model?:
I hope that more software evolution can happen in this area so that the switching between discussed data models might become easier.
We will not perform this "software evolution" because we cannot see any good reason to provide additional conversion/switching between QSqlTableModel and QStandardItemModel. Furthermore, none of your posts above provide convincing arguments for this conversion/switching.
wrote on 30 Oct 2018, 08:17 last edited byWill other Qt users share more convincing arguments from involved software development challenges?
-
Will other Qt users share more convincing arguments from involved software development challenges?
-
Will other Qt users share more convincing arguments from involved software development challenges?
"Other Qt users" will not even understand what these unending questions are about ;-) Just saying....
wrote on 30 Oct 2018, 08:24 last edited byI assume that some Qt users will care for collateral evolution around data models.
-
Will other Qt users share more convincing arguments from involved software development challenges?
@elfring said in Conversion of a SQL model into a standard item model?:
I assume that some Qt users will care for collateral evolution around data models.
Yes, there are users here who care about the improvement of Qt data models. For example, @VRonin submitted many patches this year for models (such as https://codereview.qt-project.org/#/c/235730/4//ALL ), and his changes were accepted by the Qt Project.
His changes were accepted for a few reasons:
- Because his submissions solve real problems that are encountered by real people.
- Because his submissions do not introduce new problems.
Try to follow his example. Try to submit proposals that solve real problems, and try not to introduce new problems.
First, thank you for submitting https://bugreports.qt.io/browse/QTBUG-71482. This is a good submission because it addresses a real problem: Important documentation is missing.
However, here are some examples where your submissions are not good:
- This thread ("Conversion of a SQL model into a standard item model?") is rejected because it does not solve a real problem. Nobody here needs to convert/switch between QSqlTableModel and QStandardItemModel.
- "Returning C++ references from more programming interfaces?" is rejected because it introduces a new problem: It breaks encapsulation.
-
@elfring said in Conversion of a SQL model into a standard item model?:
I assume that some Qt users will care for collateral evolution around data models.
Yes, there are users here who care about the improvement of Qt data models. For example, @VRonin submitted many patches this year for models (such as https://codereview.qt-project.org/#/c/235730/4//ALL ), and his changes were accepted by the Qt Project.
His changes were accepted for a few reasons:
- Because his submissions solve real problems that are encountered by real people.
- Because his submissions do not introduce new problems.
Try to follow his example. Try to submit proposals that solve real problems, and try not to introduce new problems.
First, thank you for submitting https://bugreports.qt.io/browse/QTBUG-71482. This is a good submission because it addresses a real problem: Important documentation is missing.
However, here are some examples where your submissions are not good:
- This thread ("Conversion of a SQL model into a standard item model?") is rejected because it does not solve a real problem. Nobody here needs to convert/switch between QSqlTableModel and QStandardItemModel.
- "Returning C++ references from more programming interfaces?" is rejected because it introduces a new problem: It breaks encapsulation.
wrote on 30 Oct 2018, 13:49 last edited byNobody here needs to convert/switch between QSqlTableModel and QStandardItemModel.
I am experimenting with such a transformation for a specific software application for a while.
-
Nobody here needs to convert/switch between QSqlTableModel and QStandardItemModel.
I am experimenting with such a transformation for a specific software application for a while.
@elfring said in Conversion of a SQL model into a standard item model?:
I am experimenting with such a transformation for a specific software application for a while.
Then I suggest you make the changes yourself.
If you want someone else to make the changes, you must first explain your project in lots of detail (write many paragraphs to explain what you are trying to do!) and you must convince us that it is worth spending time to make the changes in Qt. Remember, the changes must also avoid introducing new problems.
-
@elfring said in Conversion of a SQL model into a standard item model?:
I am experimenting with such a transformation for a specific software application for a while.
Then I suggest you make the changes yourself.
If you want someone else to make the changes, you must first explain your project in lots of detail (write many paragraphs to explain what you are trying to do!) and you must convince us that it is worth spending time to make the changes in Qt. Remember, the changes must also avoid introducing new problems.
wrote on 30 Oct 2018, 14:07 last edited by…, you must first explain your project in lots of detail …
I am trying to achieve something also for another free software application (as you might have noticed already).
The possible design decisions have got further consequences on the corresponding software development efforts. -
…, you must first explain your project in lots of detail …
I am trying to achieve something also for another free software application (as you might have noticed already).
The possible design decisions have got further consequences on the corresponding software development efforts.@elfring said in Conversion of a SQL model into a standard item model?:
I am trying to achieve something also for another free software application (as you might have noticed already).
Please provide a link to the application.
The possible design decisions have got further consequences on the corresponding software development efforts.
This is very vague, so I still cannot understand what you're trying to achieve. The application can use a QSqlTableModel without converting it to a QStandardItemModel, right?
-
@elfring said in Conversion of a SQL model into a standard item model?:
I am trying to achieve something also for another free software application (as you might have noticed already).
Please provide a link to the application.
The possible design decisions have got further consequences on the corresponding software development efforts.
This is very vague, so I still cannot understand what you're trying to achieve. The application can use a QSqlTableModel without converting it to a QStandardItemModel, right?
wrote on 30 Oct 2018, 14:32 last edited byPlease provide a link to the application.
Do you care for any evolution around the software “Cppcheck”?
The application can use a QSqlTableModel without converting it to a QStandardItemModel, right?
I can imagine such a software development option.
But a published program has got a strong dependency on Qt standard items so far. -
Please provide a link to the application.
Do you care for any evolution around the software “Cppcheck”?
The application can use a QSqlTableModel without converting it to a QStandardItemModel, right?
I can imagine such a software development option.
But a published program has got a strong dependency on Qt standard items so far.@elfring said in Conversion of a SQL model into a standard item model?:
Please provide a link to the application.
Do you care for any evolution around the software “Cppcheck”?
The application can use a QSqlTableModel without converting it to a QStandardItemModel, right?
I can imagine such a software development option.
But a published program has got a strong dependency on Qt standard items so far.@elfring, the maintainer for Cppcheck asked you to stop. The right thing to do is to respect his wishes.
20/35