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

[BUG]: New $count API error with @neondatabase/serverless #3081

Closed
mdurling opened this issue Oct 8, 2024 · 1 comment
Closed

[BUG]: New $count API error with @neondatabase/serverless #3081

mdurling opened this issue Oct 8, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mdurling
Copy link

mdurling commented Oct 8, 2024

What version of drizzle-orm are you using?

0.34.1

What version of drizzle-kit are you using?

0.25.0

Describe the Bug

I tried out the new $count API and it works fine with a local postgres server. When running against a neon database, I am encountering the following error:

Caused by: TypeError: Cannot read properties of undefined (reading 'count')
 ❯ NeonSession.count ../../node_modules/.pnpm/drizzle-orm@0.34.1_@neondatabase+serverless@0.10.1_@types+react@18.3.2_postgres@3.4.4_react@18.3.1/node_modules/src/pg-core/session.ts:93:9

Expected behavior

The count should be returned. The exact same code works when using postgres locally.

Environment & setup

No response

@mdurling mdurling added the bug Something isn't working label Oct 8, 2024
@Sukairo-02 Sukairo-02 self-assigned this Oct 9, 2024
Sukairo-02 added a commit that referenced this issue Oct 9, 2024
AndriiSherman added a commit that referenced this issue Oct 15, 2024
* Check for Pg:

-added check constraints to migrate, pull, push
- added tests

* added check constraints to mysql
added some tests

* - added sqlite, turso checks
- added and updated tests

* removed console.log
merged beta to branch

* rewrote introspect tests
added introspect tests for checks

* added progress callbacks for introspect with checks

* updated tests for introspect

* Implement limit and order by in MySQL

* Add limit and order by to update and delete in SQLite

* Format

* Update SQLite test

* Format

* added postgresql generate handling for views

* added support for views and materialized views in postgres (push + introspect + generate)

* fixed build errors

* added alter for using

* added psql rename views and change schema handlings

* added generate for mysql views

* added introspect for mysql views

* Added sqlite and libsql view handling

* added all tests for all dialect views. updated introspect tests

* Updated introspect tests

* minor fixes

* fixed numeric introspect in pg

* fixed introspect numeric in pg

* fixed introspect numeric pg

* fixed sqlite + libsql alter existing handling

* updated psql introspect + sqlite introspect for views

* added progress callback to views. changed query columns for materialized views

* updated pg introspect columns query. updated mysql test.

* Updated enum handling for generate. Adde drop, add value, rename, set schema. Updated tests

* made test for enum ordering for push

* Added neon-serverless (websocket) tests, fixed neon-serverless session's lack of own count procedure (issue #3081)

* fixed lockfile

* Added leftover data deletion, imported table from common instead of re-creating locally

* Fixed lack of custom schema cleanup on locally remade skipped tests of neon-serverless

* squash add + drop enum values to drop only

* Upgrade to TS 5.6.3

* removed commented code

* Remove global set for node-postgres, neon and vercel; move to on per-query

* Fix import

* Fix test

* Fix view tests

* Check tests with docker

* Update tests

* Skip sqljs

* Add ignore on neon

* removed console logs in tests

* Updated drizzle constructors, removed monodriver

* Fixed type error

* Fixed sqlite instance checks

* Fixed mysql rename view sql statement

* Fixed tests, added MockDriver & mock support for reworked drivers

* Added `drizzle.mock()`, reworked replicas tests

* Fixed neon client identification

* Removed `bun-sqlite` from import tests

* Added missing connectionString param

* Fixed broken connection, added missing cases

* Updated versions for orm and kit

---------

Co-authored-by: Aleksandr Sherman <aleksandrserman@gmail.com>
Co-authored-by: Mario564 <ka.mario564@gmail.com>
Co-authored-by: Sukairo-02 <sreka9056@gmail.com>
Co-authored-by: Sergey Reka <71607800+Sukairo-02@users.noreply.github.com>
@AndriiSherman
Copy link
Member

should be fixed in drizzle-orm@0.35.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants