Skip to content

Commit

Permalink
Merge pull request #65 from drizzle-team:dri-111-implement-neon-serve…
Browse files Browse the repository at this point in the history
…rless-driver-support

Move Neon connector from neondb-serverless to neondb
  • Loading branch information
dankochetov authored Dec 9, 2022
2 parents 91716f6 + 7e1337f commit c51456e
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion changelogs/drizzle-orm-pg/0.13.3.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# drizzle-orm-pg 0.13.3-beta.1
# drizzle-orm-pg 0.13.3

- Implemented NeonDB serverless driver support.
- (internal) Added `session.all()` and `session.values()` methods.
2 changes: 1 addition & 1 deletion drizzle-orm-pg/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "drizzle-orm-pg",
"version": "0.13.3-beta.1",
"version": "0.13.3-beta.2",
"description": "Drizzle ORM package for PostgreSQL database",
"main": "index.js",
"types": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion drizzle-orm-pg/src/db.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SQL, SQLWrapper } from 'drizzle-orm/sql';
import { SQLWrapper } from 'drizzle-orm/sql';
import { QueryResult, QueryResultRow } from 'pg';

import { PgDialect } from '~/dialect';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Logger, MigrationConfig, readMigrationFiles } from 'drizzle-orm';
import { PgDatabase } from '~/db';
import { PgDialect } from '~/dialect';
import { PgSession } from '~/session';
import { NeonDriver } from './driver';
import { NeonClient, NeonSession } from './session';

Expand All @@ -10,6 +10,8 @@ export interface PgConnectorOptions {
driver?: NeonDriver;
}

export type NeonDatabase = PgDatabase;

export class NeonConnector {
dialect: PgDialect;
driver: NeonDriver;
Expand All @@ -24,7 +26,7 @@ export class NeonConnector {
return this.session ?? (this.session = await this.driver.connect());
}

async connect() {
async connect(): Promise<NeonDatabase> {
const session = await this.getSession();
return this.dialect.createDB(session);
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c51456e

Please sign in to comment.