0 purchases
deno postgres interop
deno_postgres_interop #
The package allows the use
of Deno Postgres
in Deno Deploy
on dart_edge
by creating interop bindings for the js library
since other drivers rely on dart:io and don't work there.
The main scenario is Supabase Edge Functions, but it should also work for other cases with dart2js.
Usage with Supabase edge functions #
Add dependency in your pubspec.yaml:
dependencies:
deno_postgres_interop: <INSERT LATEST VERSION>
copied to clipboard
or run
dart pub add deno_postgres_interop
copied to clipboard
Import the package:
import 'package:deno_postgres_interop/deno_postgres_interop.dart';
copied to clipboard
Compile the code that uses this package with:
dart run edge build supabase_functions
copied to clipboard
Add imports to generated file by calling the script:
dart run deno_postgres_interop:add_imports \
--filename=example/functions/dart_edge/main.dart.js
copied to clipboard
Note: your filename may differ from the example
You can use the function now.
Note that because of the bug in dart_edge, SDK versions >= 3.1.0 are not actually supported.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.