SupabaseAdapter class

Supabase database adapter using direct PostgreSQL connection.

Example usage:

final connection = await pg.Connection.open(
  pg.Endpoint(
    host: 'aws-0-ap-south-1.pooler.supabase.com',
    port: 6543, // Pooler port
    database: 'postgres',
    username: 'postgres.projectid',
    password: 'your-password',
  ),
);

final adapter = SupabaseAdapter(connection);
final prisma = PrismaClient(adapter: adapter);
Implemented types

Constructors

SupabaseAdapter(Connection connection, {ConnectionInfo? connectionInfo})

Properties

adapterName String
Adapter package name (e.g., '@prisma/adapter-pg')
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
provider String
Database provider name (e.g., 'postgresql', 'mysql', 'sqlite')
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() Future<void>
Close the connection and clean up resources
override
executeRaw(SqlQuery query) Future<int>
Execute a raw SQL command and return affected row count
override
executeScript(String script) Future<void>
Execute a SQL script (multiple statements)
override
getConnectionInfo() ConnectionInfo?
Get connection information (schema, capabilities, etc.)
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryRaw(SqlQuery query) Future<SqlResultSet>
Execute a raw SQL query and return results
override
startTransaction([IsolationLevel? isolationLevel]) Future<Transaction>
Start a new database transaction
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromConnectionString(String connectionString, {ConnectionInfo? connectionInfo}) Future<SupabaseAdapter>
Create Supabase adapter from connection string.