Hey, I got xata working with kysely on
Hey, I got xata working with kysely on cloudflare workers, but I've got few questions. On cloudflare you're supposed to create new instance (db connection) every time function is evoked. Kysely docs state that you should destroy such instance, but your docs/example with cloudflare doesn't mention it. Does the client keep the connection open and should I destroy it? I guess the destroy function of kysely instance would free memory as well, but I think it's not relevant in case of cloudflare as the context is destroyed anyway after the function is finished.
3 Replies
I think you shouldn't need it, it goes over HTTP so the connection is not a concern. @SferaDev correct me if I'm wrong please
Yeah, connections in kysely are not long lived
Makes sense. Thank you guys