Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specific column not getting fetched in PGSql #75

Open
sourabhsmiths opened this issue Oct 6, 2022 · 1 comment
Open

Specific column not getting fetched in PGSql #75

sourabhsmiths opened this issue Oct 6, 2022 · 1 comment

Comments

@sourabhsmiths
Copy link

I am using the PgSql database and using the below command to fetch specific columns.
QSqlError daoError = qx::dao::fetch_by_query(query, items, NULL, columns);

where the query is a normal query, items is the return from the query, the connection is NULL and columns are as mentioned below:
QStringList columns = QStringList() << "column1" << "column2";
Now the issue is I am not getting any daoError but I am also not getting specific column1 and column2.

I was using the same in MySql and it was working fine.

When I remove the columns parameter I get all the columns without any error.
I wanted to know if I am using the correct command, if not what would be the correct syntax?
Let me know if you need something more from my side.

@QxOrm
Copy link
Owner

QxOrm commented Oct 6, 2022

Hello,
I think you are using the right command, I don't understand why it doesn't work for you with postgreSQL (I have several customers which use postgreSQL without any issue).
Have you tried to execute the SQL query generated by QxOrm library (you should see it in the output logs) in pgAdmin for example ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants