Skip to content

Instantly share code, notes, and snippets.

View UbhiTS's full-sized avatar

Tarunpreet Ubhi UbhiTS

  • Microsoft
  • Union City, CA
  • X @UbhiTS
View GitHub Profile
/*
Everything with no dependencies comes first. That way, when a new item is added with a dependency on an existing item, it doesn't cause the existing item to jump.
Of course an existing item taking a dependency on an existing item will cause a jump, may as well move the changing item.
An existing item taking a dependency on a new item will also jump. It doesn't really make sense to putting the new item first, out of order, if it doesn't have dependencies.
Basically: order by depth_of_deepest_dependency, original_order
*/
with
creating_objects as (