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

Why is code for "first" commented out in processResponse()? #46

Open
barooo opened this issue Jul 19, 2022 · 0 comments
Open

Why is code for "first" commented out in processResponse()? #46

barooo opened this issue Jul 19, 2022 · 0 comments

Comments

@barooo
Copy link

barooo commented Jul 19, 2022

My app is using the .first() method on a query and with snowflake I was getting back a single item in an array instead of the first element in that array, it appears it's because the code to handle _method === 'first' is commented out in the adapter (

// if (obj.method === 'first') return resp.rows[0];
), so the end result is identical to the where() result without unwrapping the first row.

My use case works with this line added back, and a tweak to downcase columns in the first row. Was this just never implemented or was it commented out at some point for some reason?

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

1 participant