MCPcopy
hub / github.com/prisma/prisma / constructor

Method constructor

packages/adapter-d1/src/d1-http.ts:226–242  ·  view source on GitHub ↗
(
    params: D1HttpParams,
    private readonly release?: () => Promise<void>,
  )

Source from the content-addressed store, hash-verified

224 alreadyWarned = new Set()
225
226 constructor(
227 params: D1HttpParams,
228 private readonly release?: () => Promise<void>,
229 ) {
230 const D1_API_BASE_URL = `https://api.cloudflare.com/client/v4/accounts/${params.CLOUDFLARE_ACCOUNT_ID}/d1/database/${params.CLOUDFLARE_DATABASE_ID}`
231
232 const client = ky.create({
233 prefixUrl: D1_API_BASE_URL,
234 headers: {
235 Authorization: `Bearer ${params.CLOUDFLARE_D1_TOKEN}`,
236 },
237 // Don't automatically throw on non-2xx status codes
238 throwHttpErrors: false,
239 })
240
241 super(client)
242 }
243
244 /**
245 * This will warn once per transaction

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected