Skip to content

Generate Dart Types from Database Schema #139

Description

@atreeon

Are there any current ways or future plans to generate Dart types from Supabase tables?

for example, currently I do this where I use strings inside the methods and the output is a dynamic map that I manually convert

  var result = await supabase //
      .from('TestTable')
      .select()
      .eq('id', 1)
      .execute();

  var dataFirst = result.data[0];
  var data = TestTable(id: dataFirst["id"], name: dataFirst["name"]);

and I would like to do this; with the type generated automatically for me (a bit more like c#'s entity framework or dart's Conduit), where the type returned is a specific type that matches the database.

  var testTable = await supabase //
      .TestTable
      .select()
      .eq((x) => x.id, 1)
      .execute();

  print(testTable.name);

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestplannedThis issue is planned and should not be automatically closed due to being stale.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions