batchUpsert<T extends SupabaseObject> static method

Future<List<T>> batchUpsert<T extends SupabaseObject>(
  1. List<Map<String, dynamic>> batchJson
)

Implementation

static Future<List<T>> batchUpsert<T extends SupabaseObject>(
  List<Map<String, dynamic>> batchJson,
) async {
  try {
    return SupabaseQuery.extractSupabaseList<T>(
      await env.client.from(tableName(T)).upsert(batchJson).select(),
    );
  } catch (error, stacktrace) {
    catchSupabaseException(error, stacktrace);
    rethrow;
  }
}