Category Archives: SQL
Recursive common table expressions (CTE) for arbitrary depth hierarchies
- Posted by Michael MacDonald
- on Aug, 30, 2017
- in SQL
- Blog No Comments.
The challenge of storing an arbitrary depth hierarchy isn’t so much with the storing of it as it is with the querying it and rendering it in a useful fashion. Given a simple hierarchy stored in a table that has a self-referential parent_id such as: With some sample data: We can extract the data: Which […]
Read MoreRecent Posts
- The shape of structured data
- Writing very small executable
- The challenge of type asserting []interface{} to string slices.
- Serializing/Deserializing a complex GO struct to store externally (i.e. in a database, redis, or text file)
- Fun with golang, Google Maps api, and proxying requests