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

fix RECORDSET returning empty columns if there's no matched rows issu… #1733

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

aleeekhaan
Copy link

@aleeekhaan aleeekhaan commented Jun 28, 2023

Reference issue #1547

@mathiasrw
Copy link
Member

Lovely!

Any chance you can add a test file for this so we dont accidentally introduce the problem again when we rewrite things in a few years?

@aleeekhaan
Copy link
Author

Sure. I'll add a test case for this as well.

@aleeekhaan
Copy link
Author

Hi @mathiasrw, I have edited the test case you created to use a custom function for checking that the columns exist instead on using deepEqual. Please review and let me know if any changes are required.

@mathiasrw
Copy link
Member

I see the idea - just to make sure the columns are there - but we cant suddenly provide a different response format.

Please refert to deep equal and see if you can get it to return columnId without

  "dbenum": [undefined]
  "dbprecision": [undefined]
  "dbsize": [undefined]
  "dbtypeid": "INT"

@aleeekhaan
Copy link
Author

@mathiasrw The reason deepEqual fails because in the test case we only give the columnid while the actual result also has some other fields

"dbenum": [undefined] "dbprecision": [undefined] "dbsize": [undefined] "dbtypeid": "INT"

Can we remove these fields by writing a function that modifies the response for the recordset. Will this approach be appropriate?

@mathiasrw
Copy link
Member

Yep. That is what I was working towards with 4feca50#diff-daa185eed55b4159786a570955a6a87c12074d6ed316e7c14bd1ef711aabf0d8R474

@harisiqbal12
Copy link

@mathiasrw What's the update on this?

@mathiasrw
Copy link
Member

@harisiqbal12 Hmmm. Good question. Let me look into this over the weekend.

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

Successfully merging this pull request may close these issues.

3 participants