introspectDatabase function
Future<Map<String, dynamic> >
introspectDatabase(
- DatabaseTarget target, {
- List<
String> includedSchemas = const [], - List<
String> excludedSchemas = const [],
Introspects the database target through supabase db query and returns
the GeneratorMetadata document in canonical order, equal to
sortGeneratorMetadata(await introspect(pool)) of
@supabase/postgrest-typegen at postgrestTypegenRevision up to the
order of keys within a record.
includedSchemas and excludedSchemas restrict the schemas whose
relations, columns, keys and functions are listed; the system schemas are
always left out and types are always listed for every schema.
Throws a SupabaseCliException when the Supabase CLI is missing, not logged in, or cannot reach the database.
Implementation
Future<Map<String, dynamic>> introspectDatabase(
DatabaseTarget target, {
List<String> includedSchemas = const [],
List<String> excludedSchemas = const [],
}) async => sortGeneratorMetadata(
await introspect(
SupabaseCliQueryable(target),
includedSchemas: includedSchemas,
excludedSchemas: excludedSchemas,
),
);