Skip to content

Generate Dart Types from Database Schema #139

Open
@atreeon

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

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions