ignore: cloud
This commit is contained in:
@@ -3,7 +3,7 @@ import { Resource } from "sst"
|
|||||||
export * from "drizzle-orm"
|
export * from "drizzle-orm"
|
||||||
import postgres from "postgres"
|
import postgres from "postgres"
|
||||||
|
|
||||||
const createClient = () => {
|
const init = () => {
|
||||||
const client = postgres({
|
const client = postgres({
|
||||||
idle_timeout: 30000,
|
idle_timeout: 30000,
|
||||||
connect_timeout: 30000,
|
connect_timeout: 30000,
|
||||||
@@ -20,6 +20,8 @@ const createClient = () => {
|
|||||||
return drizzle(client, {})
|
return drizzle(client, {})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const createClient = "NODE_ENV" in process.env ? init : memo(init)
|
||||||
|
|
||||||
import { PgTransaction, type PgTransactionConfig } from "drizzle-orm/pg-core"
|
import { PgTransaction, type PgTransactionConfig } from "drizzle-orm/pg-core"
|
||||||
import type { ExtractTablesWithRelations } from "drizzle-orm"
|
import type { ExtractTablesWithRelations } from "drizzle-orm"
|
||||||
import type { PostgresJsQueryResultHKT } from "drizzle-orm/postgres-js"
|
import type { PostgresJsQueryResultHKT } from "drizzle-orm/postgres-js"
|
||||||
|
|||||||
Reference in New Issue
Block a user