Category Archives: SQLite

SQLite tree structures and queries to get sub-trees

SQLite is wonderful! Just today I found that SQLite support queries with a recurse to get the inner sub-trees: CREATE TABLE els ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE ,pid INTEGER DEFAULT NULL REFERENCES els ,name TEXT ); INSERT INTO els (id, pid, name) VALUES (1, NULL, 'top'); INSERT INTO els (id, pid, […]
Also posted in Blog, Ideas, Misc, Research | Leave a comment